Skip to content
Merged

Dev #39

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
388cc10
perf: add prepared service context
BobbyAxerol Jul 23, 2026
ed9eb0d
docs: add options engine execution plan
BobbyAxerol Jul 23, 2026
5bfab66
test: snapshot options phase 0 baseline
BobbyAxerol Jul 23, 2026
0d00d7e
feat: add options phase 1 schema
BobbyAxerol Jul 23, 2026
573a813
feat: add options phase 2 analytics
BobbyAxerol Jul 23, 2026
7ecd172
feat: add options phase 3 tape selectors
BobbyAxerol Jul 23, 2026
0912718
feat: add options phase 4 execution
BobbyAxerol Jul 23, 2026
fee147e
feat: add options phase 5 ledger lifecycle
BobbyAxerol Jul 23, 2026
5f98bdc
feat: add options phase 6 hedging margin
BobbyAxerol Jul 23, 2026
ccbc703
feat: add options phase 7 endpoint
BobbyAxerol Jul 23, 2026
0fa476d
feat: add options phase 8 templates
BobbyAxerol Jul 23, 2026
5e9527d
feat: add options phase 9 nautilus validation
BobbyAxerol Jul 23, 2026
710b8d1
feat: add options phase 10 hardening
BobbyAxerol Jul 23, 2026
4244674
test: add gamma scalping options sample
BobbyAxerol Jul 23, 2026
4e3f45e
test: run gamma scalping on real option history
BobbyAxerol Jul 23, 2026
90c5ec6
feat: add delta hedged option strategy contract
BobbyAxerol Jul 23, 2026
a85ae4c
Merge pull request #28 from BobbyAxerol/feat/option-engine
BobbyAxerol Jul 24, 2026
a33b745
feat: add native event lifecycle command compiler
BobbyAxerol Jul 25, 2026
af34306
feat: add native event lifecycle kernel
BobbyAxerol Jul 25, 2026
3139793
test: complete native event lifecycle coverage
BobbyAxerol Jul 26, 2026
59a1fa1
feat: expose native event lifecycle endpoints
BobbyAxerol Jul 26, 2026
9349d3f
Merge pull request #31 from BobbyAxerol/feat/30-native-event-lifecycle
BobbyAxerol Jul 26, 2026
529ed80
feat: add native event reactive strategy runner
BobbyAxerol Jul 26, 2026
c805ffb
feat: complete native event reactive lifecycle
BobbyAxerol Jul 26, 2026
10f17f4
Merge pull request #32 from BobbyAxerol/feat/30-native-event-lifecycle
BobbyAxerol Jul 26, 2026
0753825
docs: note native event logging debt
BobbyAxerol Jul 26, 2026
2b5fc21
docs: plan execution correctness intrabar upgrade
BobbyAxerol Jul 26, 2026
b004aa1
Merge pull request #33 from BobbyAxerol/feat/30-native-event-lifecycle
BobbyAxerol Jul 26, 2026
85eaace
feat: freeze close target execution contract
BobbyAxerol Jul 26, 2026
daf8609
feat: add intrabar execution oracle
BobbyAxerol Jul 26, 2026
2cbe58f
feat: add fast intrabar kernel
BobbyAxerol Jul 26, 2026
099583d
feat: add intrabar certification tooling
BobbyAxerol Jul 26, 2026
a4513df
fix: tighten intrabar execution blockers
BobbyAxerol Jul 26, 2026
8e306d1
fix: close intrabar merge blockers
BobbyAxerol Jul 26, 2026
7a88996
fix: add intrabar funding timestamp semantics
BobbyAxerol Jul 27, 2026
767d3b7
Merge pull request #34 from BobbyAxerol/feat/31-execution-correctness…
BobbyAxerol Jul 27, 2026
622c0ad
docs: plan domain agnostic optimization framework
BobbyAxerol Jul 27, 2026
37a7cf4
feat: add domain agnostic optimization core
BobbyAxerol Jul 27, 2026
b3db106
feat: add domain optimization evaluators
BobbyAxerol Jul 27, 2026
6731b18
feat: consolidate optimization workflow
BobbyAxerol Jul 27, 2026
a64d675
fix: harden optimization merge blockers
BobbyAxerol Jul 27, 2026
ffce868
Merge pull request #35 from BobbyAxerol/feat/domain-agnostic-optimiza…
BobbyAxerol Jul 27, 2026
75fb0d9
Support unseeded Optuna optimization
BobbyAxerol Jul 28, 2026
acfdeb8
Add optimization search assurance
BobbyAxerol Jul 28, 2026
4598093
Add robust optimization plateau selection
BobbyAxerol Jul 28, 2026
9626a60
Merge dev into optimization search branch
BobbyAxerol Jul 28, 2026
f2a41f0
Merge pull request #36 from BobbyAxerol/feat/domain-agnostic-optimiza…
BobbyAxerol Jul 28, 2026
9746106
Add session-aware intrabar reference policy
BobbyAxerol Jul 28, 2026
76af458
Merge branch 'dev' into feat/31-execution-correctness-intrabar
BobbyAxerol Jul 28, 2026
023dc22
Add fast session intrabar kernel
BobbyAxerol Jul 28, 2026
af8dba2
Merge pull request #37 from BobbyAxerol/feat/31-execution-correctness…
BobbyAxerol Jul 28, 2026
fed5b55
Plan native event memory optimization phases
BobbyAxerol Jul 29, 2026
1b3397f
Add native event artifact memory policy
BobbyAxerol Jul 29, 2026
b999921
Add prepared native event score path
BobbyAxerol Jul 29, 2026
748a71b
Add native event single-pass reactive score path
BobbyAxerol Jul 29, 2026
d0403ef
Merge pull request #38 from BobbyAxerol/feat/30-native-event-lifecycle
BobbyAxerol Jul 29, 2026
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
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ historical reproduction.
- Native vectorized engines for fast sweeps and large parameter grids.
- Native event-driven engines for market/limit orders, fills, baskets, and
arbitrage package execution.
- Prepared service contexts for repeated signal/portfolio replays on the same
market tape without re-normalizing pandas data each run.
- Native portfolio engine with target weights, target notionals, target units,
gross/net exposure, risk parity, beta neutrality, margin reports, and
per-symbol attribution.
Expand All @@ -46,6 +48,8 @@ historical reproduction.
- Walk-forward and train/test optimization designed to avoid leaking OOS data
into parameter selection, plus full-sample robust calibration for final
production parameter discovery.
- Domain-agnostic Optuna optimization adapters for prepared signal, intrabar,
portfolio, and generic endpoint workflows.

