💥 Download the FREE Data Science Roadmap for 2023 ➡️ http://bit.ly/3ysZjG5
💥 Blog: https://mbel-education.com
💥 Code: https://github.com/martinbel/computat...
---------------------------------------------------------------------------------------------------
In this video I cover how to do Backtesting in Python using only Pandas and the TA-lib.
The idea is to explain the key concepts in backtesting so you have full control and understand what is going on. Using libraries such as backtrader or backtesting.py is simpler but you loose some control of what is going on and they are less flexible to include AI models.
In the long run, I think it pays-off to be able to do backtesting with only a data-frame library such as Pandas.
Timeline
0:00 Why pandas for backtesting?
0:55 Getting the data
2:05 Computing returns
3:10 Using talib to compute indicators
4:03 Strategy logic
7:40 Compute the signal
11:52 Plotting the gross returns
13:14 Compute performance
17:10 Parameter Grid Search
21:26 Heatmap with Strategy Performance
23:20 Expand the parameter grid
25:10 EDA on some strategies