Hi! Many, many, many years ago, I implemented a backtest engine in Python for my master’s degree… it’s an event-driven engine (they are slower than the vector-based engines but imho they are easier to write strategies for, understand and debug) with all blows and whistles, similar to the late Zipline. In fact, I tried most of the Python backtest engines that exist, and that’s why I prefer to use what I built over the years: I have 100% understanding of what’s happening and 100% control.
Thanks for sharing. Loved the simplicity so much I had to recreate it, and had fun whipping it up.
Here's my implementation for QQQ from Jan'99 - Jul'24, written using QuantConnect.
Some discrepancies, likely due to differences in data and entry timing. I was surprised to see such a difference in the sharpe calculation though... not sure what to make about that one.
1. Interactive Results (with code and performance statistics):
Hello,
What backtesting platform are you using to run your backtest on? Is it something custom built or are you using any framework?
Thank you
Isak
Hi! Many, many, many years ago, I implemented a backtest engine in Python for my master’s degree… it’s an event-driven engine (they are slower than the vector-based engines but imho they are easier to write strategies for, understand and debug) with all blows and whistles, similar to the late Zipline. In fact, I tried most of the Python backtest engines that exist, and that’s why I prefer to use what I built over the years: I have 100% understanding of what’s happening and 100% control.
Thanks for sharing. Loved the simplicity so much I had to recreate it, and had fun whipping it up.
Here's my implementation for QQQ from Jan'99 - Jul'24, written using QuantConnect.
Some discrepancies, likely due to differences in data and entry timing. I was surprised to see such a difference in the sharpe calculation though... not sure what to make about that one.
1. Interactive Results (with code and performance statistics):
https://www.quantconnect.com/terminal/processCache/?request=embedded_backtest_ad0d3d439e42ea6dee2edde358c38ace.html
2. Report with additional stats against QQQ hold benchmark comparison:
https://www.quantconnect.com/reports/ad0d3d439e42ea6dee2edde358c38ace
3. Report with additional stats against SPY hold benchmark comparison:
https://www.quantconnect.com/reports/bda3d6baab0de972f303f9339e8fb18b
Super nice work! Thx for sharing