A savings plan algorithm tided up for the QuantConnect University - buying $1000 of S&P500 every month and letting the strategy run over time. Its shown pretty phenomenal returns the last few years. We automatically set the cash to be $1000 per month traded.

Author