QuantWeftYuxiao Ma
中文
On this page

Notebook guide

Local formal edition (2026-10-19): the complete English body and workbook PDFs for Chapters 1–45, Projects 1–6, and the Capstone have been independently accepted; the shared code, runner, and dependencies sit at this package root and were cold-started in an isolated directory with the commands on this page (scope in Validation scope). This is the authorized local formal edition; it has not been published externally, and real-market research has not been run.

Create one shared environment at the final package root. Language views change Markdown only: 54 logical implementations do not become 108 numerical implementations. The project declares Python≥3.12; its lock binds the historically checked macOS arm64 / CPython 3.14.7 environment, not every 3.12+ platform. Installation may require a network; default teaching execution is offline. The commands on this page were run as written in a fresh environment in an isolated directory; results are in Validation scope.

The 45 chapter and nine project Notebooks form 54 logical implementations, each with two Markdown language views. Each pair retains identical code, outputs, execution_count, cell metadata and Notebook metadata. Eight previously accepted project views retain their bytes; 98 new views and two existing views with repaired guide links change Markdown only. See the cell-level identity.

Start the same environment inside the shared root and run each Notebook in order. Switching language views in one kernel is not an independent experiment. Unique RUN_DIR values prevent overwrites, but a created directory need not contain business outputs. Seeds bind a specific call order; CLI and Notebook values need not match when RNG consumption differs. Some plot/print labels remain Chinese; English Markdown explains essential labels, inputs and units without changing executable text or claiming recomputation.

Actual default mode by Notebook

