Python for trading — quantitative research: Trading ideas you can run.

Backtesting, market microstructure, volatility and market big data, explained with the code of every research.

Research-0029: Finite-State Machines (FSM) for Trading in Python, 47 minGet every research by email

[ Course ]8 levels · 269 lessons · No sign-up

Learn to trade with code

Enter the Python Trading Course

[ 01 ]Research

Latest research

LatestResearch-002947 min

Finite-state machines for execution

How to model strategy execution and the order lifecycle with finite-state machines in Python, with tests.

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 LangGraph.

Fig. — Execution states and transitions with kill switch (illustrative)

Research-00282 min

QAStats V3 Released

We are excited to announce the release of QAStats V3, with new features and improvements for quantitative analysis.

Portfolio

Research-00277 min

Field Search

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 / QuantSeries 4/4

Research-002613 min

Trade statistics

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.

Quant / Algorithms / SeasonalitySeries 3/4

Research-00258 min

Backtesting

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 your algorithms before applying them to the real market

Algorithms / Models / SeasonalitySeries 2/4

Research-00249 min

Preprocessing and intraday patterns

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 are going to create a complete method, reusable in the future, to be able to run it

Algorithms / Seasonality / QuantSeries 1/4

Archive

29

research since 2023

29 research articles with code and data, from backtesting to microstructure.

Full archive

[ 02 ]Archive · 29 research · 2023 → 2026

Topic map

Each dot is one research article, oldest to newest. Pick a topic to filter.

All topics
+ 7 topics with 1–2 research · View all

Earlier

10 of 23

  1. Research-0023 ·

    Introduction to Quant Research
  2. Research-0022 ·

    Big Data Management 4 - Using the Datalake in Zipline
  3. Research-0021 ·

    Big Data Management 3 - Building a Datalake on the Nasdaq with ArcticDB.
  4. Research-0020 ·

    Big Data Management. 2 - First Lines of Code
  5. Research-0019 ·

    Big Data Management. 1 - Introduction to Big Data for Trading with ArcticDB
  6. Research-0018 ·

    Your first system in Python: moving-average crossover on SPY
  7. Research-0017 ·

    Impact of Seasonal Factor on US Bonds
  8. Research-0016 ·

    Advanced Financial Report Library in Python
  9. Research-0015 ·

    Approximately Calculating USD Liquidity
  10. Research-0014 ·

    Python for Trading Course - Part 1: Market Data with OpenBB
Complete archive

[ 03 ]Systems

Lab

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