Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: JOSS draft PDF
on:
push:
paths:
- paper/**
- .github/workflows/draft-pdf.yml
workflow_dispatch:

jobs:
paper:
runs-on: ubuntu-latest
name: Paper draft
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
Comment on lines +16 to +18
journal: joss
paper-path: paper/paper.md
- name: Upload
uses: actions/upload-artifact@v4
with:
name: paper
path: paper/paper.pdf
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,21 @@ subprojects/Parametric-Indicators/optimize/orb/data/grid1/orb_book_*.csv

# runtime caches (wiped after any box/data change; never tracked)
.wsenv/tmp/

# ---- local-only root files (never publish; #226 curation 2026-09-01) ----
/scratch/
/outreach-drafts/
/keys.env
*.ovpn
/openvpn.log
/vpn_connect.sh
/vpn_kill.sh
/code
/data/
/logs/
/node_modules/
/__pycache__/
/combined_ledger.csv
/l2_ledger(3).csv
/last levels*.zip
/x.md
7 changes: 5 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ authors:
given-names: Mulham
orcid: "https://orcid.org/0009-0006-4432-798X"
email: contact@mulhamfetna.com
version: 5.7.0
date-released: "2026-08-31"
version: 5.7.1
date-released: "2026-09-01"
license: AGPL-3.0-or-later
doi: "10.5281/zenodo.21473312"
identifiers:
Expand All @@ -23,6 +23,9 @@ identifiers:
- type: doi
value: "10.5281/zenodo.22161256"
description: "The v5.6.0 version DOI (2026-08-29)."
- type: doi
value: "10.5281/zenodo.22212233"
description: "The v5.7.0 version DOI (2026-08-31)."
- type: doi
value: "10.5281/zenodo.21473313"
description: "The v5.0.0 version DOI."
Expand Down
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Contributing

Contributions are welcome — issues and pull requests both. This project has an unusual operating
contract, so please read two documents before writing code:

1. **[`AGENTS.md`](AGENTS.md)** — the working rules of this repository (branch/PR flow, worktree
discipline, verification duties). They apply to human and AI contributors alike.
2. **The verification standard:** every published number in this project is a claim in the ledger
(`subprojects/Parametric-Indicators/optimize/verify/`). If your change alters a published
number, the corresponding claim and its committed evidence must change in the same PR — CI
replays the full ledger and will reject silent divergence.

## The short version

- **Open an issue first** describing what you intend to change; work happens on a
`feat/<issue>-<slug>` branch and lands via PR into `dev` (integration), then `main`.
- **Tests must pass without market data.** The engine suite runs green on a fresh clone
(`cd subprojects/Parametric-Indicators && pytest`); data-dependent tests skip themselves. Price
data are never committed — the pipeline runs against a user-supplied feed.
- **CI is the gate:** byte-compile, import smoke, engine-parity (fast vs exact engines must agree
trade-for-trade), and the claims-ledger replay are required checks on `dev` and `main`.
- **Research contributions** (new studies, strategy families, instruments) additionally follow the
pre-registration discipline: design filed before results are computed, negatives carry power
analyses, positives carry dumb controls and noise checks. See `docs/` for filed examples.

## License

By contributing you agree that your contributions are licensed under
[AGPL-3.0-or-later](LICENSE).
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@ modelling, and a discipline of pre-registered, power-analysed, cross-instrument-
| `subprojects/Parametric-Indicators/` | **The current engine** — box-strategy backtester, the fast (numpy) + exact engines (parity-locked), the optimizer, the L2 layer, the dashboard, and the golden regression gate (`perf/`). |
| `subprojects/Parametric-Indicators/docs/superpowers/` | The research reports — every verdict, discovery, and honest retraction (news "priced in", gap-aware fills, the Asia-cell fluke, …). |
| `subprojects/Parametric-Indicators/DAILY_REPORTS.md` | The running standup. |
| `docs/` | Workflow proposals and long-form references. **`docs/POSITIONING.md`** — where this work sits in the field, rung by rung, each cell linked to its evidence; `docs/POSITIONING-AUDIT-2026-08-29.md` — the measured audit behind it. |

| `docs/` | Workflow proposals and long-form references. Era-expired documents are kept under era-labelled names (e.g. `START-HERE-2026-08-legacy18-onboarding.md`) and `docs/archive/` — historical record, not current instructions. **`docs/POSITIONING.md`** — where this work sits in the field, rung by rung, each cell linked to its evidence; `docs/POSITIONING-AUDIT-2026-08-29.md` — the measured audit behind it. |
| `src/deploy/` | **The live deployment layer** — the news-release executor (`release_executor.py`, v5.3.0–v5.4.2), the deployed power-forecast model (`power_forecast.py`, v5.4.3), the regime monitor and its schedule. The only code that touches an account. Covered by the 157-test root suite. |
| `deploy_out_d3/`, `deploy_out_d4/` | **Live output directories** of the deployment layer (events/results per instrument). Written by `src/deploy/` — do not move or rename. |
| `src/api|data|optimization|strategy/`, `scripts/`, `templates/` | **The frozen v1-era stack** (May 2026): the original API, data pipeline, optimizer and strategy code plus its two prep scripts and dashboard template. Frozen — no new work lands here — but still wired together and covered by the root test suite, so it stays runnable. |
| `frontend/` | **The v1-era dashboard UI** (Vue + Vite, frozen May 2026; `npm install && npm run dev`, backend = `src/api`). The current research dashboard lives in the engine, not here. |
| `tests/` | The root suite (157 tests): `src/` incl. the live deploy layer + workflow guards. Green without market data. |
| `playbooks/` | The champion playbooks (37 PDFs) + the portable backtest bundle that reproduces them. |
| `paper/` | The JOSS software paper (`paper.md` + `paper.bib`); compiled by the "JOSS draft PDF" action. |
| `subprojects/Parametric-Indicators/shareable/`, `server-audit/` | **Snapshots, not live code** — hand-off bundles and the harvested server archive (#94). Each carries its own README saying so. |

The frozen **v1.x** era (`src/main/`) is preserved under the `v1.0.0` / `v1.0-working` tags.
The **v1.x era** is preserved two ways: the tagged releases `v1.0.0` / `v1.0-working`, and the frozen
v1 stack above (kept importable and test-covered rather than deleted).

## Two tiers of reproducibility (read this before judging the numbers)

Expand Down Expand Up @@ -103,10 +109,10 @@ per release via Zenodo (badge above).

```
Fetna, M. (2026). Trading Strategy Finder: a reproducible quantitative-analysis framework for futures
trading-strategy discovery and validation (Version 5.6.0) [Software]. Zenodo.
https://doi.org/10.5281/zenodo.22161256
trading-strategy discovery and validation (Version 5.7.0) [Software]. Zenodo.
https://doi.org/10.5281/zenodo.22212233
```

Cite the **version you actually used** (the DOI above is v5.6.0). To cite the project in general — always
Cite the **version you actually used** (the DOI above is v5.7.0). To cite the project in general — always
resolving to the newest release — use the concept DOI **`10.5281/zenodo.21473312`**. Every version DOI is
listed in [`CITATION.cff`](CITATION.cff).
4 changes: 4 additions & 0 deletions deploy_out_d3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# deploy_out_d3/ — LIVE output directory (do not move or rename)

Written by the deployed layer in `src/deploy/` (per-instrument events + results). The path is
referenced by deployed code; contents are runtime artifacts of the live/paper deployment.
4 changes: 4 additions & 0 deletions deploy_out_d4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# deploy_out_d4/ — LIVE output directory (do not move or rename)

Written by the deployed layer in `src/deploy/` (per-instrument events + results). The path is
referenced by deployed code; contents are runtime artifacts of the live/paper deployment.
2 changes: 1 addition & 1 deletion docs/DATA-AND-KNOWLEDGE-MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ decision-TF CSV, 1m CSV, box CSV (`optimize/data.py::load_inputs`).
| deployed champion set `best` (+ `incumbent`/`eod`) | `subprojects/Parametric-Indicators/optimize/results/{best,cap1p,eod1p}_champions_full[_<TOK>].json` — ⚠️ `*.csv` there are gitignored |
| golden gate (NQ 6/6 byte-identical anchors) | `subprojects/Parametric-Indicators/perf/check_golden.py` |
| claims ledger (67/67) | `subprojects/Parametric-Indicators/optimize/verify/` (`run.py`, `claims_*.py`) |
| news calendar + release stamps (WS-NEWS2+) | `subprojects/Parametric-Indicators/optimize/fundamentals/data/` (+ `DATA_REQUEST_release_timestamps_2010_2026.csv` at repo root) |
| news calendar + release stamps (WS-NEWS2+) | `subprojects/Parametric-Indicators/optimize/fundamentals/data/` (+ `docs/DATA-REQUEST-2026-07-13-release_timestamps_2010_2026.csv`) |
| earnings acceptance stamps / E-S1 dataset | `subprojects/Parametric-Indicators/optimize/earnings/data/` |
| XNI / fusion / forward evidence | `optimize/xni/data/`, `optimize/fundamentals/*_result*`, `optimize/fwd/data/` (54 books, gate JSON, 54 screenshots) |
| deployed forecast layers + artifacts | `src/deploy/{power_forecast,two_calendar_forecast,regime_monitor}.py`; playbooks + bundles under `playbooks/` |
Expand Down
5 changes: 5 additions & 0 deletions DATA_REQUEST.md → docs/DATA-REQUEST-2026-07-13-FULFILLED.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
> 🗄️ **HISTORICAL (2026-07-13) — REQUEST FULFILLED.** The 16-year 1-second/1-minute tape this
> document asks for was acquired (server-only since 2026-08-22). Kept as the record of what was
> requested and why; moved from the repo root 2026-09-01 (#226). Companion CSV:
> `DATA-REQUEST-2026-07-13-release_timestamps_2010_2026.csv`.

# DATA REQUEST — what to download, and exactly why

**Date:** 2026-07-13 · For: Mulham · From: the fundamental-analysis workstream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ workstream: legacy-18-baseline (CLOSED 2026-08-23 — merged to main, single roo
branch: dev (feature branches → dev → main)
---

> 🗄️ **HISTORICAL (era: Aug 2026, legacy18/single-root migration).** Moved from the repo root
> 2026-09-01 (#226): the migration it onboards for is complete and its instructions are superseded.
> For current onboarding read `README.md` + `AGENTS.md`; for data locations `docs/DATA-AND-KNOWLEDGE-MAP.md`.


# START HERE — the project onboarding (single root since 2026-08-23)

> ⚠️ **Data location changed 2026-08-22:** market data lives ONLY on the server (`~/Mulham/wsg-i`, `~/Mulham/data_2010_1s`); the local checkout has NO data trees. Authoritative map: `docs/DATA-AND-KNOWLEDGE-MAP.md`.
Expand Down
6 changes: 6 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frontend/ — v1-era dashboard UI (FROZEN, May 2026)

The original Vue 3 + Vite dashboard of the v1 stack (`npm install && npm run dev`; backend =
`src/api/app.py`). Frozen since 2026-05-26 — no new work lands here; kept runnable as part of the
preserved v1 era (see the root README's "What's here"). The **current** research dashboard lives in
`subprojects/Parametric-Indicators/` and is served from the compute server.
73 changes: 73 additions & 0 deletions paper/paper.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
@article{bailey2014pseudo,
author = {Bailey, David H. and Borwein, Jonathan M. and L{\'o}pez de Prado, Marcos and Zhu, Qiji Jim},
title = {Pseudo-mathematics and financial charlatanism: The effects of backtest overfitting on out-of-sample performance},
journal = {Notices of the American Mathematical Society},
volume = {61},
number = {5},
pages = {458--471},
year = {2014},
doi = {10.1090/noti1105}
}

@article{harvey2016cross,
author = {Harvey, Campbell R. and Liu, Yan and Zhu, Heqing},
title = {{\ldots} and the cross-section of expected returns},
journal = {Review of Financial Studies},
volume = {29},
number = {1},
pages = {5--68},
year = {2016},
doi = {10.1093/rfs/hhv059}
}

@article{white2000reality,
author = {White, Halbert},
title = {A reality check for data snooping},
journal = {Econometrica},
volume = {68},
number = {5},
pages = {1097--1126},
year = {2000},
doi = {10.1111/1468-0262.00152}
}

@misc{backtrader,
author = {Rodr{\'i}guez, Daniel},
title = {backtrader: Python backtesting library for trading strategies},
year = {2015},
url = {https://github.com/mementum/backtrader}
}

@misc{zipline,
author = {{Quantopian, Inc. and contributors}},
title = {Zipline: a Pythonic algorithmic trading library},
year = {2012},
url = {https://github.com/quantopian/zipline}
}

@misc{vectorbt,
author = {Polakow, Oleg},
title = {vectorbt: getting into the vectorized backtesting},
year = {2019},
url = {https://github.com/polakowo/vectorbt}
}

@inproceedings{optuna,
author = {Akiba, Takuya and Sano, Shotaro and Yanase, Toshihiko and Ohta, Takeru and Koyama, Masanori},
title = {Optuna: A Next-generation Hyperparameter Optimization Framework},
booktitle = {Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
year = {2019},
pages = {2623--2631},
doi = {10.1145/3292500.3330701}
}

@article{nosek2018preregistration,
author = {Nosek, Brian A. and Ebersole, Charles R. and DeHaven, Alexander C. and Mellor, David T.},
title = {The preregistration revolution},
journal = {Proceedings of the National Academy of Sciences},
volume = {115},
number = {11},
pages = {2600--2606},
year = {2018},
doi = {10.1073/pnas.1708274114}
}
Loading
Loading