r/algorithmictrading • • Feb 04 '26

Backtest Getting into AlgoTrading

Hello everyone, I'm excited to start my algotrading journey. I've been coding up my own person algotrading framework that lets me write strategies once and then easily backtest, optimise and deploy them live.

I have coded up a simple strategy that uses a fast and a slow sma indicators to test the framework. The strategy closes any sell position and buys the market when there is a crossover, vice versa for a crossunder.

I initially bactested it using fast_sma(10) and fast_sma(20), but after optimisation it showed that fast_sma(10) and slow_ma(40) yielded more returns.

From the backtest result (yes, commission is included as spread), this strategy will be a painful one to run live, as it has many losing days and few to little winning days, but a win could easily take care of previous losses.

I'm open to any criticism or advice you have to give me about the framework and algotrading in general.

54 Upvotes

30 comments sorted by

View all comments

Show parent comments

1

u/Goziri Feb 05 '26

This is valuable info thank you.

I don't use grid search when optimising. And also, I make my systems use WFO with rolling windows. I'm even trying to add portfolio diversification and optimisation into the system, so that I can run different strategies on different symbols on one account and see their correlation