Machine Learning for Stock & Crypto Trading


Project objectives

Develop an algorithm utilizing Machine Learning to analyze stock and cryptocurrency markets to gain an edge in trading.

Project description

I am studying Machine Learning for Stock & Crypto Trading. This course focuses on applying Machine Learning techniques to financial data using Python.

Unsupervised Learning:

  1. Hidden Markov Model for Market Regimes
  2. Clustering(KMeans, AgglomerativeClustering, DBSCAN)
  3. Principle Component Analysis(Dimensionality Reduction)

Supervised Learning:

  1. Bitcoin Price Move Prediction(test: f1 score 0.67)
  2. Deep Learning Binary Classification(acc 0.5, needs improvement)
  3. Deep Learning Sequential Data(so far the model demonstrates low predictive ability)

Reinforcement:

  1. PPO Sine Wave Agent
  2. Agent for Trading AAPL

Tasks

  1. Implement data extraction methods for retrieving stock and cryptocurrency data;
  2. Apply Hidden Markov Models to identify hidden market states and regimes;
  3. Develop algorithms for pairs trading using K-Means Clustering to group similar assets;
  4. Utilize statistical methods like Cointegration and Z-score to assess the profitability of pairs trading strategies.
  5. Implement Principal Component Analysis (PCA) to distill useful information from technical indicators for predicting the VIX.
  6. Train XGBOOST models to make future predictions on Bitcoin price data.
  7. Evaluate model performance using accuracy, precision, recall, and F1 score metrics on test data.
  8. Develop an AI model to trade using Reinforcement Learning algorithms (PPO).
  9. Test the model on historical data and evaluate its performance.
  10. Set up an error handling system to provide alerts if issues or errors occur during trading.
  11. Implement additional features such as cryptocurrency volatility analysis to enhance trading strategies.
  12. Fine-tune models and algorithms based on performance feedback to improve trading outcomes.

Project Status:

Tuning a Reinforcement Learning agent to trade the stocks completely by itself without any prompt for selecting positions.

Skills and Tools:

  • Data extraction
  • Python
  • Pandas
  • NumPy
  • PyTorch
  • Scikit-learn
  • Financial trading concepts (pairs trading, market efficiency)
  • Machine Learning concepts (unsupervised, supervised, reinforcement learning)