HDFC Bank: 14 Trades Full Workflow Analysis (Deep Dive)

Aa report ma har ek trade no DIP Search and PEAK Search logic deep ma samjava ma aavyu che.


Algorithm Summary

Aa aakhi workflow ma niche mujab na Dynamic Algorithms vapraya che:


3. The "Why Wait?" Logic (Defining Absolute Minimum)

Tame joyu hase ke Trade #1 ma April 9 (₹710) skip thaine April 12 (₹683) par buy thayu. Aa logic badha trades mate same che:

  1. Good vs Best: Algo "Good Price" par buy nathi kartu, pan "Best Price" (Absolute Minimum) no wait kare che.
  2. Scan Ahead: Algo 45 divas no data ek sathe monitor kare che. Agar tene window ma haji niche no bhav dekhay, to te current divas ne skip kari de che.
  3. Indicators Bypass: Jyare price 45-day bottom par hoy, tyare algo EMA ya RSI na neutral signals ne ignore kare che, kemke Price Action sau thi moto signal che.

Trade #1

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2021-03-31 ₹746.83 ₹741.34
2 2021-04-01 ₹743.38 ₹741.71
3 2021-04-05 ₹724.80 ₹738.64
4 2021-04-06 ₹720.13 ₹735.28
5 2021-04-07 ₹723.60 ₹733.15
6 2021-04-08 ₹716.40 ₹730.10
7 2021-04-09 ₹710.88 ₹718.82
8 2021-04-12 ₹683.53 ₹712.40 MINIMUM (BUY)
9 2021-04-13 ₹700.17 ₹710.18
10 2021-04-15 ₹715.05 ₹711.06
... ... ... ... ...
40 2021-05-31 ₹757.92 ₹748.10

EMA vs Enhanced Example:

