Skip to content

Commit 1fc3d22

Browse files
authored
Merge pull request #14 from Open-Quant/feat/oq-ojp-notebook-workflow-docs
Add docs-site notebook-first workflow page and links
2 parents 1e79569 + fe30aff commit 1fc3d22

4 files changed

Lines changed: 85 additions & 0 deletions

File tree

docs-site/src/layouts/Layout.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const nav = [
1414
{ href: `${base}/module`, label: "Module Pages" },
1515
{ href: `${base}/api-reference`, label: "API by Subject" },
1616
{ href: `${base}/examples`, label: "Examples by Subject" },
17+
{ href: `${base}/notebook-research-workflow`, label: "Notebook Workflow" },
1718
{ href: `${base}/coverage`, label: "Coverage" },
1819
{ href: `${base}/performance`, label: "Performance" },
1920
{ href: `${base}/publishing`, label: "Publishing" },

docs-site/src/pages/examples.astro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
---
22
import Layout from "../layouts/Layout.astro";
3+
const base = import.meta.env.BASE_URL.endsWith("/")
4+
? import.meta.env.BASE_URL.slice(0, -1)
5+
: import.meta.env.BASE_URL;
36
---
47
<Layout title="Examples • OpenQuant-rs" description="Practical OpenQuant-rs examples for quant workflows.">
58
<section class="hero">
69
<h1>Examples by Subject</h1>
710
<p class="muted">Examples follow the same five subject dividers used in the index, subjects, and API pages.</p>
11+
<p>
12+
Promotion path and controls:
13+
<a href={`${base}/notebook-research-workflow`}>Notebook-First Research Workflow</a>.
14+
</p>
815
</section>
916

1017
<h2>1. Event-Driven Data and Labeling</h2>

docs-site/src/pages/getting-started.astro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
import Layout from '../layouts/Layout.astro';
3+
const base = import.meta.env.BASE_URL.endsWith("/")
4+
? import.meta.env.BASE_URL.slice(0, -1)
5+
: import.meta.env.BASE_URL;
36
---
47
<Layout title="Getting Started • OpenQuant-rs">
58
<section class="hero">
@@ -57,6 +60,10 @@ cargo test -p openquant --test structural_breaks test_sadf_test -- --ignored</co
5760
</table>
5861

5962
<h2>First Quant Workflow</h2>
63+
<p>
64+
For notebook-first strategy research and promotion criteria, see
65+
<a href={`${base}/notebook-research-workflow`}>Notebook-First Research Workflow</a>.
66+
</p>
6067
<pre><code class="language-rust">use openquant::risk_metrics::RiskMetrics;
6168

6269
let returns = vec![-0.02, 0.01, 0.015, -0.01, 0.005];
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
import Layout from "../layouts/Layout.astro";
3+
---
4+
<Layout
5+
title="Notebook Research Workflow • OpenQuant-rs"
6+
description="Notebook-first research workflow for OpenQuant-rs with reproducibility and leakage controls."
7+
>
8+
<section class="hero">
9+
<h1>Notebook-First Research Workflow</h1>
10+
<p class="muted">
11+
Promotion path from exploratory notebook to reproducible candidate strategy,
12+
aligned with <code>docs/research_workflow.md</code>.
13+
</p>
14+
</section>
15+
16+
<h2>Promotion Path</h2>
17+
<ol>
18+
<li>Exploratory notebook in <code>notebooks/python/*.ipynb</code>.</li>
19+
<li>
20+
Scripted experiment in <code>experiments/run_pipeline.py</code> with a TOML
21+
config.
22+
</li>
23+
<li>
24+
Artifact and parity checks in <code>python/tests/test_experiment_scaffold.py</code>.
25+
</li>
26+
<li>
27+
Candidate decision recorded as <code>decision.md</code> in the run artifact
28+
directory.
29+
</li>
30+
</ol>
31+
32+
<h2>Local Commands</h2>
33+
<pre><code class="language-bash"># setup
34+
uv venv --python 3.11 .venv
35+
uv sync --group dev
36+
uv run --python .venv/bin/python maturin develop --manifest-path crates/pyopenquant/Cargo.toml
37+
38+
# notebook logic smoke
39+
uv run --python .venv/bin/python python notebooks/python/scripts/smoke_all.py
40+
41+
# reproducible experiment run
42+
uv run --python .venv/bin/python python experiments/run_pipeline.py --config experiments/configs/futures_oil_baseline.toml --out experiments/artifacts
43+
44+
# parity + scaffold tests
45+
uv run --python .venv/bin/python pytest python/tests/test_experiment_scaffold.py -q</code></pre>
46+
47+
<h2>Leakage and Reproducibility Checklist</h2>
48+
<ul>
49+
<li>Use event-based sampling and leakage-safe validation paths.</li>
50+
<li>Keep deterministic seeds and config-hashed run directories.</li>
51+
<li>Report gross and net metrics with turnover and cost estimates.</li>
52+
<li>Require statistical and economic gates before promotion.</li>
53+
<li>
54+
Confirm leakage checks pass: <code>inputs_aligned</code> and
55+
<code>event_indices_sorted</code>.
56+
</li>
57+
<li>
58+
Artifact bundle includes <code>manifest.json</code>, parquet outputs, and
59+
<code>decision.md</code>.
60+
</li>
61+
</ul>
62+
63+
<h2>Anti-Patterns</h2>
64+
<ul>
65+
<li>Random CV splits on overlapping financial labels.</li>
66+
<li>Promoting on gross-only metrics without cost accounting.</li>
67+
<li>Notebook-only logic that cannot be reproduced from config.</li>
68+
<li>Hidden mutable state across notebook cells.</li>
69+
</ul>
70+
</Layout>

0 commit comments

Comments
 (0)