## Performance Philosophy

Expand Down Expand Up @@ -108,6 +112,57 @@ Phase 14C added run-local prepared market-array reuse for WFO/service loops and
The default remains `full`; lighter report levels are opt-in for optimizers and
services, and parity tests lock core accounting equality before any speed claim.

Latest Phase 16 service-context closure benchmark:

| Workload | Normal endpoint | Prepared context | Speedup | Parity |
|---|---:|---:|---:|---|
| Single-symbol signal_notional replays | 0.0711s | 0.0390s | 1.82x | pass |
| Native portfolio replays | 0.3115s | 0.0695s | 4.48x | pass |
| Native portfolio reports | 0.0755s full | 0.0394s minimal | 1.92x | pass |

Phase 16 adds `endpoint.prepare_service_context(...)`, an opt-in helper for
services that replay many signals or position matrices against one fixed market
tape. Normal `.backtest(...)` remains defensive and backward-compatible.
Cython/C++ remains deferred because the larger benchmark still points to
facade/report overhead rather than pure Numba kernels.

Latest Phase 31 intrabar execution benchmark:

| Route | Workload | Runtime | Throughput | Ratio | Parity |
|---|---:|---:|---:|---:|---|
| `close_target_v2_pure_kernel` | 25,000 bars | 0.0087s | 2,879,313 bars/s | baseline | baseline |
| `intrabar_bracket_v1_minimal` | 25,000 bars, 2,000 fills | 0.0118s | 2,115,865 bars/s | 1.36x close-target | oracle-checked |
| `intrabar_bracket_v1_audit` | 25,000 bars, fill ledger | 0.0527s | 474,427 bars/s | 4.46x minimal | pass |
| `intrabar_session_bracket_v1_minimal` | 25,000 bars, session state | 0.0117s | 2,145,495 bars/s | 0.99x minimal | reference-checked |
| `intrabar_session_bracket_v1_audit` | 25,000 bars, session ledger | 0.0499s | 501,156 bars/s | 4.22x minimal | pass |
| `intrabar_reference_python` | 25,000 bars | 0.2394s | 104,419 bars/s | 20.26x slower than minimal | truth model |
| `fill_replay_v1_kernel` | 25,000 bars, 2,000 fills | 0.0124s | 2,013,664 bars/s | 1.05x minimal | accounting |
| `native_event_explicit_orders_facade` | 25,000 bars, 2,000 market orders | 0.0761s | 328,618 bars/s | 6.44x minimal | speed reference |

Phase 31 adds execution-contract certification for close-target, fast intrabar
SL/TP/trailing, optional session-aware intraday execution state, and explicit
fill replay paths. The fast intrabar kernel is about 20.3x faster than the
readable Python oracle on the committed benchmark; the session kernel keeps the
non-session hot path separate while adding entry windows, EOD force-flat,
per-session quota, stale-signal cancellation, and re-entry suppression.

Latest Phase 32C optimization overhead benchmark:

| Measurement | Result |
|---|---:|
| Optimizer overhead | 0.0174s for 24 trials |
| Optimizer overhead / trial | 0.000723s |
| Prepared signal evaluator | 2.03x faster than normal endpoint replay |
| Intrabar first vs warm run | 3.70x first/warm ratio |
| Parity | pass, final equity diff 0.0 |

Phase 32C consolidates safe walk-forward optimization primitives with the new
domain-agnostic optimizer core while keeping WFO fold isolation and robust
selection semantics inside `walkforward.py`. Read
[`docs/optimization.md`](docs/optimization.md) and
`benchmarks/results/optimization_overhead.md` for signal, intrabar, portfolio,
arbitrage/grid/options fallback examples and benchmark details.

Ecosystem positioning:

| Tool | Core strength | Runtime model | QuantBT role beside it |
Expand Down Expand Up @@ -208,6 +263,9 @@ service creates a run.
- Full-sample robust calibration selectors: `full_robust`,
`full_plateau_robust`, `full_temporal_robust`, and `full_best`.
- Optional trade-count penalty to avoid overfit low-trade Sharpe traps.
- Shared domain-agnostic optimizer primitives for search-space parsing,
duplicate detection, early stopping, objective helpers, constraints, and
candidate selection.

### Nautilus Validation Reports

Expand Down
Loading
Loading