[ 01 ]Reading path

Recommended reading order

Welcome to the Python for Trading resources page. Here you will find all published articles, organized by category and in the recommended reading order. Each category covers a fundamental area of quantitative trading with Python.

We start with theoretical foundations: volatility, liquidity, stochastic processes and monetary policy. Then we move to backtesting with Zipline, followed by big data management with ArcticDB, and we close with tools and practices for the day-to-day work.

All articles include Python code, SVG diagrams, mathematical formulas and practical examples. This list is constantly updated as new articles are published.

CAT-019 reports

Theoretical foundations

Volatility, liquidity, stochastic processes and monetary policy. The starting point for understanding markets from a quantitative perspective.

  1. Introduction to Volatility - LiquidityDOC-0001 · 5 min
  2. Volatility Estimators for TradingDOC-0002 · 4 min
  3. Uses of Volatility and Current Volatility - VIX1DDOC-0003 · 5 min
  4. Volatility Targeting in PythonDOC-0004 · 7 min
  5. Stochastic Processes - Random WalksDOC-0005 · 11 min
  6. Price Discovery & Arbitrage Pricing TheoryDOC-0006 · 6 min
  7. Limit Order Book - Aggregated Market LiquidityDOC-0008 · 11 min
  8. Quantitative Models and Algorithmic ExecutionDOC-0009 · 11 min
  9. Central Banks and Monetary Policy in PythonDOC-0010 · 14 min

CAT-023 reports

Backtesting with Zipline

Strategy backtesting with Zipline, the most emblematic Python engine for algorithmic trading, and the first analyses on a data bundle.

  1. Zipline in Python - Part 1: Quant Stack and PipelineDOC-0011 · 11 min
  2. Zipline, Backtesting in Python 2: My First Data AnalysisDOC-0012 · 3 min
  3. Alpha Factors and Alpha Trading in PythonDOC-0007 · 5 min

CAT-034 reports

Big data with ArcticDB

Big data management for trading with ArcticDB: from the introduction to a Nasdaq datalake integrated with Zipline.

  1. Big Data Management. 1 - Introduction to Big Data for Trading with ArcticDBDOC-0019 · 15 min
  2. Big Data Management. 2 - First Lines of CodeDOC-0020 · 9 min
  3. Big Data Management 3 - Building a Datalake on the Nasdaq with ArcticDB.DOC-0021 · 5 min
  4. Big Data Management 4 - Using the Datalake in ZiplineDOC-0022 · 5 min

CAT-0412 reports

Tools and practice

Docker, OpenBB, seasonality, quant research and reporting. What the quantitative trader needs day to day.

  1. The Working Environment - 1DOC-0013 · 4 min
  2. Python for Trading Course - Part 1: Market Data with OpenBBDOC-0014 · 10 min
  3. Approximately Calculating USD LiquidityDOC-0015 · 5 min
  4. Advanced Financial Report Library in PythonDOC-0016 · 3 min
  5. Impact of Seasonal Factor on US BondsDOC-0017 · 2 min
  6. Python Trading Course: Learn Algorithmic Trading from ScratchDOC-0018 · 7 min
  7. Introduction to Quant ResearchDOC-0023 · 8 min
  8. Seasonality in Python. Searching for Intraday PatternsDOC-0024 · 9 min
  9. Seasonality in Python II - BacktestingDOC-0025 · 8 min
  10. Seasonality in Python III - Statistics on TradingDOC-0026 · 13 min
  11. Intraday Seasonality IV - Field SearchDOC-0027 · 7 min
  12. QAStats V3 ReleasedDOC-0028 · 2 min

[ 02 ]Systems

Libraries and repositories

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

SYS-01LibraryPython

QAStats

Pandas-based reporting library for portfolios and strategies: performance and risk metrics, drawdowns and factsheets. Built on empyrical and pyfolio.

v3.0.1 · 2 stars

[ 03 ]Resources

Chart style

ppt-dark.mplstyle applies the site tokens to matplotlib: black background, grey axes and grid, light grey text and series in bone, blue, orange and amber. It is the style of the report figures.

ppt-dark.mplstyle · Matplotlib · Plain text

Download ppt-dark.mplstyle
import matplotlib.pyplot as plt
import numpy as np

# Site style: from the published URL or from a local copy of the file
plt.style.use("https://pythonparatrading.com/ppt-dark.mplstyle")

rets = np.random.default_rng(7).normal(0.0004, 0.01, size=(252, 4))
equity = (1 + rets).cumprod(axis=0)

fig, ax = plt.subplots()
ax.plot(equity)
ax.set_title("Equity curves")
fig.savefig("equity.png")