[ 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 - LiquidityResearch-0001 · 5 min
  2. Volatility Estimators for TradingResearch-0002 · 4 min
  3. Uses of Volatility and Current Volatility - VIX1DResearch-0003 · 5 min
  4. Volatility Targeting in PythonResearch-0004 · 7 min
  5. Stochastic Processes - Random WalksResearch-0005 · 11 min
  6. Price Discovery & Arbitrage Pricing TheoryResearch-0006 · 6 min
  7. Limit Order Book - Aggregated Market LiquidityResearch-0008 · 11 min
  8. Quantitative Models and Algorithmic ExecutionResearch-0009 · 11 min
  9. Central Banks and Monetary Policy in PythonResearch-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 PipelineResearch-0011 · 11 min
  2. Zipline, Backtesting in Python 2: My First Data AnalysisResearch-0012 · 3 min
  3. Alpha Factors and Alpha Trading in PythonResearch-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 ArcticDBResearch-0019 · 15 min
  2. Big Data Management. 2 - First Lines of CodeResearch-0020 · 9 min
  3. Big Data Management 3 - Building a Datalake on the Nasdaq with ArcticDB.Research-0021 · 5 min
  4. Big Data Management 4 - Using the Datalake in ZiplineResearch-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 - 1Research-0013 · 4 min
  2. Python for Trading Course - Part 1: Market Data with OpenBBResearch-0014 · 10 min
  3. Approximately Calculating USD LiquidityResearch-0015 · 5 min
  4. Advanced Financial Report Library in PythonResearch-0016 · 3 min
  5. Impact of Seasonal Factor on US BondsResearch-0017 · 2 min
  6. Your first system in Python: moving-average crossover on SPYResearch-0018 · 7 min
  7. Introduction to Quant ResearchResearch-0023 · 8 min
  8. Seasonality in Python. Searching for Intraday PatternsResearch-0024 · 9 min
  9. Seasonality in Python II - BacktestingResearch-0025 · 8 min
  10. Seasonality in Python III - Statistics on TradingResearch-0026 · 13 min
  11. Intraday Seasonality IV - Field SearchResearch-0027 · 7 min
  12. QAStats V3 ReleasedResearch-0028 · 2 min

[ 02 ]Systems

Libraries and repositories

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

SYS-04Coming soonPython

Nowcasting

Estimating the present from high-frequency data before the official figures are published. Coming soon to the lab.

[ 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
IN [01]python
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")