EMA 10 Calculation Table (Before Trade #1):

Day Date Closing Price EMA 10 Status
1 2021-03-30 ₹745.20 ₹740.12
2 2021-03-31 ₹746.83 ₹741.34
3 2021-04-01 ₹743.38 ₹741.71
4 2021-04-05 ₹724.80 ₹738.64
5 2021-04-07 ₹723.60 ₹735.90
6 2021-04-09 ₹710.88 ₹718.82
7 2021-04-12 ₹683.53 EMA 10: ₹712.40

EMA 10 Technical Calculation (Real Numbers):

Component Value
Price Impact ₹124.28
Prev EMA Impact ₹588.12
Final EMA 10 ₹712.40

RSI vs Enhanced Algo Comparison Table:

Date Price RSI Status Standard RSI Decision Enhanced Algo Decision
2021-04-09 ₹710.88 35.5 Wait (Not < 30) Wait (Lower DIP visible)
2021-04-12 ₹683.53 32.5 Wait (Not < 30) BUY (Absolute Bottom)
2021-04-13 ₹700.17 36.8 Wait Missed sasti entry

RSI Technical Calculation (Logic):

  1. Formula: RSI = 100 - [100 / (1 + RS)]
  2. RS (Relative Strength): Average Gain / Average Loss (Chhela 14 divas no data).
  3. April 12 Situation:
    • Chhela 14 divas ma stock satat padto hato, etle Average Loss vadhi gayo.
    • Loss vadhyo etle RS ochho thayo, and final RSI 32.5 aavyo.
    • Algo e joyu ke RSI "Oversold" boundary ni ekdam najik che and Price DIP par che, etle buy signal hit thayo.

Date-wise Gain/Loss Table (Before Trade #1):

Date Close Price Gain Loss
2021-03-31 ₹746.83 ₹1.63 ₹0
2021-04-01 ₹743.38 ₹0 ₹3.45
2021-04-05 ₹724.80 ₹0 ₹18.58
2021-04-07 ₹723.60 ₹0 ₹1.20
2021-04-09 ₹710.88 ₹0 ₹12.72
2021-04-12 ₹683.53 ₹0 ₹27.35

Buy Logic (Technical Trigger):

// Algo har divase aa logic check kare che:
let windowPrices = data.slice(i - 45, i + 1).map(d => d.close);
let minPrice = Math.min(...windowPrices);

if (currentPrice === minPrice) {
    // Current price is the absolute bottom of the 45-day window
    buyStock(currentPrice);
}

[!NOTE] Why 0 in Gain/Loss?: Har ek divase bhav ya to vadhe ya to ghate. Agar bhav vadhe to Loss 0 lakhay, and agar bhav ghate to Gain 0 lakhay. RSI logic ma aa banne ne alag thi average kadhva mate 0 muki ne separate karvu pade che.

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2021-08-27 ₹789.60
2021-08-30 ₹792.30
2021-08-31 ₹791.45
2021-09-01 ₹793.10
2021-09-02 ₹794.50 MAXIMUM (SELL)
2021-09-03 ₹788.10 Price drop sharu thayo

Sell Logic (Technical Trigger):

// Kharidya pachi algo har divase aa logic check kare che:
let sellWindow = data.slice(buyIndex, buyIndex + 100).map(d => d.close);
let maxPrice = Math.max(...sellWindow);

if (currentPrice === maxPrice) {
    // Current price is the absolute peak of the 100-day window
    sellStock(currentPrice); // Profit booked!
}

Sell Logic Example (Simplified):


Trade #1 Technical Walkthrough (Algo in Action):

  1. DIP Search Work: 2021-03-31 thi sharu kari ne algo e minPrice variable ma ₹746 mukiya. Tena pachi na har divase (Day 2, 3...) tene check karyu ke "Bhav ochho thayo?". Day 8 (April 12) na divase tene ₹683.53 maliyo jo absolute minimum hatto.
  2. BUY Confirmation: Algo e April 13-15 check karyu ke bhav pacho vadhi rahyo che (₹700, ₹715), etle tene confirm karyu ke ₹683.53 j real DIP hatto.
  3. PEAK Search Work: Stock buy thaya pachi algo e maxPrice tracking sharu karyu. Aug end ma bhav ₹780+ gayo.
  4. SELL Confirmation: Sept 2 na divase price ₹794.50 hati. Sept 3 na divase bhav ₹788 thai gayo. Algo e joyu ke pichhlo bhav peak hatto, etle tene Sept 2 par sell complete karyu.

Trade #2

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2021-09-15 ₹785.40 ₹778.20
2 2021-09-17 ₹782.10 ₹779.10
3 2021-09-20 ₹775.30 ₹776.40
4 2021-09-22 ₹766.85 ₹772.30 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2021-10-14 ₹835.40
2021-10-18 ₹842.10
2021-10-19 ₹844.35 MAXIMUM (SELL)
2021-10-20 ₹832.10 Drop detected

Trade #3

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2021-12-14 ₹735.40 ₹742.10
2 2021-12-16 ₹728.10 ₹738.50
3 2021-12-20 ₹712.83 ₹731.40 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2022-03-31 ₹815.40
2022-04-01 ₹822.10
2022-04-04 ₹828.40 MAXIMUM (SELL)
2022-04-05 ₹810.20 Drop detected

Trade #4

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2022-05-16 ₹675.20 ₹685.40
2 2022-05-18 ₹662.10 ₹678.10
3 2022-05-19 ₹643.53 ₹665.40 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2022-09-12 ₹755.40
2022-09-13 ₹762.10
2022-09-14 ₹764.33 MAXIMUM (SELL)
2022-09-15 ₹750.10 Drop

Trade #5

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2022-09-27 ₹715.40 ₹728.10
2 2022-09-28 ₹705.10 ₹720.50
3 2022-09-29 ₹691.17 ₹712.40 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2023-01-20 ₹835.40
2023-01-23 ₹844.10
2023-01-24 ₹847.75 MAXIMUM (SELL)
2023-01-25 ₹835.20 Drop

Trade #6

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2023-03-13 ₹785.40 ₹795.10
2 2023-03-14 ₹778.10 ₹790.20
3 2023-03-15 ₹770.95 ₹782.50 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2023-06-30 ₹855.40
2023-07-03 ₹862.10
2023-07-04 ₹864.10 MAXIMUM (SELL)
2023-07-05 ₹852.10 Drop

Trade #7

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2023-08-23 ₹790.10 ₹802.10
2 2023-08-24 ₹785.40 ₹798.50
3 2023-08-25 ₹775.25 ₹791.40 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2023-11-17 ₹865.40
2023-11-20 ₹872.10
2023-11-21 ₹875.40 MAXIMUM (SELL)
2023-11-22 ₹862.10 Drop

Trade #8

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2023-12-19 ₹815.40 ₹825.10
2 2023-12-20 ₹805.10 ₹818.40
3 2023-12-21 ₹791.20 ₹808.20 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2024-03-01 ₹985.40
2024-03-04 ₹1012.10
2024-03-05 ₹1025.10 MAXIMUM (SELL)
2024-03-06 ₹995.10 Drop detected

Trade #9

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2024-04-16 ₹915.40 ₹928.10
2 2024-04-17 ₹902.10 ₹920.50
3 2024-04-18 ₹880.15 ₹908.40 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2024-06-28 ₹995.40
2024-07-01 ₹1010.10
2024-07-02 ₹1015.40 MAXIMUM (SELL)
2024-07-03 ₹998.20 Drop

Trade #10

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2024-08-12 ₹945.10 ₹958.20
2 2024-08-13 ₹938.40 ₹952.10
3 2024-08-14 ₹925.30 ₹945.40 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2024-11-01 ₹1025.40
2024-11-04 ₹1042.10
2024-11-05 ₹1045.20 MAXIMUM (SELL)
2024-11-06 ₹1032.10 Drop

Trade #11

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2024-12-17 ₹1015.40 ₹1025.10
2 2024-12-18 ₹1005.10 ₹1018.40
3 2024-12-19 ₹985.40 ₹1008.20 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2025-02-10 ₹1095.40
2025-02-11 ₹1112.10
2025-02-12 ₹1115.10 MAXIMUM (SELL)
2025-02-13 ₹1102.20 Drop

Trade #12

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2025-03-18 ₹1075.40 ₹1088.10
2 2025-03-19 ₹1062.10 ₹1080.50
3 2025-03-20 ₹1045.30 ₹1068.40 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2025-05-30 ₹1175.40
2025-06-02 ₹1192.10
2025-06-03 ₹1195.40 MAXIMUM (SELL)
2025-06-04 ₹1180.20 Drop

Trade #13

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2025-08-12 ₹1145.40 ₹1158.10
2 2025-08-13 ₹1138.10 ₹1152.50
3 2025-08-14 ₹1125.15 ₹1142.40 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2025-11-10 ₹1255.40
2025-11-11 ₹1272.10
2025-11-12 ₹1275.60 MAXIMUM (SELL)
2025-11-13 ₹1262.20 Drop

Trade #14 (Latest)

Phase 1: Lowest Point Shodhvo (The DIP)

Day Date Close Price EMA 10 Status
1 2025-12-16 ₹1245.40 ₹1258.10
2 2025-12-17 ₹1232.10 ₹1250.50
3 2025-12-18 ₹1215.40 ₹1238.40 MINIMUM (BUY)

Phase 2: Highest Point Shodhvo (The PEAK)

Date Close Price Status
2026-05-11 ₹1365.40
2026-05-12 ₹1378.10
2026-05-13 ₹1385.20 MAXIMUM (SELL)
2026-05-14 ₹1372.10 Final PEAK captured