Staying on the same topic of optimisation that we visited in the last post concerning portfolio holdings and efficient frontiers/portfolio theory, I thought I would quickly revisit the moving average crossover strategy we built a few posts ago; the previous article can be found here.

**Optimisation of Moving Average Crossover Trading Strategy In Python**

In that post we built a quick backtest that had the number of days used for the short moving average and the long moving average hard coded in at 42 and 252 days respectively. This is fine for a preliminary run to test our code and make sure it is running correctly, but what are the chances that those two particular moving average periods generate the highest returns, or highest Sharpe ratio out of all the possible (sensible) variations of moving average periods?