
Python for Algorithmic Trading Cookbook: Recipes for designing, building, and deploying algorithmic trading strategies with Python 2nd Edition.
Author(s): Jason Strimpel (Author)
- Publisher Finelybook 出版社: Packt Publishing
- Publication Date 出版日期: July 10, 2026
- Edition 版本: 2nd ed.
- Language 语言: English
- Print length 页数: 536 pages
- ISBN-10: 1806662035
- ISBN-13: 9781806662036
Book Description
Transform financial market data into algorithmic trading strategies and deploy them into a live trading environment with recipes leveraging modern Python libraries like pandas, Polars, and DuckDB
Key Features
- Backtest Python trading strategies with VectorBT and Zipline Reloaded using walk-forward analysis
- Measure risk, performance, and alpha quality with Alphalens Reloaded and PyFolio
- Automate strategy execution with the Interactive Brokers API for live trading
Book Description
Get practical Python code for algorithmic trading from Jason Strimpel, founder of PyQuant News and a veteran of global trading, risk management, and machine learning. This hands-on guide shows you how to turn market data into tested, automated trading strategies using modern Python tools.
You’ll source equities, options, and futures data with OpenBB and FMP, then accelerate Python for data analysis workflows with Pandas, Polars, Parquet, DuckDB, and ArcticDB. You’ll visualize market data with Matplotlib, Seaborn, and Plotly Dash before moving into alpha research and quantitative trading techniques.
Detailed recipes help you engineer alpha factors with PCA, regression, Fama-French models, SciPy, and statsmodels. You’ll design and evaluate quantitative trading strategies using VectorBT, Zipline Reloaded, Alphalens Reloaded, and PyFolio, including walk-forward analysis and risk-aware performance review.
For execution, you’ll connect to the Interactive Brokers API to stream ticks, manage orders, retrieve portfolio state, and monitor live trading workflows. By the end, you’ll have reusable Python templates for researching, backtesting, evaluating, and operating algorithmic trading strategies.
What you will learn
- Acquire equities, futures, and options data using OpenBB and FMP
- Process and analyze time series data efficiently with pandas and Polars
- Store and query massive datasets with ArcticDB, DuckDB, and Parquet
- Visualize trading data using Matplotlib, Seaborn, and Plotly Dash
- Engineer alpha factors using PCA, regression, and Fama-French models
- Backtest strategies with VectorBT and Zipline Reloaded frameworks
- Evaluate performance and risk using Alphalens Reloaded and PyFolio
- Deploy and automate live trades using the Interactive Brokers API
Who this book is for
This book is for traders, investors, and Python enthusiasts who need practical code to acquire, analyze, and automate algorithmic trading strategies using modern, high-performance Python tools. Readers should have some exposure to investing or trading, a basic familiarity with Python syntax, and a basic knowledge of libraries such as Pandas and NumPy. This book is ideal for discretionary traders who want to adopt a systematic approach and apply professional techniques, such as factor modeling, backtesting, and execution automation, to trading workflows using Python.
Table of Contents
- Acquire Free Financial Market Data with Cutting-Edge Python Libraries
- Analyze and Transform Financial Market Data with pandas
- Accelerate Financial Market Data Analysis with Polars and DuckDB
- Visualize Financial Market Data with Matplotlib, Seaborn, and Plotly Dash
- Build a Quantamental Research Database with Hedge Fund Tools
- Conduct Market Research with Advanced AI and Agentic Workflows
- Build Alpha Factors for Stock Portfolios
- Vector-Based Backtesting with VectorBT
- Event-Based Backtesting Factor Portfolios with Zipline Reloaded
- Evaluate Factor Risk and Performance with Alphalens Reloaded
- Assess Backtest Risk and Performance Metrics with Pyfolio
(N.B. Please use the Read Sample option to see further chapters)
Editorial Reviews
Editorial Reviews
About the Author
Jason Strimpel is the founder of PyQuant News, co-founder of Quant Science, and Managing Director of Global AI and Advanced Analytics at a top-tier consulting firm. His 20+ year career spans trading, quant risk, ML, and enterprise data across Chicago, London, and Singapore. At BP, he managed $20B in counterparty credit exposure, then led quant engineering globally for BP’s derivatives book. In Singapore, he led engineering, data science, and analytics at Rio Tinto Commercial, scaling the team behind its $60B commodities trading business. At AWS, he joined the firm’s GenAI operations organization, building internally facing GenAI tools. He holds a Master’s in Quantitative Finance from Illinois Institute of Technology.
finelybook
