We believe building real strategies is the best way to learn new quant skills, and launch your quantitative trading path. Over the years more than 110,000 people have gone through our Boot Camp series, embracing a hands on training approach. Today, we’re proud to announce our new book focused on building practical AI strategies on QuantConnect - "Hands on AI Trading with Python, QuantConnect, and AWS".

Published by Wiley, the core of the book guides readers on implementing 19 fully baked strategies, walking through AI technology selection, training, and the nuances of executing a well designed algorithmic trading strategy. Each strategy comes with a walk through of how to write the code, a tear sheet for its results, and full color print to help readers understand the code. Some of the examples include:

  • ML Trend Scanning with MLFinlab- Detecting trends in the crypto market.
  • Reversion vs. Trending Tactical Asset Allocation by Classification- Using neural networks to predict whether the next trading day will favor momentum or reversion.
  • Volatility Regimes with Hidden Markov Models- Predicting volatility with HMM.
  • Effect of Positive-Negative Splits- Use multiple linear regression model to estimate future returns surrounding stock splits.
  • Dividend Harvesting- Predict future dividend yields with decision tree regression models based to build a high-yield portfolio.
  • Adaptive Volatility Adjusted Stop Losses Based- Applies a regression models to dynamically adjust stop-loss levels based on market conditions.
  • Head Shoulders Pattern Matching with CNN- Employs a synthetic data and one-dimensional CNN to detect head-and-shoulders trading patterns in forex markets.
  • Stock Selection through Clustering Fundamental Data- Uses PCA and learning-to-rank algorithms to predict relative performance of stocks based on fundamental data.
  • Inverse Volatility Rank and Allocate to Future Contracts- Ridge regression techniques to predict volatility and allocate to low volatility contracts.
  • Trading Costs Optimization- Uses a Decision Tree Regressor to predict trading costs and optimize trade execution timing.
  • Gaussian Classifier for Direction Prediction- Employs Gaussian Naive Bayes classifiers to predict daily returns of the technology sector.
  • LLM Summarization and Sentiment- Generating sentiment scores on news articles using LLM’s for trading decisions.
  • Amazon Chronos Model- Forecasting future price paths and to optimize portfolio weights with the Chronos model.

Beyond the examples, we cover the foundations of capital markets and quantitative trading priming you on the exchange and trading landscape. Other chapters teach you how to choose the right AI tooling for the task, and go into detail about AI risk control in a long form examples. Early reviews call the book "A must-have for algorithmic traders and students, offering a clear and accessible presentation ideal for anyone in quantitative finance."

The book was written in collaboration with four awesome field experts - Jiri Pik, Ernest Chan, Philip Sun, and Vivek Singh. We’re grateful to work with such talented peers, who collectively have decades of experience in quantitative finance and machine learning. We invested roughly one year of work from the entire QuantConnect team. The process of writing the examples pushed us to make improvements to LEAN, including migration to PEP8 for more readable python code.

We’ve pushed a website for the book and an open-source repository with the examples, https://www.hands-on-ai-trading.com. You can browse the example code at its GitHub repository.

Get your copy today on Amazon! And learn how to harness AI in your trading,

Happy Coding,

Jared & QuantConnect Team

Author

Jared Broad

February 2025