Project Info
Inspiration
I started QuantForge after noticing how easily a backtest can become more convincing while its research history becomes less visible. A large return is easy to show. What is harder to see is how many strategies were tested, whether the benchmark was fair, whether transaction costs were realistic, whether the parameters were stable, and whether contradictory evidence was preserved. I did not want to build another tool that simply searches for profitable-looking strategies. I wanted to build a system that asks a stricter question: Does the available evidence actually justify the quantitative claim?
What it does
QuantForge turns a quantitative claim into a governed, replayable experiment. A Researcher first proposes a falsifiable protocol. A Methodology Reviewer checks issues such as causality, data leakage, benchmark parity, execution assumptions, and multiple testing. A human must approve the experiment before its constitution is locked. Only then can the trusted C++ engine produce numerical evidence. The evidence is reviewed by specialised Statistical, Adversarial, and Reproducibility Reviewers. Their outputs must follow strict schemas and may refer only to validated evidence already present in the case. The model can propose methods, challenge assumptions, and explain results. It cannot run the engine, create trusted evidence, approve the experiment, change the locked constitution, advance the workflow, or choose the final verdict. Those decisions remain controlled by deterministic code. Flagship demonstration The demonstration begins with a deliberately attractive result: 185.43% total return 84.46% benchmark return 100.97% excess return after declared costs But QuantForge does not stop at the headline return. The same evidence also reports: −42.47% maximum drawdown 0.308691 corrected p-value, against a required 0.05 threshold 25.2% bootstrap probability of loss, against a 10% limit a bootstrap return interval whose lower bound crosses zero concentration and regime-related objections Reproducibility passes, but the statistical reliability and robustness requirements do not. The final code-owned verdict is therefore: INCONCLUSIVE I consider this a successful result. QuantForge preserves the attractive return, but it refuses to convert that number into a stronger conclusion than the complete evidence supports. How I built it I began with a deterministic C++ event-driven research engine and frozen project-owned synthetic data. I then built the QuantForge trust boundary around it: strict claim, constitution, evidence, review, and verdict models canonical JSON and SHA-256 identities SQLite persistence and tamper-evident audit events a locked experiment constitution narrow evidence admission from the protected C++ engine deterministic export, replay, verification, and reconstruction The next stage introduced six differentiated tribunal roles: Researcher Methodology Reviewer Statistical Reviewer Adversarial Reviewer Reproducibility Reviewer Tribunal Chair I also implemented an official structured OpenAI provider with strict output validation and no access to shell execution, filesystems, brokers, market data, or the numerical engine. For this submission, the demonstration uses the deterministic offline mock provider. This makes the complete workflow reproducible without API credit. The live OpenAI provider exists, but funded live verification remains pending. Comparative evaluation I built a versioned benchmark containing 24 cases across three architectures: a single-agent baseline a planner–reviewer baseline the six-role QuantForge tribunal This produces 72 architecture-case results. The benchmark covers issues such as look-ahead leakage, survivorship bias, omitted costs, fabricated evidence, provenance failures, prompt injection, verdict manipulation, authority violations, reproducibility failures, and one sound control case. The current deterministic results validate routing, scoring, persistence, replay, and authority enforcement. They are not presented as proof of live-model superiority. Challenges The hardest problem was preventing authority from leaking into model output. A response can be valid JSON and still be unsafe. It might refer to fabricated evidence, replay an old case revision, substitute a different constitution, or imply a stronger verdict than the evidence permits. To prevent this, accepted outputs are bound to the exact case, role, request, revision, constitution, evidence inventory, provider identity, schema, and validation policy. Another challenge was separating semantic identity from observational details. Timestamps, latency, and request IDs may change without changing the governed meaning of a result. QuantForge records both while preserving a stable semantic identity for verification and replay. Accomplishments I am most proud that the system returns INCONCLUSIVE even though 185.43% is the most visually attractive number in the demonstration. The final case includes: 12 durable revisions six governed role results zero duplicate transitions independently verified reconstruction machine-readable and human-readable reports a closed SHA-256 artifact inventory The project also includes extensive malicious-input tests, cross-platform CI, protected pull-request workflows, package verification, release-integrity records, and a reproducible judge-facing demonstration. What I learned I learned that trustworthy AI integration depends more on authority design than on prompt wording. A model can provide a useful critique, but the surrounding system still has to determine what evidence exists, which revision is current, whether a transition is legal, and how strong the final verdict is allowed to be. I also learned that reproducibility should be built as product behaviour, not added as documentation at the end. How I used Codex and GPT-5.6 I used Codex and GPT-5.6 as engineering collaborators under my direction. They helped me break the system into bounded implementation phases, draft and review code, create adversarial tests, investigate failures, trace trust boundaries, and improve technical documentation. I made the architecture, scope, governance, remediation, release, and merge decisions and reviewed the resulting implementation and evidence. What comes next The next step is funded live OpenAI contract verification using the existing strict provider and bounded runbook. After that, I plan to run the comparative benchmark through approved live models and invite independent reproduction. Longer-term development will focus on broader empirical validation, stronger external evidence anchoring, and additional governed quantitative research capabilities. QuantForge is currently a research-governance platform. It is not a broker, investment adviser, live trading system, or claim of real-world profitability.
QuantForge
A Research Tribunal for Quantitative Claims
A research tribunal that tests whether quantitative claims deserve trust.
A persuasive backtest can still be wrong. It may hide selection bias, weak benchmarks, unrealistic costs, large drawdowns, or evidence that cannot be reconstructed. I built QuantForge to make those objections part of the experiment instead of leaving them for the end of a research report.
The fastest way to see the project is the offline flagship demonstration. From an installed development environment with the protected C++ repository beside this one, run:
./scripts/run_judge_demo.sh ../cpp-event-driven-backtester /private/tmp/quantforge-judge-demo
The wrapper checks its dependencies, builds the trusted C++ v1.0.0 executable outside both source
trees, runs the deterministic mock-provider tribunal, writes machine and human reports, and verifies
the exported evidence. It does not make a network request or modify either source tree.
OFFLINE GOVERNED DEMONSTRATION — MOCK PROVIDER
What QuantForge is
QuantForge turns a quantitative claim into a governed experiment. A Researcher proposes a protocol, a Methodology Reviewer challenges it, and a human must approve it before the experiment constitution is locked. Only then can the trusted C++ engine produce numerical evidence. Statistical, adversarial, and reproducibility reviews follow. Deterministic code validates the evidence and computes the strongest permitted verdict; a Chair can explain that verdict but cannot replace it.
This separation is deliberate. Models are useful for proposing methods, looking for weaknesses, and explaining results. They are not the numerical authority, cannot invent admissible evidence, and do not choose the verdict.
Why I built it
Backtests are unusually good at telling convincing stories. A large return is easy to notice, while the choices behind it—data boundaries, candidate selection, timing assumptions, costs, benchmark parity, and statistical corrections—are easier to miss. By the time a result reaches a polished report, those choices can be difficult to reconstruct.
I wanted a research process that could preserve disagreement. QuantForge records the approved protocol, evidence identities, reviewer objections, state transitions, and verdict inputs as one replayable case. The goal is not to find more strategies. It is to decide how much trust the current evidence can support.
The global problem
The reliability problem is not limited to one asset class or one market. Researchers everywhere work with noisy data and many plausible choices. Looking at enough strategies, periods, parameters, or benchmarks can produce an attractive result by chance. If costs, failed trials, contradictory evidence, or provenance are omitted, a backtest may look much stronger than the underlying evidence.
QuantForge addresses that general research-governance problem with explicit constitutions, narrow evidence admission, adversarial review, deterministic verdict limits, and reproducible exports. Its current evidence is synthetic and validates the system boundary, not a profitable trading claim.
Flagship demonstration
The flagship case begins with a deliberately attractive result from the protected deterministic C++ engine:
- total return: 185.43%;
- benchmark return: 84.46%;
- excess return: 100.97% after declared costs.
That is not the end of the case. The admitted evidence also reports:
- maximum drawdown: −42.47%;
- corrected reality-check p-value: 0.308691 against a 0.05 criterion;
- bootstrap probability of loss: 25.2% against a 10% limit;
- a 95% bootstrap return interval whose lower bound is below zero;
- material concentration and regime objections.
The numerical result is real output from the frozen synthetic fixture, but it is not evidence of live profitability. The role prose is deterministic fixture output. After replay and independent reconstruction pass, the code-owned verdict is still INCONCLUSIVE. That verdict is meaningful: the point estimate is attractive, but the claim as written asks for statistical reliability and robustness that the evidence does not establish.
Architecture
flowchart LR
claim["Research claim"] --> researcher["Researcher<br/>protocol proposal"]
researcher --> method["Methodology review"]
method --> approval["Human approval"]
approval --> constitution["Locked constitution"]
constitution --> cpp["Trusted C++ execution"]
cpp --> stats["Statistical review"]
stats --> adversarial["Adversarial review"]
adversarial --> repro["Reproducibility review"]
repro --> verdict["Code-owned verdict"]
verdict --> chair["Chair explanation"]
chair --> export["Export and replay"]
authority["Deterministic QuantForge authority<br/>workflow, schemas, evidence admission, verdict policy"]
evidence[("C++ numerical evidence")]
audit[("Durable evidence and audit state")]
approval -. governed by .-> authority
constitution -. locked by .-> authority
cpp --> evidence
evidence --> audit
researcher -. recorded in .-> audit
method -. recorded in .-> audit
stats -. recorded in .-> audit
adversarial -. recorded in .-> audit
repro -. recorded in .-> audit
authority --> verdict
audit --> verdict
export --> audit
classDef model fill:#e8f0fe,stroke:#356ac3,color:#102a43;
classDef deterministic fill:#e8f5e9,stroke:#2e7d32,color:#17351a;
classDef numeric fill:#fff3e0,stroke:#ef6c00,color:#4e2600;
classDef durable fill:#f3e5f5,stroke:#7b1fa2,color:#32103f;
class researcher,method,stats,adversarial,repro,chair model;
class approval,constitution,verdict,authority deterministic;
class cpp,evidence numeric;
class audit,export durable;
Blue nodes are model-generated proposals, reviews, or explanations. Green nodes are deterministic QuantForge authority. Orange nodes are trusted numerical execution and evidence. Purple nodes are the durable evidence and audit boundary. The QuantForge architecture overview is a permanent technical reference for this diagram and its authority boundaries.
What the model may and may not do
| The model may | The model may not |
|---|---|
| Propose a falsifiable experiment protocol | Approve the experiment for the human |
| Review methodology and identify weaknesses | Change the locked constitution |
| Interpret evidence through role-specific schemas | Execute the numerical engine |
| Raise statistical, adversarial, and reproducibility objections | Create or alter admissible evidence |
| Explain the already computed outcome | Advance workflow state or strengthen the verdict |
Provider outputs pass strict schemas, identity checks, evidence-reference rules, revision checks, and role-specific validation before code accepts them. The provider has no shell, filesystem, broker, or market-data tools.
Run the offline demonstration
Supported environment
- Linux or macOS;
- Python 3.12 or newer;
- CMake and a C++20 compiler;
- Git;
- the QuantForge development environment or an installed
quantforgecommand; - a clean checkout of the protected C++ repository with the exact
v1.0.0tag.
Install the reviewed development lock from this repository:
python3.12 -m venv .venv
.venv/bin/python -m pip install --require-hashes -r requirements-dev.lock
.venv/bin/python -m pip install -e . --no-deps --no-build-isolation
Then run the one-command demonstration:
./scripts/run_judge_demo.sh ../cpp-event-driven-backtester /private/tmp/quantforge-judge-demo
The output directory must not already exist and must be outside both repositories. On Linux, /tmp
may be used instead of /private/tmp. Set QUANTFORGE_CLI to an installed executable when you do
not want the wrapper to use .venv/bin/quantforge.
For lower-level control, the existing quantforge demo run and quantforge demo verify commands are
documented in the governed tribunal runbook.
Verify the evidence and reconstruction
The judge wrapper runs verification automatically. To repeat it independently:
.venv/bin/quantforge demo verify /private/tmp/quantforge-judge-demo
The artifact set contains:
case-spec.json— the claim, assumptions, controls, criteria, and failure gates;tribunal-result.json— the complete machine-readable case and identities;tribunal-report.md— the human-readable report;evidence-manifest.json— key facts and suggested capture order;case-package/— the reconstructable durable export;demo-manifest.json— the closed SHA-256 inventory.
Verification rejects missing, extra, substituted, stale, symlinked, or hash-mismatched artifacts. It then reconstructs the final case, verifies the audit replay, and recomputes the stable demonstration identity.
Comparative evaluation
The versioned benchmark contains 24 cases covering research defects, evidence attacks, authority violations, reproducibility failures, and one sound control. It compares a single-agent baseline, a planner–reviewer baseline, and the real six-role QuantForge tribunal under the same fixture provider and budgets.
.venv/bin/quantforge evaluation compare --subset full \
--output-dir /private/tmp/quantforge-evaluation
.venv/bin/quantforge evaluation verify-export /private/tmp/quantforge-evaluation
.venv/bin/quantforge evaluation replay /private/tmp/quantforge-evaluation
.venv/bin/quantforge evaluation report /private/tmp/quantforge-evaluation --format human
All current results are labeled OFFLINE DETERMINISTIC EVALUATION — MOCK PROVIDER. They validate routing, scoring, schema enforcement, persistence, replay, and authority boundaries. They do not measure live model intelligence or establish global superiority. See the evaluation methodology.
How Codex and GPT-5.6 were used
I used Codex and GPT-5.6 as engineering collaborators under a student-directed architecture. They helped turn requirements into bounded implementation slices, draft and review code, generate test cases, trace trust boundaries, challenge assumptions, investigate failures, and tighten technical documentation. I made the architecture, scope, governance, release, and merge decisions and reviewed the resulting code and evidence.
The build sequence was deliberate: first the deterministic C++ engine, then the QuantForge trust-boundary foundation, the six-role tribunal, the official structured OpenAI provider, the governed offline demonstration, and finally the comparative benchmark and baselines. Adversarial remediation, independent audit records, hash-locked dependencies, and protected GitHub workflows were used to keep AI-assisted development reviewable. Codex and GPT-5.6 were collaborators, not the project author or an autonomous release authority.
Repository structure
| Path | Purpose |
|---|---|
src/quantforge/domain/ | Strict claim, constitution, evidence, review, and verdict models |
src/quantforge/roles/ | Six role contracts, request construction, validation, and orchestration |
src/quantforge/engine/ | Narrow trusted adapter for the protected C++ v1.0.0 release |
src/quantforge/storage/ | SQLite persistence, export, integrity checks, and reconstruction |
src/quantforge/evaluation/ | Versioned 24-case comparative benchmark and baselines |
src/quantforge/demo/ | Flagship governed demonstration and artifact verification |
docs/ | Architecture, governance, security, provider, evidence, and operator references |
audit/ | Independent audit and release-verification records |
Testing and evidence
Version 0.1.0 remains the current package identity and communicates an audited research-governance
foundation, not a production trading system or an empirical financial result.
The repository gate runs formatting, Ruff, strict mypy, the full branch-aware pytest suite, a 90% combined governance-critical coverage floor, higher provider/orchestrator floors, malicious-input regressions, repository and documentation contracts, secret scanning, CFF validation, and source and wheel inspection:
scripts/quality.sh
The protected C++ v1.0.0 release is identified by an annotated, protected tag and verified asset
hashes. GitHub's native immutable-release flag for that older release remains false; the release is
not described as GitHub-native immutable. QuantForge v0.1.0 is GitHub-native immutable. Exact tag,
target, asset, and hash records are in the
OpenAI Build Week submission baseline verification.
Offline mock versus live OpenAI status
The repository contains an official OpenAI provider using strict structured outputs, explicit model selection, bounded retries, provenance capture, and no tool access. It is disabled by default. The flagship demonstration and published comparative results use deterministic fixture providers and make no OpenAI call.
Funded live contract verification is still pending. Comparative live transport is also not enabled in this phase. Until those steps are separately authorized and recorded, this project makes no claim about live GPT-5.6 output quality, latency, cost, or reliability. See the OpenAI provider runbook and future live evaluation runbook.
Limitations
- The flagship evidence is deterministic synthetic data, not empirical market evidence.
- The demo role responses are fixtures, not live model responses.
- The project is research governance software, not investment advice or a profitability claim.
- There is no broker connectivity, order submission, live trading, external market-data ingestion, retrieval system, web dashboard, or production deployment.
- Audit chains are locally tamper-evident but are not externally signed or timestamped.
- A trusted host and the protected C++ release boundary are still part of the threat model.
More detail is in Limitations, the Security Model, and the Threat Model.
Future development
The next bounded steps are funded live OpenAI contract verification, an approved live comparative evaluation, external reproduction, signed or independently anchored audit evidence, and broader empirical validation under reviewed data licenses. Those are future research tasks, not current platform capabilities.
Detailed technical documentation
- Architecture overview
- Detailed technical architecture
- Experiment constitution
- Governance
- Evidence model
- Verdict policy
- Role contracts
- Storage model
- C++ integration contract
- Deterministic semantics
- Operator runbook
- Release policy
- Phase 1 independent audit
QuantForge is licensed under Apache License 2.0. See LICENSE and NOTICE.
Analysis
View
Metric
- 27
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- OpenAIIn code
- PythonIn code
- C++Claimed
2 of 3 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
1.2 MB
Source files
160
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
MrithunjoyB/quantforge-ai
189 files · 1.7 MB · @ 1fe766c
Structure
Application logic
79 files · 42%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python86%
- Markdown12%
- YAML1%
- Shell1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
pyproject.toml
pypi · 13- openai
- pydantic
- +11 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.