r/algorithmictrading • u/Adorable_Market3621 • Jun 01 '26
Backtest Not sure how to feel about this


So this is my second update. So I have been working on this bot, here is the current progress. Now the results are super good and I dont know how to feel about it, because it's like too good to be true no? I made sure there was no look ahead, everything before 2021 is out of sample, and i made sure the logic didn't have any issues. So what could have I done? The current version only takes longs, but shorts are also profitable. This is on GC btw
3
Upvotes
3
u/Zestyclose-Eagle1809 Jun 01 '26
Your OOS work is the last thing you should be worried about. You held out 2010-2020, the logic survived it, and the realistic slice still posts PF 2.4+ in most of those years. That's not a curve-fit signature....
The actual risk: your PF dropped from 3.95 to 2.57 from adding one tick a side plus $5. A 35% haircut from the gentlest possible cost model. On a 5 min median hold doing like10 trades a day on GC, the fill assumption is the whole game, and 1 tick/side is optimistic for gold around the London and NY opens.
The structure is win rate carried: payoff ratio 0.809 means your breakeven win rate is around 55%, and you're at 76%. That 20 point cushion is the genuinely good news, but it's a cushion against fills, not curve fit. Re run at 2-3 ticks of slippage and watch avg R. Also look at 2018: realistic PF 1.29, avg $7.90/trade. That's your weak-regime year and it tells you how this behaves when gold isn't trending.
Co-Founder at Quantprove, built it for exactly this on our own systematic gold. The number I'd track is EV and Sortino retention live vs backtest, not profit factor. PF is too noisy and too easy to flatter with an optimistic fill model. The honest test is logging your real fill price against the backtest-assumed price as its own column.
Are your entries limit or market orders? If they're limits, your backtest is assuming fills you won't always get live.
2
u/DreamfulTrader Jun 01 '26
Are you prepared to forward test it with a live account? Are you are also prepared to put real cash to use it? If not then it is pointless to backtest it on 15 years if data.
1
u/dan85br Jun 01 '26
Olá, amigo. Sinto muito em trazer más notícias. É verdade que seu bot é lucrativo ao longo do tempo, mas ao custo de grandes perdas que podem quebrar sua conta rapidamente antes que atinja o potencial.
Perceba como os trades simulados obtêm lucros pequenos, a maior parte deles menos de $100. Em contrapartida, a maior parte do rebaixamento (Max DD) está acima de $1000, sendo que existem casos de mais de $5000.
Esse parâmetro não pode ser desconsiderado, pois representa a soma de perdas consecutivas do bot ao longo do tempo.
Ao observar os dados que você forneceu, eu chego à seguinte conclusão: você tem uma relação lucro/prejuízo bastante desfavorável, pois seu bot depende de um grande volume de trades que alcançam lucros pequenos individualmente, ao mesmo tempo em que bastariam poucos trades ruins para arruinar sua conta com grandes prejuízos.
Sugestão: aprenda efetivamente a importância de todos os parâmetros estatísticos: PnL, profit factor, win rate, drawdown, sharpe. Eles são fundamentais para você ter uma compreensão total de como seu bot irá desempenhar de fato, evitando surpresas desagradáveis.
Siga em frente e boa sorte.
1
u/eggrally Jun 01 '26
Test it with real money
1
u/BottleInevitable7278 Jun 01 '26 edited Jun 02 '26
There is a serious bug for sure when I see your stats. Check your data and for ANY sort of bias.
If this does not help check at least the last 30 trades individually and manually against the data.
1
u/PleasantSomewhere990 Jun 01 '26
Walk-forward plus costs and slippage would be the first thing I’d stress test
0
u/LatterRain5 Jun 03 '26
What was this backtest trading? A stock? Crypto? Is it a swing or intraday trade?
The emotional and psychological part of you, looking at realistic outputs, would have questioned the strategy if u have started in 2010 and reaching 2017. In real life u would have ditched the edge by then.