Chapter progress
Earlier chapters taught you how to read markets and manage positions; Chapter 10 (System Integration) teaches software t
Continue this course
01 · Quant Toolchain
Next lesson · 15 · Quant Practice
Earlier chapters taught you how to read markets and manage positions; Chapter 10 (System Integration) teaches software teams how to build trading systems. This chapter lands on the plainest spot between the two — how an individual trader who knows some code can actually run the full pipeline of data → backtest → strategy → (compliant) automation from scratch.
Practical and individual-focused: every article ships runnable Python examples and assumes no production infrastructure. It complements Chapter 10 (the team engineering perspective): that one covers system architecture and engineering red lines, this one covers pragmatic trade-offs on your own machine.
Disclaimer: All content on this site is for learning and research only and does not constitute investment advice. Markets are risky; invest with caution.
Arm yourself first: why Python is the primary language and when C++/Rust actually matter; which segment each core library (pandas/TA-Lib/backtrader, etc.) covers; how to divide work among Anaconda, venv, Jupyter, and scripts. Includes a free-vs-paid data source comparison table, a standard research directory layout, and git versioning for reproducibility. Ends by exposing the three pitfalls every beginner hits: time zones, data alignment, and look-ahead bias.
Data is the foundation of quant research. This article provides three directly runnable data-fetching snippets — China A-shares (AKShare/Tushare), futures (dominant contracts), and crypto (Binance klines with rate-limit handling); explains suspended days, missing values, and the trade-offs of forward/backward/no adjustment; then covers daily incremental updates, CSV/SQLite storage choices, and the "cross-check against market software" data quality method, closing with usage limits of free APIs and data licensing reminders.
Run through the minimal backtest loop — load data → generate signals → simulate fills → compute performance — with one complete runnable Python script (dual moving average, including fee and slippage parameters). Covers signal-to-fill timing assumptions, engine choice boundaries (write it yourself vs backtrader vs vn.py), how annualized return/max drawdown/Sharpe ratio/win rate are computed, and how to read equity curves and drawdowns. Uses "5/20 beating 3/17 says nothing about the future" as a first encounter with backtest overfitting, plus the in-sample/out-of-split research workflow.
From backtest to live trading, compliance and engineering are the two hurdles. This article first maps the compliance boundaries of individual automation (China A-share programmatic-trading registration, per-exchange risk controls in crypto, offshore broker API restrictions — subject to the latest regulations), then gives the full crypto spot playbook: API key permissions, order placement, rate limits and weights, WebSocket market data with reconnection, VPS deployment and logging. It faces the reality that China brokers do not open APIs to individuals, offers the "signal push + manual execution" semi-automatic route, and closes with key security and monitoring checklists.
Five complete strategy examples, from simple to advanced: dual moving average trend, Bollinger Band mean reversion, RSI overbought/oversold, crypto grid trading, and a statistical arbitrage prototype (cointegration and pairs). Each includes core logic, code snippets, applicable markets and risks, plus "parameters and boundaries" — when it fails and what failure looks like. Ends with combining low-correlation strategies to reduce drawdowns, the reality that quant is "20% code, 80% maintenance", and a personal roadmap: week 1 → month 1 → month 3 → small capital → continuous iteration.
① 01-Quant Toolchain (set up environment and tools)
↓
② 02-Data Acquisition (get clean data first)
↓
③ 03-Your First Backtest (run the minimal loop)
↓
④ 05-Strategy Coding (expand your strategy library)
↓
⑤ 04-Live Automation (read compliance before code)
⚠️ Risk Warning
Quant does not mean guaranteed profit. Passing a backtest ≠ profitable live trading; once automation goes live, strategy decay, API changes, key leaks, or extreme markets all cause real losses. All code and strategy descriptions here are for learning and research only and do not constitute investment advice; any automation touching real money should be verified long-term with minimal capital after fully understanding the risks and completing compliance checks.
量化实战篇 · 随堂测
3 concept questions · instant grading
Build a sufficient, low-friction quant research toolchain for the individual programmer and run the research loop at minimal cost.
Hands-on data fetching across China A-shares, futures, and crypto — cleaning and incremental storage that turns data from 'fetchable' to 'trustworthy'.
A complete runnable Python script covering the minimal backtest loop — data, signals, fill simulation, performance — plus your first real understanding of overfitting.
The compliance boundaries of personal automation, a complete crypto spot playbook, and the semi-automatic 'signal alert + manual execution' route for China A-shares.
Five complete strategy examples from simple to advanced: dual moving average, Bollinger Bands, RSI, grid trading, and a statistical arbitrage prototype.
🤖 AI Chapter Summary
Next chapter →
26 · Data Interpretation in Practice
The market publishes data every single day: CPI, Nonfarm Payrolls, PMI, central bank decisions, earnings reports, indust