One way to access that is testing the algorithm on past market data. Here, I do just that.
Stock Market Analysis
- Use API to pull stock data
- Methods to analyze stock data
- Crossover trading concept
- Backtest crossover trading strategy
Crossover algorithm trading periods |
While this Notebook follows another blog post, I made significant changes to the code and added better visualizations.
Stock Trading Algorithm Testing
- Test the Crossover trading algorithm on all the stocks in the S&P 500
- Analyze results
Return ratio of holding stock vs algorithm for S&P 500 stocks |
Crossover algorithm often exceeding hold when hold results in loss |
Disclaimer: This is in no way financial advice. I am not a financial adviser. This post and code were done as a data analysis exercise only.
No comments:
Post a Comment