Written in Python | Empowered by QuantConnect (Not an advertisement!)
This is neither an advocate nor a promotion for retail trading, nor QuantConnect. I am not a certified finance professional. Trading losses can exceed initial deposits, and one should seek the advice of a certified professional even before opening an account.
Using QuantConnect's LEAN Engine, I created a simple implementation of an EMA Crossover Strategy for trading the SPY Index. From 1 Jan 2008 to 31 July 2019, its performance was as follows:
Some Key Stats | Result |
---|---|
Total Trades: | 73 |
Compounding Annual Return: | 6.635% |
MaximumDrawdown: | 21.000% |
Net Profit: | 111.587% |
Sharpe Ratio: | 0.46 |
Alpha: | 0.059 |
Beta: | 0.038 |
Annual Standard Deviation: | 0.136 |
Annual Variance: | 0.019 |
A more detailed breakdown of the results can be found here.