

Buy anything from 5,000+ international stores. One checkout price. No surprise fees. Join 2M+ shoppers on Desertcart.
Desertcart purchases this item on your behalf and handles shipping, customs, and support to Brazil.
Leverage machine learning to design and back-test automated trading strategies for real-world markets using pandas, TA-Lib, scikit-learn, LightGBM, SpaCy, Gensim, TensorFlow 2, Zipline, backtrader, Alphalens, and pyfolio. Purchase of the print or Kindle book includes a free eBook in the PDF format. Key Features Design, train, and evaluate machine learning algorithms that underpin automated trading strategies Create a research and strategy development process to apply predictive modeling to trading decisions Leverage NLP and deep learning to extract tradeable signals from market and alternative data Book Description The explosive growth of digital data has boosted the demand for expertise in trading strategies that use machine learning (ML). This revised and expanded second edition enables you to build and evaluate sophisticated supervised, unsupervised, and reinforcement learning models. This book introduces end-to-end machine learning for the trading workflow, from the idea and feature engineering to model optimization, strategy design, and backtesting. It illustrates this by using examples ranging from linear models and tree-based ensembles to deep-learning techniques from cutting edge research. This edition shows how to work with market, fundamental, and alternative data, such as tick data, minute and daily bars, SEC filings, earnings call transcripts, financial news, or satellite images to generate tradeable signals. It illustrates how to engineer financial features or alpha factors that enable an ML model to predict returns from price data for US and international stocks and ETFs. It also shows how to assess the signal content of new features using Alphalens and SHAP values and includes a new appendix with over one hundred alpha factor examples. By the end, you will be proficient in translating ML model predictions into a trading strategy that operates at daily or intraday horizons, and in evaluating its performance. What you will learn Leverage market, fundamental, and alternative text and image data Research and evaluate alpha factors using statistics, Alphalens, and SHAP values Implement machine learning techniques to solve investment and trading problems Backtest and evaluate trading strategies based on machine learning using Zipline and Backtrader Optimize portfolio risk and performance analysis using pandas, NumPy, and pyfolio Create a pairs trading strategy based on cointegration for US equities and ETFs Train a gradient boosting model to predict intraday returns using AlgoSeek's high-quality trades and quotes data Who this book is for If you are a data analyst, data scientist, Python developer, investment analyst, or portfolio manager interested in getting hands-on machine learning knowledge for trading, this book is for you. This book is for you if you want to learn how to extract value from a diverse set of data sources using machine learning to design your own systematic trading strategies. Some understanding of Python and machine learning techniques is required. Table of Contents Machine Learning for Trading – From Idea to Execution Market and Fundamental Data – Sources and Techniques Alternative Data for Finance – Categories and Use Cases Financial Feature Engineering – How to Research Alpha Factors Portfolio Optimization and Performance Evaluation The Machine Learning Process Linear Models – From Risk Factors to Return Forecasts The ML4T Workflow – From Model to Strategy Backtesting (N.B. Please use the Look Inside option to see further chapters) Review: Built My First Successful Trading Bot - As someone who's been interested in both machine learning and financial markets, I was looking for a comprehensive resource that would bridge these two worlds. Stefan Jansen's "Machine Learning for Algorithmic Trading" not only delivered on this promise but exceeded my expectations by enabling me to build my own profitable algorithmic trading bot. What sets this book apart is how it provides a complete end-to-end workflow. The progression from basic concepts to advanced implementation is logical and thorough. Jansen starts with essential market data handling, moves through feature engineering techniques, and culminates in sophisticated model development and backtesting. The Python code examples using popular libraries like pandas, scikit-learn, and PyTorch provided immediate practical value rather than just theoretical concepts. I particularly appreciated the diverse range of ML techniques covered - from traditional algorithms to deep learning approaches. The sections on feature engineering and alpha factor research were especially valuable for my trading bot development. The book doesn't just teach you algorithms; it shows you how to apply them meaningfully to extract signals from market data. The inclusion of backtrader and Zipline for strategy testing was instrumental in helping me validate my ideas before risking real capital. I was able to iterate on my strategies, identify weaknesses, and refine my approach using the framework provided in the book. While the book is certainly dense at 800+ pages, it serves as both a learning resource and a reference manual. I continue to revisit specific chapters as I enhance my trading strategies. Even with some prior knowledge in both programming and finance, I found tremendous value in Jansen's comprehensive approach. One small caveat: some of the code examples require updating as libraries evolve, but the core concepts remain solid and adaptable. In fact, working through these updates enhanced my understanding of the underlying systems. Bottom line - this book delivered exactly what I needed: the knowledge and tools to transform my interest in ML and markets into a functioning algorithmic trading system. For anyone serious about applying machine learning to trading, this book is an essential investment that can potentially pay for itself many times over. Review: Great book, nice examples. - The book overall is very didactic, my only recommendation would be to use a more simple set up as many of the recommended tools and libraries are outdated, not the author’s fault but renders impossible to follow some of the examples. A more simple set of standard libraries, perhaps could be more stable and allow to follow better the presented examples.














