Backtest reliability is determined by the standard error formula (1/√n), where n represents the number of samples or trades; larger sample sizes reduce error probability, meaning a backtest with only 100 samples may still have 10% deviation from actual results, while 10,000 samples reduce error to just 1%, making sample size the critical factor in determining whether backtest results are statistically valid or merely curve-fitted noise.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Why Your Backtest Lies | Power of 1/√n | Retail Traders Must WatchAdded:
[music] >> Hi guys, this is Jegan. So people do back test and then trade and end of the quarter end of the year they will check actually how the back testing matches and mostly they will not match not even 50%. So then they will decide that actually there is no point in doing a back testing. Let's do only the forward testing. They will trade based on a gut feeling which is more dangerous than doing the regular one. Okay, so being a back tester, okay, so what are the elements you have to take care? Let me explain to you, okay?
So how I do the back test? So before that there is a SEBI disclaimer, okay? So before you do the any trade, you do your own analysis or else you consult your SEBI registered people and then take a trade. And the whatever the content I'm going to present it is only for education purpose.
Okay, how people torture the data? Peter is a very famous trader, the father of algo trading. He used to say that if you torture the data, it will show what you want, okay? So your brain will is wired in such a way that if you're tweaking that strategy, say for example 920 920 30 seconds and 10% stop loss 10.37% stop loss. Like this if you're tweaking it, definitely you're going to get the results what you want, okay? So thus don't torture the data, but you have to optimize it. How do you know that whether you're doing a optimization or curve fit, okay? There is a formula to identify whether you're doing a curve fit or optimization. So I let me come to the mathematical formula because I'm coming from a mathematical background. This is called standard error formula 1 by root 10. Whereas this n stands for the number of samples you have taken, number of trades you have taken, okay? So that will tell you what percentage of error can come in your back testing? 10% 20% everything you will come to know based on the standard error. You can Google it also. So let me take a sample. If you're taking only one sample, only one trade, back testing only one day, then there is a chance that you will get 100% error. And likewise if you're taking four days, okay, four days, 50% chance. So likewise actually if you're taking 100 days, still there is a chance of getting 10% deviation from the back testing, okay?
The more sample if you're going for 10,000, then there is a 1% deviation because the more number of samples, the law of large number will work, okay? You should have a large number, large sample. But for us, right?
So it may not be possible to go for a 10,000 days because our expiry days are getting changed. So it is not easy for us to go for 10,000 days. You can back test till 2018, but it may not be relevant because they have increased the margin, they have put a lot of rules, ELM margin, like that actually. So it is irrelevant for us to back test only for two years of data, but if you're testing for two years of data, okay? For Nifty 52 expiry, for Sensex 52 expiry per annum. So 104 is per annum is the expiry. For two years you're getting 208 is the expiries we have. So thus we will fall under this category, okay? So there is a possibility of 7% deviation for us.
That's what I do. I do the back testing for two years.
So thus if you're testing for more samples, though you do the curve fit, though you do a lot of optimization, it may be valid because your sample size is bigger and there is a probability that your system will work much much better than the usual one, okay? So you do the optimization, you do that, but make sure that you do the number of samples is really high. So that is a key point.
Okay, so next one is some people I used to say this once you are regularly watching my video, you will come to know this 600 is the benchmark uh um return I look per day, per day, per lot.
That is what I I do. People say, "Okay, Jegan, actually right now I have 600 rupees per day, per lot. So is it a good system? I have a more number of samples, okay?" Now the question is and you may be getting this 600 rupees average profit, but it may not be in a distributed way.
So what is a distributed way? Say for example if this is your two years back testing data. Say if I'm getting profit like this, loss like this, profit like this, loss like this, profit like this and loss like this, this is fine. But most of the cases some of the some of the cases what it happens is say for example you may be getting this profit.
One day you got 50k and other day you got 20k profit and all other day it is 100 rupees profit or 100 rupees loss, 100 rupees profit, 100 rupees loss. It's possible especially in option buying, especially in option buying. Thus this two days profit is feeding average day profit.
Okay, say for example some student is scoring mathematical 100% and Tamil also 100% or English also 100% all other subject he is doing only 35 35 35 35.
And his average may be more than 50.
But this 100 and 100 is feeding the other this thing. But this is not good in a trading. Trading means you have to make a consistent profit. So what you have to do?
You have to cut 2% of the best profit day.
Per annum two days.
Per annum one year. So two years you remove four best trades. After removing your best four days, if you're making 600 rupees per day, more than 200 samples, there is a higher probability that the system will work, okay? So this cannot be done in a third party software. You have to do it yourself. Maybe in a Python, maybe in a AI, ChatGPT or any other tool you can do. That's what I do.
So if you want to know how I do the back test, how I how I remove and how I make a perfect trading system for myself, okay? So you come and attend the Mumbai workshop which is happening in May 10th, okay? It's on Sunday. So don't miss it. Thank you.
>> [music] [music] [music]
Related Videos
Escaping the Fog
LogicLemurGaming
760 views•2026-06-03
Olympiad Mathematics | Indian | Can You Solve This One?
PhilCoolMath
650 views•2026-06-03
A Brutal Radical Expression Made Easy! The Shortcut Changes Everything.
tamoshop
112 views•2026-06-02
V : jee main /advance class 11 mathematics : Binomial Theorem class-1 ( 29 may 2026 )
dcamclassesiitjeemainsadva9953
125 views•2026-05-29
Is This Pentomino Tileable?
3cycle
241 views•2026-05-30
This Sudoku Has Many Lines!!
CrackingTheCryptic
2K views•2026-05-29
Olympiad Mathematics | Indian Can You Solve This One?
PhilCoolMath
268 views•2026-06-02
Olympiad Mathematics | Indian | Can You Solve This?
PhilCoolMath
669 views•2026-06-02











