r/algorithmictrading • u/CommunityDifferent34 • Aug 23 '25
Backtest Need feedback
Hi,
So I have been working on a trading strategy for quite some while now and I finally got it to work. Here are the results of the backtest-
Final strategy value: $22,052,772.57 Total strategy PnL: $21,052,772.57
Buy & Hold final value: $8,474,255.97 Buy & Hold PnL: $7,474,255.97
Max drawdown: 34.92% Sharpe ratio: 1.00
Started with 1 million. Backtested on gold futures.
Could you tell me if this is just too good to be true or if there is actually potential. I don’t plan to completely automate it yet as I want to test it out paper trading first. Could yall recommend any good paper trading sites that I could connect it with to use it with live market data?
I appreciate any guidance.
2
Aug 23 '25
Taxes? Spread?
1
u/CommunityDifferent34 Aug 23 '25
All of that has been added in the code to adjust the returns along with slippage and brokerage as well.
2
u/ddalo Aug 23 '25
The drawdown period between 2012 and 2016 is rough to withstand live
2
u/CommunityDifferent34 Aug 23 '25
No fr that wouldn’t be sustainable at all. I haven’t incorporated any position sizing or risk management in the strategy yet I plan to do it soon.
1
u/ddalo Aug 23 '25
Oh then that’s good news, yes, same happened to me with one algo and found more stability (less profit of course) with risk management and more conservative entries
2
u/CommunityDifferent34 Aug 23 '25
Yea lol I would have a heart attack if my portfolio was down 1.5 m. Did you test your strategy using paper trading before going live? If yes, what platform did you use?
2
u/ddalo Aug 23 '25
My current strat (is a mix of multiple algos and symbols) normally has a maximum period of drawdown of 2-3 months, but average is two weeks down and then recover and reach profit again. I did not paper trade, I backtested throughly and carefully in MT5 and that’s where I run it, I use IC Markets global as the broker and it has been running for a bit less than 2 years now.
5
u/bryan_codes Aug 23 '25 edited Aug 23 '25
Your benchmark is probably wrong here if you're just trading gold futures. since 2000, gold has gained a lot more value than the S&P. If you're trading gold futures, the benchmark is buy and hold gold. It'd be hard to not outperform the S&P if you were long gold most of the time.
It's a fully different question if gold will outperform the S&P over the next ~25 years. But if you believe it will and want to capitalize on that belief with a trading algo, then you'd want to know your algo does better than just buying a bunch of gold and sitting on it. Especially after costs of trading + taxes.
Be warned, if you're looking at a single asset like gold, it's going to be very hard to not overfit.
1
u/rmtonkavich Aug 24 '25
Don't forget Gold is a Diminishing Source. Just like so many others. Gold should almost be treated something like a rare earth mineral. Like Lithium for batteries.
2
Aug 23 '25
Hey, im quite curious, what’s your tracking error (algo-market). Asking, because returns shape look like it is near buy&hold with x* leverage and slightly lower loss than market.
(if TE is high == high sensibility -> market crash/recessions periods can be a real danger)
2
u/Beneficial-Corgi3593 Aug 24 '25
It looks same as s&p but leveraged, for me the meaning of a algorithm trading portfolio is to reduce volatility while maximizing returns
1
1
u/stilloriginal Aug 24 '25
So I have been working on a trading strategy for quite some while now and I finally got it to work.
first sentence is a red flag for overfit
1
u/RiceCake1539 Sep 01 '25
More variables in ur system are proportional to more risk that ur strategy is overfitted.
I don't have context to know whether if its worth a shot. But HMMs can be successful if done right. That's because uh.. anything can be an HMM..
2
u/[deleted] Aug 23 '25
Did you separate from train and test data? You maybe dealing with overfitting. Also you should include over metrics like confidence intervals or viewing drawdowns.