| Best Sellers Rank | #74,856 in Books ( See Top 100 in Books ) #7 in Financial Engineering (Books) #10 in Machine Theory (Books) #43 in Python Programming |
| Customer Reviews | 4.4 out of 5 stars 413 Reviews |
R**L
Built My First Successful Trading Bot
As someone who's been interested in both machine learning and financial markets, I was looking for a comprehensive resource that would bridge these two worlds. Stefan Jansen's "Machine Learning for Algorithmic Trading" not only delivered on this promise but exceeded my expectations by enabling me to build my own profitable algorithmic trading bot. What sets this book apart is how it provides a complete end-to-end workflow. The progression from basic concepts to advanced implementation is logical and thorough. Jansen starts with essential market data handling, moves through feature engineering techniques, and culminates in sophisticated model development and backtesting. The Python code examples using popular libraries like pandas, scikit-learn, and PyTorch provided immediate practical value rather than just theoretical concepts. I particularly appreciated the diverse range of ML techniques covered - from traditional algorithms to deep learning approaches. The sections on feature engineering and alpha factor research were especially valuable for my trading bot development. The book doesn't just teach you algorithms; it shows you how to apply them meaningfully to extract signals from market data. The inclusion of backtrader and Zipline for strategy testing was instrumental in helping me validate my ideas before risking real capital. I was able to iterate on my strategies, identify weaknesses, and refine my approach using the framework provided in the book. While the book is certainly dense at 800+ pages, it serves as both a learning resource and a reference manual. I continue to revisit specific chapters as I enhance my trading strategies. Even with some prior knowledge in both programming and finance, I found tremendous value in Jansen's comprehensive approach. One small caveat: some of the code examples require updating as libraries evolve, but the core concepts remain solid and adaptable. In fact, working through these updates enhanced my understanding of the underlying systems. Bottom line - this book delivered exactly what I needed: the knowledge and tools to transform my interest in ML and markets into a functioning algorithmic trading system. For anyone serious about applying machine learning to trading, this book is an essential investment that can potentially pay for itself many times over.
S**R
Great book, nice examples.
The book overall is very didactic, my only recommendation would be to use a more simple set up as many of the recommended tools and libraries are outdated, not the author’s fault but renders impossible to follow some of the examples. A more simple set of standard libraries, perhaps could be more stable and allow to follow better the presented examples.
R**)
A good book with improvement scopes
A promising book with plenty of room for improvement. While there are some noticeable typos, the overall reading experience is enjoyable. A more refined and updated version, perhaps a third edition, would enhance its appeal significantly.
F**S
Other reviewers leave me wondering if they actually read the book
For example, yes all of the photos are black and white. However in the preface there's very clear instruction on where you can find the color versions (PDFs in the github repo, for those who eschew prefaces) and if you intend to use any of the Python code that goes along with this tome, you'll see the color versions can often also be found in the Jupyter notebooks - a fact frequently referenced in the first two chapters. Second, getting python environments up and running smoothly is, unfortunately, rarely a very easy task. This is certainly not exclusive to this particular use case. If I had any complaint at all about the book, it's that it is overly thorough so you may find yourself slogging through some tedium as you begin. It's not broken up in a way that easily allows for skipping ahead (at least not for my prior knowledge set). In the first couple chapters I've found I've needed - on average - every other paragraph and that the subject matter is the source of the dryness, not the author's use of language; which so far has been smooth and flows far more gracefully than my own. I will update after more extensive use of the author's code.
L**F
Thorough and lots of supplmentary material
Haven't fully read, but it's great that the author offers a free pdf through the publisher and through his personal git page. Hope to apply this material soon.
A**A
The math theory before Python code is fantastic!
What I love about this book is that it delves into light math theory before diving into the Python code. This book is good for someone with a intermediate Python background and machine learning or finance knowledge. From there, this book will help fill in the gaps. I highly recommend this book!
B**E
Missing colors
Content is great yet book printed in grayscale making all plots/charts unreadable.
R**R
Very informative book
I enjoyed this book b/c it was very informative. It helped me to understand machine learning better and when and where it could be useful. I recommend this book to anyone who wants to learn more about machine learning and how to apply it.
M**A
plazo de entrega fatal
El libro muy bien, pero el plazo de entrega muy mal. Hice la compra porque me aseguraron que llegaba un dÃa y llegó 3 dÃas más tarde a pesar de ser una compra Prime.
G**M
La référence!
C'est le top absolu!
X**Y
An Essential Masterpiece for the Modern Quant — The Gold Standard for ML in Finance
Machine Learning for Algorithmic Trading" by Stefan Jansen is, without a doubt, a 5-star resource. It stands out as a rare masterpiece that successfully bridges the gap between rigorous academic theory and practical, hands-on application. Stefan has created a desk reference that everyone in the quantitative finance space needs to own. What sets this book apart is its holistic approach: * The Triad of Learning: It seamlessly integrates complex mathematical theory, deep machine learning concepts, and production-ready Python code. * Deep Dives: It doesn't just scratch the surface; it offers a profound exploration of both the mechanics of ML models and the nuances of algorithmic trading strategies. A Note on Timing: The only observation worth noting is the timeline. With the first edition published in 2018 and the second in 2020, the content predates the explosive rise of the modern Generative AI and Transformer revolution (GPT-3, LLMs, etc.). While these topics are touched upon, the landscape has shifted so drastically that they now warrant a dedicated volume of their own. The Verdict: Despite the rapid evolution of NLP since 2020, the foundational knowledge regarding time-series analysis, decision trees, and strategy backtesting remains timeless and best-in-class. It leaves one burning question: Stefan, is a 3rd Edition in the works? We would love to see your take on the Transformer revolution in finance. It is incredibly rare to find a resource that balances Theory, Math, and Code so perfectly. Stefan doesn't just explain how to run a model; he explains why it works mathematically and how to apply it to actual market data.
S**S
Fantastic read
Initially - I thought it would be a book that would touch the basics only. I was very pleasantly surprised. Fantastic read and highly recommended high quality content
M**T
Overhyped book
Book is quite over-hyped. Writing style is poor. Unstructured long sentences made the message lost in between. Very hard to follow what authors is trying to say. Some good information about trading domain is given. It is better to follow a trading book & ML book separately.
Trustpilot
3 days ago
3 weeks ago