An open API service indexing awesome lists of open source software.

https://github.com/bce99/clustertrade

πŸ“ˆAn unsupervised ML algo trading strategy using K-means clustering and EfficientFrontier max sharpe ratio optimization
https://github.com/bce99/clustertrade

algorithmic-trading efficientfrontier k-means-clustering unsupervised-machine-learning

Last synced: 4 months ago
JSON representation

πŸ“ˆAn unsupervised ML algo trading strategy using K-means clustering and EfficientFrontier max sharpe ratio optimization

Awesome Lists containing this project

README

        

## Unsupervised Learning Trading Strategy
* Download/Load SP500 stocks prices data.
* Calculate different features and indicators on each stock.
* Aggregate on monthly level and filter top 150 most liquid stocks.
* Calculate Monthly Returns for different time-horizons.
* Download Fama-French Factors and Calculate Rolling Factor Betas.
* For each month fit a K-Means Clustering Algorithm to group similar assets based on their features.
* For each month select assets based on the cluster and form a portfolio based on Efficient Frontier max sharpe ratio optimization.
* Visualize Portfolio returns and compare to SP500 returns.
## All Packages Needed:
pandas, numpy, matplotlib, statsmodels, pandas_datareader, datetime, yfinance, sklearn, PyPortfolioOpt