From fe30aff7ad662fb44f06ff2ced31dfa3d2f885c7 Mon Sep 17 00:00:00 2001 From: Sean Koval Date: Fri, 13 Feb 2026 21:16:54 -0500 Subject: [PATCH] Add notebook workflow docs page and navigation links --- docs-site/src/layouts/Layout.astro | 1 + docs-site/src/pages/examples.astro | 7 ++ docs-site/src/pages/getting-started.astro | 7 ++ .../pages/notebook-research-workflow.astro | 70 +++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 docs-site/src/pages/notebook-research-workflow.astro diff --git a/docs-site/src/layouts/Layout.astro b/docs-site/src/layouts/Layout.astro index 2f846e0..205954b 100644 --- a/docs-site/src/layouts/Layout.astro +++ b/docs-site/src/layouts/Layout.astro @@ -14,6 +14,7 @@ const nav = [ { href: `${base}/module`, label: "Module Pages" }, { href: `${base}/api-reference`, label: "API by Subject" }, { href: `${base}/examples`, label: "Examples by Subject" }, + { href: `${base}/notebook-research-workflow`, label: "Notebook Workflow" }, { href: `${base}/coverage`, label: "Coverage" }, { href: `${base}/performance`, label: "Performance" }, { href: `${base}/publishing`, label: "Publishing" }, diff --git a/docs-site/src/pages/examples.astro b/docs-site/src/pages/examples.astro index 921609d..e31c1bf 100644 --- a/docs-site/src/pages/examples.astro +++ b/docs-site/src/pages/examples.astro @@ -1,10 +1,17 @@ --- import Layout from "../layouts/Layout.astro"; +const base = import.meta.env.BASE_URL.endsWith("/") + ? import.meta.env.BASE_URL.slice(0, -1) + : import.meta.env.BASE_URL; ---

Examples by Subject

Examples follow the same five subject dividers used in the index, subjects, and API pages.

+

+ Promotion path and controls: + Notebook-First Research Workflow. +

1. Event-Driven Data and Labeling

diff --git a/docs-site/src/pages/getting-started.astro b/docs-site/src/pages/getting-started.astro index ad1eef0..926e2d6 100644 --- a/docs-site/src/pages/getting-started.astro +++ b/docs-site/src/pages/getting-started.astro @@ -1,5 +1,8 @@ --- import Layout from '../layouts/Layout.astro'; +const base = import.meta.env.BASE_URL.endsWith("/") + ? import.meta.env.BASE_URL.slice(0, -1) + : import.meta.env.BASE_URL; ---
@@ -57,6 +60,10 @@ cargo test -p openquant --test structural_breaks test_sadf_test -- --ignored

First Quant Workflow

+

+ For notebook-first strategy research and promotion criteria, see + Notebook-First Research Workflow. +

use openquant::risk_metrics::RiskMetrics;
 
 let returns = vec![-0.02, 0.01, 0.015, -0.01, 0.005];
diff --git a/docs-site/src/pages/notebook-research-workflow.astro b/docs-site/src/pages/notebook-research-workflow.astro
new file mode 100644
index 0000000..1afadb3
--- /dev/null
+++ b/docs-site/src/pages/notebook-research-workflow.astro
@@ -0,0 +1,70 @@
+---
+import Layout from "../layouts/Layout.astro";
+---
+
+  
+

Notebook-First Research Workflow

+

+ Promotion path from exploratory notebook to reproducible candidate strategy, + aligned with docs/research_workflow.md. +

+
+ +

Promotion Path

+
    +
  1. Exploratory notebook in notebooks/python/*.ipynb.
  2. +
  3. + Scripted experiment in experiments/run_pipeline.py with a TOML + config. +
  4. +
  5. + Artifact and parity checks in python/tests/test_experiment_scaffold.py. +
  6. +
  7. + Candidate decision recorded as decision.md in the run artifact + directory. +
  8. +
+ +

Local Commands

+
# setup
+uv venv --python 3.11 .venv
+uv sync --group dev
+uv run --python .venv/bin/python maturin develop --manifest-path crates/pyopenquant/Cargo.toml
+
+# notebook logic smoke
+uv run --python .venv/bin/python python notebooks/python/scripts/smoke_all.py
+
+# reproducible experiment run
+uv run --python .venv/bin/python python experiments/run_pipeline.py --config experiments/configs/futures_oil_baseline.toml --out experiments/artifacts
+
+# parity + scaffold tests
+uv run --python .venv/bin/python pytest python/tests/test_experiment_scaffold.py -q
+ +

Leakage and Reproducibility Checklist

+
    +
  • Use event-based sampling and leakage-safe validation paths.
  • +
  • Keep deterministic seeds and config-hashed run directories.
  • +
  • Report gross and net metrics with turnover and cost estimates.
  • +
  • Require statistical and economic gates before promotion.
  • +
  • + Confirm leakage checks pass: inputs_aligned and + event_indices_sorted. +
  • +
  • + Artifact bundle includes manifest.json, parquet outputs, and + decision.md. +
  • +
+ +

Anti-Patterns

+
    +
  • Random CV splits on overlapping financial labels.
  • +
  • Promoting on gross-only metrics without cost accounting.
  • +
  • Notebook-only logic that cannot be reproduced from config.
  • +
  • Hidden mutable state across notebook cells.
  • +
+