https://blog.mathquant.com/2019/03/29/backtesting-a-forecasting-strategy-for-the-sp500-in-python-with-pandas.html
Backtesting a Forecasting Strategy for the S&P500 in Python with pandas