---
title: "Python For Trading: algorithmic and quantitative trading"
description: "Algorithmic trading and quantitative research with Python: backtesting, market microstructure, volatility and market data, with code you can run."
url: "https://pythonparatrading.com/en/"
lang: "en"
image: "https://pythonparatrading.com/og/en/index.png"
---

# Python For Trading

> Algorithmic trading and quantitative research with Python: backtesting, market microstructure, volatility and market data, with code you can run.

**Python for trading — quant models and algorithmic trading.** Quantitative research in Python. Code you can run. Backtesting, market microstructure, volatility and market big data, one research at a time.

## Latest research

- [Finite-State Machines for Quantitative Trading Execution in Python: From Knight Capital to LangGraph](https://pythonparatrading.com/en/finite-state-machines-trading-python/) · 2026-07-28 — The Knight Capital disaster was a state failure. How to model strategy execution and the order lifecycle with finite-state machines in Python: guards, kill switch, cooldown, transition testing, and the bridge to…
- [QAStats V3 Released](https://pythonparatrading.com/en/qastats-v3-released-2/) · 2025-04-15 — We are excited to announce the release of QAStats V3, with new features and improvements for quantitative analysis.
- [Intraday Seasonality IV - Field Search](https://pythonparatrading.com/en/seasonality-intraday-optimization/) · 2025-04-14 — In this installment, we expand the backtester to use it as a broad-spectrum search engine to find seasonal edges. We run a backtest on all the necessary parameters to analyze the intraday seasonality of the asset
- [Seasonality in Python III - Statistics on Trading](https://pythonparatrading.com/en/seasonality-intraday-statistics/) · 2025-04-10 — In this article, we analyze the Sharpe ratio, Value at Risk (VaR), Conditional Value at Risk (CVaR), the System Quality Number (SQN), and other relevant ratios to analyze the backtest.
- [Seasonality in Python II - Backtesting](https://pythonparatrading.com/en/seasonality-intraday-backtesting/) · 2025-04-08 — Discover how to identify intraday seasonal patterns in futures and validate trading strategies through backtesting. Learn to use Python to analyze historical data, optimize parameters, and evaluate the performance of…
- [Seasonality in Python. Searching for Intraday Patterns](https://pythonparatrading.com/en/seasonality-intraday-preprocessing/) · 2025-04-07 — After a long period completely disconnected, we return to writing some notes for you. On this occasion, we are going to program from scratch a complete research process, and instead of going for a specific asset, we…

[Full archive](https://pythonparatrading.com/en/research/) · 29 reports

## Series

Multi-part reports, in reading order.

- [Big Data Management](https://pythonparatrading.com/en/series/big-data-management/) · 04/04 parts — A market datalake with ArcticDB in Python, from scratch to a Zipline backtest on the stored data.
- [Seasonality in Python](https://pythonparatrading.com/en/series/seasonality-in-python/) · 04/04 parts — Intraday patterns in futures. Preprocessing, backtesting, trade statistics and optimization.
- [Zipline in Python](https://pythonparatrading.com/en/series/zipline-in-python/) · 02/02 parts — Backtesting in Python with zipline-reloaded: quant stack, pipeline and a first backtest; data bundles, analysis with pandas and a Backtrader comparison.

## Topics

- [Quant](https://pythonparatrading.com/en/tag/quant/) · 8 reports — Quant research, systematic strategies and quantitative modeling.
- [Algorithms](https://pythonparatrading.com/en/tag/algorithms/) · 6 reports — Trading algorithms and automated execution in Python.
- [Big Data](https://pythonparatrading.com/en/tag/big-data/) · 6 reports — Big data for trading: data lakes, ArcticDB and financial data management.
- [Liquidity](https://pythonparatrading.com/en/tag/liquidity/) · 5 reports — Market liquidity, order book and microstructure in trading.
- [ArcticDB](https://pythonparatrading.com/en/tag/arcticdb/) · 4 reports — ArcticDB for financial big data and data lake management in Python.
- [Microstructure](https://pythonparatrading.com/en/tag/microstructure/) · 4 reports — Market microstructure, order book and aggregate liquidity.
- [Models](https://pythonparatrading.com/en/tag/models/) · 4 reports — Quantitative models for trading and algorithmic execution.
- [Seasonality](https://pythonparatrading.com/en/tag/seasonality/) · 4 reports — Seasonality in financial markets and time-based patterns.
- [Volatility](https://pythonparatrading.com/en/tag/volatility/) · 4 reports — Volatility: estimators, models and trading applications.
- [Portfolio](https://pythonparatrading.com/en/tag/portfolio/) · 3 reports — Portfolio management and quantitative asset allocation.
- [Stochastic Processes](https://pythonparatrading.com/en/tag/stochastic-processes/) · 2 reports — Stochastic processes, random walks and Brownian motion in Python.
- [Zipline](https://pythonparatrading.com/en/tag/zipline/) · 2 reports — Zipline for backtesting quantitative strategies in Python.
- [Alpha Factor](https://pythonparatrading.com/en/tag/alpha-factor/) · 1 report — Alpha factors and alpha trading models for quantitative strategies.
- [Arbitrage](https://pythonparatrading.com/en/tag/arbitrage/) · 1 report — Arbitrage and price discovery in financial markets.
- [Market Neutral](https://pythonparatrading.com/en/tag/market-neutral/) · 1 report — Market-neutral strategies and quantitative risk management.
- [Order Book](https://pythonparatrading.com/en/tag/order-book/) · 1 report — Order book, aggregate liquidity and market microstructure.
- [Price Discovery](https://pythonparatrading.com/en/tag/price-discovery/) · 1 report — Price discovery and arbitrage in financial markets.

## Lab

QUANTARMY public code on GitHub: what the reports use, packaged for reuse.

- [QAStats](https://pythonparatrading.com/en/lab/qastats/) · Library · Python · v3.0.1 — Pandas-based reporting library for portfolios and strategies: performance and risk metrics, drawdowns and factsheets. Built on empyrical and pyfolio.
- [Datalake](https://pythonparatrading.com/en/lab/datalake/) · Library · Python · v5.1 — NoSQL S3 datalake on ArcticDB: ingestion from several market data sources, Alpha Vantage included, and a management CLI.
- [Quantstack](https://pythonparatrading.com/en/lab/quantstack/) · Repository · Jupyter Notebook — Research and backtesting environment in one container: Docker, Debian, conda, JupyterLab, zipline-reloaded and ArcticDB.
- Nowcasting · Coming soon · Python — Estimating the present from high-frequency data before the official figures are published. Coming soon to the lab.

[Open the lab](https://pythonparatrading.com/en/lab/)

## Pages

- [Research](https://pythonparatrading.com/en/research/) — Every report, newest first.
- [Paths](https://pythonparatrading.com/en/paths/) — What reads best in order, grouped into paths. The rest, standalone and by date.
- [Series](https://pythonparatrading.com/en/series/) — Multi-part reports, in reading order.
- [Lab](https://pythonparatrading.com/en/lab/) — Reading path, systems and tools. What sits behind the reports.
- [Newsletter](https://pythonparatrading.com/en/newsletter/) — One email per published report. Quantitative research in Python, with the code and data to reproduce it.
- [About](https://pythonparatrading.com/en/about/)
- [Contact](https://pythonparatrading.com/en/contact/)
- [Disclaimer](https://pythonparatrading.com/en/disclaimer/)
- [RSS](https://pythonparatrading.com/en/rss/)