Entry Inputs, computation and outputs
ch01_lifecycle Fresh one-period gross/net return and cash-weight arithmetic; save one constructed gross/net plot.
ch02_python Fresh price returns, alignment and rolling/expanding/shift/rank/groupby examples; save one constructed plot; French fences do not execute.
ch03_data Fresh split/dividend/revision/DST and clock-field examples; save one constructed figure; no market data.
ch04_calculus Compute derivatives, gradients, Hessians and finite differences; save new constructed figures under RUN_DIR.
ch05_linear_algebra Fresh covariance quadratic form, eigen/rank/condition/solve and training-only SVD-PCA; save one new figure.
ch06_probability Fresh fixed-seed LLN/CLT/random-walk/Poisson simulation and four PNGs; CLT includes 30,000 sample means.
ch07_statistics Fresh intervals, t test, conjugate update, three sets of 3,000 coverage simulations and 4,000 IID/block bootstrap draws each; save one new plot.
ch08_regression Fresh 400-row constructed OLS/HAC/collinearity, regularization on 280 training rows with five folds and a 120-row holdout; save one plot; French disabled.
ch09_optimization Solve constructed QP, least squares and LP; inspect feasibility residuals and display a frozen objective plot without saving a new one.
ch10_markets Fresh dividend, coupon, FX, futures, option and repo arithmetic; save one new event diagram.
ch11_returns Fresh compounding and drawdown; French metrics, dashboard and old-QA comparisons remain nonexecuting fences; no new figure.
ch12_statements Recalculate fixed SEC filing rows and constructed PIT/capitalization examples; display two frozen figures without regenerating them.
ch13_valuation Fresh two-company valuation, DCF and constructed PIT, plus fixed Apple filing arithmetic; display two frozen figures.
ch14_asset_pricing Fresh four-row constructed CAPM/beta and two plots; French 120-month regression disabled.
ch15_factor_models Fresh 120-month shared-factor CAPM/FF3/FF5 and HAC; save coefficients CSV, summary.json and three figures.
ch16_time_series Fresh 480-month IID/AR(1), expanding fits after 360 months; display a frozen ACF plot, no new files; French disabled.
ch17_time_series_ii Fresh ADF/EG mechanisms and VAR fitted on 100 of 120 months; one frozen constructed plot; French 45-pair screen skipped.
ch18_volatility Fresh RV/recursions and a 360-observation path saved as constructed_simulation.csv; no four historical figures; French skipped.
ch19_state_space Fresh scalar/bivariate filtering and fixed-seed latent states; save constructed_latent.csv and constructed_filter.csv; display two frozen plots; no estimation or smoothing.
ch20_portfolio_theory Fresh portfolio moments/GMV/tangency/domain checks and two.png/frontier.png; separately display two frozen constructed figures; French windows disabled.
ch21_portfolio_construction Fresh LW/ERC/BL/Kelly, neutrality and drift-turnover calculations; no new figures/data; historical gallery skipped.
ch22_research_methodology Fresh plan hash, six-attempt ledger/five-p adjustment, 32 variants and 60 null/60 alternative worlds; no business files.
ch23_cross_sectional_research Fresh IC/ranks/weights/FM, a 300×180 panel and overlap VIF; French skipped; no files.
ch24_value_factors Fresh valuation, industry ranks, two clocks and 300×108 panel with specified effects; historical HML skipped.
ch25_momentum Fresh 12–1 endpoints, six-asset CS/three-asset TS and turnover; historical J×K/crash branches skipped; no new files.
ch26_quality Fresh quality metrics/panel; stability includes 100,000 short-sample repetitions and two 400,000-observation constructions; RMW skipped.
ch27_carry_lowrisk Fresh carry/BAB, 100-seed beta noise, one FX world plus 60 sensitivity worlds and commodity mechanisms; no historical French.
ch28_multifactor Fresh preprocessing, ordering, missingness, leakage, combination, tuning and constraints; French gallery skipped; no new files.
ch29_backtest_engine Fresh four-date cash ledger and split/delisting/bankruptcy boundaries; RUN_DIR created without business-result files.
ch30_backtest_biases Fresh 36-stock/522-business-day world; repeated ledgers for eight biases and search; French skipped; no new files.
ch31_model_validation Fresh purge/embargo, single-seed 20-asset/500-day validation and nested fitting; save one purge plot.
ch32_performance_statistics Fresh six-period metrics, PSR/DSR, six CSCV splits and 200 null strategies; create directory without business files.
ch33_risk_management Fresh constructed risk, ledger scenarios and model backtest; save ch33_results.json and four PNGs with French=False.
ch34_market_microstructure Fresh quotes, depth and static sweeps; save one new plot; constructed mechanisms provide no market tick evidence.
ch35_execution_ledger_constructed 100-share parent with two 40-share fills; save constructed_ledger.json and one PNG.
ch36_implementation_shortfall_constructed Same-parent four-part IS decomposition; save constructed_is.json and one PNG; no full AC optimization.
ch37_ml_philosophy Fresh ten-day example, 100,000-day overlap, 3×200 maximum-Sharpe draws and regimes; one new plot; RNG consumption differs from CLI.
ch38_ml_pipeline Fresh constructed pipeline, label-boundary and fitting/calibration diagnostics; one plot; positive-direction interpretation remains conditional.
ch39_regularized_models Replay frozen summaries/audits and two figures without training; missing row predictions and common-date paired evidence remain absent.
ch40_tree_models Fresh four-round boosting/second-round check, seven models on the 5× signal panel and two figures; no full CLI grid.
ch41_unsupervised Fresh hand/PCA examples, 3,000-period state path and 50 seeds 4200–4249 with two plots; potentially substantial compute.
ch42_deep_learning Fresh mechanisms, Ridge selection/MLP training, six ledgers and five figures; not complete C01/C02.
ch43_bayesian_text Fresh formulas, 120-row PIT selection, hashes and text mechanisms; replay text-prediction summary and five figures; no refitting or LLM.
ch44_stochastic_derivatives Fresh small MC/direct 1×12 hedge and three figures; RNG consumption differs from CLI; no full grids.
ch45_production_quant One normal constructed scenario, SQLite/core artifacts and one plot; no complete recovery/idempotency suite.
project01_financial_data_analysis Seed 101 creates 180 months/three return columns plus RF; save return CSV and one plot; descriptive windows; no French.
project02_factor_regression Seed 102 creates 120 shared-factor months/one asset; save three coefficient CSVs and one residual plot; check reconstruction, not variance decomposition.
project03_portfolio_oos 48 months/four assets, 24-month training and 24 OOS months for four strategies; save metrics CSV, four ledgers and one plot; no historical bootstrap.
cost_execution_lab Fresh frozen-volume, fixed-parent and partial/zero-fill examples; replay accepted current-signal summary; two new display plots; no full P4.
p04_signal_layer Fresh constructed rules, filing versions, signals and counterexamples; save one diagnostic figure; no real-company PIT.
p05_pairs Fresh three-pair gated/ungated main route and one plot; x is fill_date, y is z from prior signal_date; no full grid.
p05_screening Fresh 30 null and 30 selected worlds with one plot; French 45-pair historical windows disabled.
p06_baseline Replay ch39/P6 frozen summaries/audits; no training or new row predictions; separate fresh CLI is outside scope.
p06_trees_v2 Replay v2 summaries/date bases and draw one new display figure; fit skipped; separate CLI has its own protocol.

Chapters 26, 30, 31, 38 and 40–42 may incur repeated simulations, fits or ledgers; no unmeasured runtime is promised. Chapter 39/P6 replay does not train, Chapter 43 makes no LLM call, and Chapter 45 covers the normal path rather than the recovery suite. P4’s 13 half-hour labels are 09:30–15:30 UTC slot starts, with fills at +15 minutes and terminal mark at 16:00:30. In the P5 pairs plot, the fill_date x-axis differs from the prior signal_date underlying the plotted z.

The default route is offline. French raw, extracted and processed data are not bundled. G01’s actual legal entity, purpose and rights remain unknown; G05 has not authorized A10-B. A10-A has limited design acceptance and A10-A.1 technical protocol acceptance, neither market-execution permission. Public availability does not establish research-use or redistribution rights. Do not download market data to run these Notebooks or label constructed replacements as missing historical market inputs.

Historical acceptance of Projects 1–3 binds its original version and scope, not stock-level PIT or tradability. Projects 4–6 retain their recorded market-research blocks and evidence gaps; constructed method checks cannot close them. Chapter 39’s historical row predictions and common-date paired evidence remain missing, without fabrication or retraining. Fixed summaries and figures replay their original records rather than new verification. Retain all negative and zero results; unknown or blocked does not mean a zero effect.

Optional data · Validation scope · Curriculum

Search the course

Enter a search term.