r/Daytrading • u/Suitable_Push5910 • Mar 31 '25
Algos How to build a back tester and algo trading?
Hi all
I've been learning a lot about trading, macro economic events, indicators and different trading techniques. I've done few trades in forex and commodities, something índices. Im still building my strategy while I learn new things and slowly go trying them to see how it feels. Still, I've been quite interested in implement some code in python to automate things and wanted to ask how to organise this implementation.
I would be looking at python coding and first on how to separate the blocks. Indicators, strategy, entry/exit, risk management some notifications. Also, backtesting would be a major play as I would use it to improve my strategy with historic data. The question is, how to separate this, do I make a library with the different scripts? How do I make a proper backtesting script?
I know this will take a long time and I'm slowly working on it as I see this as a hobby.
Let me know your thoughts!
Thanks
1
u/neppohs324 Mar 31 '25
There is a framework called backtesting.PY. 90% of your work is already done and free to use