In this article, I am going to back test an intraday strategy based on pivot points. Pivot point levels are basically support and resistance levels calculated based on previous day values.
The formula for calculating a pivot point is:
High = Previous day high
Low = Previous day low
Close = Previous day close
Pivot Point (PP) = (High + Low + Close) / 3
Formulas for calculating pivot point levels:
First Resistance (R1) = (2 x PP) – Low
First Support (S1) = (2 x PP) – High
Second Resistance (R2) = PP + (High – Low)
Second Support (S2) = PP – (High – Low)
Third Resistance (R3) = High + 2 x (PP – Low)
Third Support (S3) = Low – 2 x (High – PP)
Below is a sample candlestick chart with pivot point levels mentioned. The line in back color in the center is called pivot point. Levels above the pivot point are resistance levels R1, R2. Levels below the pivot point are support levels S1, S2.
Strategy Rules:
This is a breakout strategy where we enter the trade as soon the price breaks through any level as per our strategy. One can create as many variations as possible using the pivot point levels. But in this post, we choose S2/R2 levels as breakout levels to enter a trade.
Long Trade:
- Today`s open should be above previous day high and below R2
- Enter trade on breakout of R2 level
- Stoploss is R1
- Target is R3
- Square off: If no SL or target hits then exit the trade 15 minutes before the market closes i.e. 3:15 PM.
Short Trade:
- Today`s open should be below previous day low and above S2
- Enter trade on break down of S2
- Stoploss is S1
- Target is S3
- Square off: If no SL or target hits then exit the trade 15 minutes before the market closes i.e. 3:15 PM.
Stock Selection: Nifty 50 stocks. As soon as market opens we filter the stocks to be traded based on the below rule.
Choose stocks for Long trades:
- Today`s open should be above previous day high and below R2
Choose stocks for Short trades:
- Today`s open should be below previous day low and above S2
In this back test we chose maximum 5 stocks for Long and maximum 5 stocks for Short.
Capital: We are going to assume the total capital as 1 Lakh (1,00,000). We risk only 1% of 1 Lakh on each trade i.e. the risk on each trade is 1,000.
Back test Period: 01-01-2022 To 24-10-2024 (Approx. 3 years)
Charges: All charges like brokerage, STT, exchange transactions are considered while running back test.
Slippages: This back test does not account any slippages that we encounter in live trading.
Please note we don`t take another trade in the same stock after first trade SL hits.
To keep the back test simple, buffer (delta) value is not considered in this back test. Buffer is some extra value that we consider just above or below the breakout line.
Back test results:
Here is the back test summary report. All the statistics mentioned in below screenshot are self-explanatory.
So, the overall strategy outcome is negative. But when you consider the result without charges its 64% profit over the 3 years back test period. Surprisingly the charges are more than the profit and resulting the net value into loss. So if you would have traded this strategy even with strict discipline you would be losing around 60% of capital with a max drawdown of 80%.
I am providing you the complete back test report in the form of downloadable excel file at the bottom of the post.
The back test report contains following sheets:
- Trades: All trades with entry, exit, start and end timestamps, pnl, charges, net pnl etc.
- Symbol wise Pnl
- Date wise Pnl
- Date & Symbol wise Pnl
- Month wise Pnl
- Month & Symbol wise Pnl
- Year wise Pnl
- Year & Symbol wise Pnl
- Win Loss Ratio of each stock
- Summary report with important data.
I hope this would be helpful for you guys to do some further analysis.
Download Back test Report:
BackTest_Pivot-Points_V1_2022-01-01_to_2024-10-24.xls