Commit Graph

68 Commits

Author SHA1 Message Date
mo
e36534b641 [GAP-048]: reject taxonomy split complete
- NT8StrategyBase.cs: split overloaded runtime reject reasons

- SimpleORBStrategy.cs: split regime veto from grade filter

- parsers.py: keep split blocking reasons visible in dashboard KPIs

- SimpleORBRejectionLoggingTests.cs: cover GradeFilter, RegimeVeto, and line format

- docs/00-governance: record final vocabulary and validation evidence

Build: clean | Tests: 516 passing; Core 427 passing | Deploy: backup 20260823_142014
2026-08-23 14:23:04 -04:00
mo
80c5f53bb9 [GAP-047]: runtime confluence weights complete
- ConfluenceScorer.cs: apply designed factor baseline weights

- ConfluenceScorerTests.cs: cover 5.85 total weight, worked example, and overrides

- TASK_GAP047_PART2_WEIGHT_RUNTIME_PROMPT.md: add accepted runtime prompt

- docs/00-governance: record DEC implementation and fresh-freeze requirement

- SPRINT_BOARD.md: mark GAP-047 Part 2 implemented

Build: clean | Tests: 514 passing; Core 425 passing | Deploy: backup 20260823_135331
2026-08-23 13:55:57 -04:00
mo
cbf45dfa3b [GAP-047]: offline weight rescore study complete
- tools/rescore: add offline equal-vs-designed weight rescore script

- tools/rescore: write GAP-047 JSON and markdown evidence

- docs/00-governance: propose DEC-20260823-01 and update status

- SPRINT_BOARD.md: mark GAP-047 Part 1 complete

Build: clean | Tests: 511 passing; Core 422 passing | Runtime change: no
2026-08-23 13:34:32 -04:00
mo
d84949caa3 chore: checkpoint remaining pre-gate worktree changes
- governance: stage v7.0 review prompts, run book, roadmap/current-status/decision updates, and sprint board state

- adapters: capture DASH/trailing-drawdown/state-telemetry strategy work already present in the worktree

- tools: capture dashboard console/KPI parser updates, logtriage notes, and runnersweep output

Build: previously clean | Tests: previously 511 passing | Includes all open staged files
2026-08-21 14:53:15 -04:00
mo
28c30bca82 [GAP-054]: runner trail breakeven fix complete
- src/NT8.Adapters/Strategies/NT8StrategyBase.cs: removed post-entry runner SetStopLoss breakeven overwrite so SetTrailStop remains authoritative

- src/NT8.Adapters/Strategies/NT8StrategyBase.cs: removed stale runner breakeven diagnostic draw

Build: clean | Tests: 511 passing | Dual-deployed: yes
2026-08-21 14:51:51 -04:00
mo
f617574b16 fix: add DASH-003 live trades and session rows 2026-08-17 12:20:42 -04:00
mo
e7b6ae5878 fix: repair DASH-001 live session state and readiness panel 2026-08-17 10:47:53 -04:00
mo
8ca000a166 docs: add chart diagnostics and dashboard training 2026-08-16 18:03:49 -04:00
mo
7f82a92d8d docs: stage GAP-034 operator cross-check 2026-08-16 17:34:52 -04:00
mo
229919ad29 docs: capture Gate 3 freeze baseline 2026-08-16 17:05:27 -04:00
mo
de10754129 fix: handle clean git status in TOOL-003 freeze capture 2026-08-16 17:02:57 -04:00
mo
ef36dae644 docs: archive Gate 3 failed freeze attempts 2026-08-16 17:02:05 -04:00
mo
0a2106a7a6 tools: add DASH-001 TOOL-001 TOOL-002 TOOL-003 and RUNNER-001 utilities 2026-08-16 16:59:18 -04:00
mo
83d25cb2cd test: cover GAP-035 GAP-036 and DEC-20260814-04 regressions 2026-08-16 16:58:54 -04:00
mo
22514b31f7 test: add GAP-037 and GAP-039 MaxDailyTrades coverage 2026-08-16 16:58:46 -04:00
mo
f5e4aa2e4e test: cover GAP-038 BarsPeriod config hash input 2026-08-16 16:58:39 -04:00
mo
42427423ee fix: apply GAP-035 GAP-036 GAP-038 GAP-039 runtime remediations 2026-08-16 16:58:31 -04:00
mo
c4ad9696c0 docs: record GAP-034/035/036 forensics and DEC-20260814/15 decisions 2026-08-16 16:58:15 -04:00
mo
d59be0e607 chore: ignore local agent and tool runtime artifacts 2026-08-16 16:58:00 -04:00
mo
d4f5d4f04a GAP-033: log session readiness for Gate 3
- report resolved DaysToLoad and loaded bars per series
- report factor warm-up readiness without blocking startup
- warn when SimSimple runs with kill switch disabled

Build: clean | Tests: 500 passing | Dual-deployed: yes
2026-08-03 08:59:19 -04:00
mo
e68b138fc6 GAP-032: enforce session daily trade limit
- retain accepted-trade count after position-flat events
- reject same-session entries with explicit MaxDailyTrades logging
- verify next-session re-entry and update Gate 3 governance

Build: clean | Tests: 500 passing | Dual-deployed: yes
2026-08-03 08:54:54 -04:00
mo
5844b2ce0b GAP-031: fix submitted trade provenance
- serialize grade, score, ORB ticks, and resolved mode from accepted submission data
- add exact-value JSONL provenance test
- prepare governance for Gate Run 3

Build: clean | Tests: 498 passing | Dual-deployed: yes
2026-08-03 08:50:04 -04:00
mo
56d7c7880e chore: checkpoint contaminated Gate 2 findings 2026-08-03 08:46:51 -04:00
mo
0c6b6b90a1 Fix: Resolve NinjaScript compilation errors
- Added RunnerMode enum directly in NT8StrategyBase.cs (NinjaScript compiles strategies directly, can't reference NT8.Core assembly)
- Replaced all NT8.Core.Common.Models.RunnerMode references with local RunnerMode enum
- Fixed StrategyIntent metadata access (uses Metadata dictionary instead of Context.CustomData)
- All changes verified: build succeeds, 492 tests passing
2026-07-13 09:58:55 -04:00
mo
78d4cdae35 GAP-011: Gitea CI Pipeline
- Added .gitea/workflows/ci.yml with Windows and Linux (mono) build jobs
- Added scripts/ci_build.sh for Linux/mono runners
- Updated README.md with Gitea CI status badge
- Both workflows run verify-build.bat equivalent logic

Verification: ./verify-build.bat ✅ (492 tests passing)
2026-07-13 09:31:54 -04:00
mo
c9041df36a Sprint 3: Production Hardening — 9 tasks completed
## Summary
Implemented 9 production-hardening tasks across risk, execution, calendar, and governance.
All changes verified: build clean (0 errors), 492 tests passing (404 core + 78 integration + 10 perf).

## Core Changes

### Risk & Portfolio (3 tasks)
- **GAP-019** Portfolio Heat Tier 3.5: Added MaxHeatPct (default 3%) to AdvancedRiskConfig;
  ValidatePortfolioHeat() computes TotalOpenRisk + NewTradeRisk / Equity * 100; rejects when exceeded.
- **GAP-003** RiskPerTrade <= MaxTradeRisk Assertion: RiskPerTrade property in RiskConfig; throws
  ArgumentException at ValidateOrder() if RiskPerTrade > MaxTradeRisk; 3 unit tests.
- **GAP-005** GetRiskStatus() Live Config: _currentDailyLossLimit field updated from config.DailyLossLimit
  on each ValidateOrder(); GetRiskStatus() returns actual value; 3 unit tests.

### Execution & Position Management (3 tasks)
- **TASK-06a** Runner Mode Architecture: RunnerMode enum (Auto/Mode1DualLeg/Mode2RunnerOnly/
  Mode3ScalerOnly/Disabled); ResolveRunnerMode() logic; 4-mode SubmitOrderToNT8() behavior.
- **TASK-06b** ATR Dynamic Stop: EnableDynamicStop, AtrPeriod, AtrMultiplier, MinStopTicks, MaxStopTicks;
  computes dynStop = clamp(round(ATR/TickSize * Mult), Min, Max); overrides intent.StopTicks.
- **GAP-006** Position-Close Re-arm: OnPositionUpdate() sends clear_trade_taken when flat;
  EnableBarBasedRearm parameter gates legacy bar-driven re-arm (default false for live).

### Strategy Intelligence (2 tasks)
- **GAP-004** orbRangeTicks Fix: DailyBarContext.OrbRangeTicks field; computed from actual ORB
  high/low / TickSize; passed to Factor 7 (ORBvsATR).
- **GAP-010** Short-Side Regime Filter: EnableShortTrendFilter param; vetoes shorts when
  AVWAP slope > 0 (bullish); configurable, default true.

### Calendar & Trailing (2 tasks)
- **GAP-008** CME Holiday Awareness: NEW CmeHolidayCalendar.cs with 9 observed holidays +
  Good Friday (Easter calc); EnableCMEHolidayGuard skips ORB window on holidays.
- **GAP-009** ATR Trailing Real ATR: EnableATRTrailing, ATRTrailingPeriod (14), ATRTrailingMultiplier (2.0),
  ATRTrailingMinTicks (8), ATRTrailingMaxTicks (60); computes trailTicks from ATR(Close,Period)[0].

## Governance
- SPRINT_BOARD.md, current_status.md, decisions.md (DEC-20260711-01 through -09), NEXT_PROMPT.md updated
- All 9 tasks moved ACTIVE -> COMPLETED; GAP-011 (Gitea CI) now ACTIVE

## Verification
- verify-build.bat: 0 errors, 0 warnings
- Tests: 492 passing (404 core + 78 integration + 10 performance)

## Files
- Modified: 13 source, 3 test, 9 governance
- Deleted: 28 obsolete spec/docs
- Added: 1 new module (NT8.Core.Calendar), governance files
- Dual-deployed to NT8 Custom\Strategies\

## Rollback
Tag: sprint3-production-hardening-complete
To revert: git reset --hard sprint3-production-hardening-complete
2026-07-13 08:38:25 -04:00
mo
99e993bee6 Document wrapper pass 2 deferrals and safe deletions 2026-04-05 22:58:40 -04:00
mo
d9bb4b6be5 cleanup: remove confirmed tombstone risk file and backup scaffold 2026-04-05 22:57:19 -04:00
mo
7b18df7f37 Document legacy source cleanup pass 1 2026-04-05 22:46:55 -04:00
mo
e76180cf54 cleanup: archive legacy-orders and placeholders, remove tombstone and backup files 2026-04-05 22:44:32 -04:00
mo
c6833669ad Merge branch 'cleanup/runbooks' into cleanup/legacy-source 2026-04-05 19:43:41 -04:00
mo
2ad2ddf38b Add operational runbooks and decisions stub 2026-04-05 19:39:56 -04:00
mo
f8587125c0 Merge branch 'cleanup/rules' into cleanup/runbooks 2026-04-05 19:34:09 -04:00
mo
de6e150655 Harden AI agent rules and compile learning workflow 2026-04-05 17:59:34 -04:00
mo
4453ff552a Merge branch 'cleanup/archive-stale-docs' into cleanup/rules 2026-04-05 17:43:07 -04:00
mo
1cd8df759f nnce branch merge
:q!
nnnn branch 'cleanup/docs-governance' into cleanup/rules

:q!
:q!
;q!

nnce	;q!
:q!
2026-04-05 17:41:14 -04:00
mo
2be9c843e5 Archive stale docs and mark historical references 2026-04-05 17:38:35 -04:00
mo
a6ececaf73 Merge branch 'cleanup/docs-governance' into cleanup/archive-stale-docs 2026-04-05 17:30:16 -04:00
mo
ce74f68e54 Establish governance docs as canonical repo context 2026-04-05 17:24:48 -04:00
mo
3ccd3a8bfd Create canonical governance documentation files 2026-04-05 16:54:22 -04:00
mo
e2ea45b58f Normalize line endings (CRLF/LF) 2026-04-05 16:52:09 -04:00
mo
9a28a49292 Pre-cleanup baseline snapshot
Some checks failed
Build and Test / build (push) Has been cancelled
pre-cleanup-snapshot
2026-04-05 16:50:18 -04:00
mo
d856f3949d fix: restore EntriesPerDirection=2 and align risk defaults
Some checks failed
Build and Test / build (push) Has been cancelled
- Restore EntriesPerDirection=2 so runner leg can enter alongside scaler.
  Replay burst protection is now handled by the State.Realtime guard in
  ProcessStrategyIntent rather than by limiting entries per direction.

- Set MaxOpenPositions=2 in SimpleORBNT8 to match scaler+runner structure.
  Previous value of 1 caused PortfolioRiskManager to block the runner.

- Confirm RiskPerTrade=100 and MaxContracts=3 as live defaults.
  The /9-contract configuration was a one-off backtest experiment and
  must not be the deployed default.

- _realtimeBarSeen field and OnBarUpdate guard confirmed present and correct.
  ProcessStrategyIntent guard: if (State == State.Realtime && !_realtimeBarSeen)
  allows backtest (State.Historical) to execute normally while blocking
  replay bars in live/SIM mode.

Backtest validation: Jan 2026 - Mar 2026, NQ, trail=20ticks
  PF=7.00, win=75%, avg winner=, avg loser=-, max DD=-
2026-03-29 19:18:29 -04:00
mo
c9e8b35f15 Fix stop/target ordering, P&L wiring, dynamic targets, confluence wiring
Some checks failed
Build and Test / build (push) Has been cancelled
- Move SetStopLoss/SetProfitTarget before EnterLong/EnterShort in
  SubmitOrderToNT8(). NT8 requires stop/target pre-registered to the
  signal name before entry fires — calling after caused silent fallback
  to strategy defaults in backtest, nullifying all dynamic target scaling.
  Add [dynamic] tag to SUBMIT log line for observability.

- Wire OnPositionUpdate() in NT8StrategyBase to call
  _riskManager.OnPnLUpdate() and PortfolioRiskManager.ReportPnL() on
  every position change. Daily loss limit checks were evaluating against
   PnL permanently — safety net now live.

- Fix BasicRiskManager.CheckEmergencyConditions() hardcoded 1000 limit.
  Add dailyLossLimit constructor overload; emergency halt now fires at
  90% of the configured DailyLossLimit, not a hardcoded .

- Add AVWAP slope hard veto in SimpleORBStrategy.OnBar(). Trend=0.00
  (AVWAP working against trade direction) can no longer pass grade
  filter. Pre-scoring veto prevents high gap/volume scores from masking
  a directionally broken setup.

- Raise default MinTradeGrade from 4 (B) to 5 (A) in both
  SimpleORBStrategy and SimpleORBNT8 defaults.

- Scale TargetTicks dynamically in CreateIntent() based on ORB/ATR
  ratio (0.75x-1.75x of base target). Tight ORBs get extended targets;
  wide ORBs get tightened. Hard floor at stopTicks+4.

- Add NarrowRange, OrbRangeVsAtr, GapDirectionAlignment,
  BreakoutVolumeStrength, PriorDayCloseStrength default weights in
  ConfluenceScorer constructor. All 10 factors now registered.

- Fix session_open_price tracking for GapDirectionAlignment factor.
  TodayOpen in DailyBarContext now reflects first RTH bar open, not
  the breakout bar open.

- Log all 10 factor scores at signal acceptance for observability.
v0.5.0
2026-03-23 22:43:21 -04:00
mo
ae8ac05017 Baseline v1: fix multi-trade bug, working confluence factors, PF=1.12 over 15 months
Some checks failed
Build and Test / build (push) Has been cancelled
- Fix BreakoutVolumeStrength: was always 0.50 due to self-referential volume comparison
- Fix VolatilityRegime: was always ~0.50 due to single-bar value area baseline
- Fix multi-trade-per-day: session reset now compares trading date not session timestamp
- Add NT8.Strategies.dll to deploy script (was missing from every deployment)
- Fix grade filter minimum from C to B (MinTradeGrade=4)
- Add MinTradeGrade as configurable NinjaScript property
- Fix confluence_score metadata: now stores full ConfluenceScore object not double
- Baseline: B-grade long-only 30min ORB on ES, Jan 2025-Mar 2026
  120 trades, 35.8% win rate, PF=1.12, Sharpe=0.18, MaxDD=
2026-03-22 19:26:17 -04:00
mo
229f4e413e Fix BreakoutVolumeStrength and Volatility factor calculators, session reset gate
Some checks failed
Build and Test / build (push) Has been cancelled
2026-03-22 19:12:08 -04:00
mo
c094e65b10 Grade filter B minimum, MinTradeGrade property, session reset fix
Some checks failed
Build and Test / build (push) Has been cancelled
2026-03-22 18:56:06 -04:00
mo
a2af272d73 Fix deploy script: add NT8.Strategies.dll to deployment pipeline
Some checks failed
Build and Test / build (push) Has been cancelled
2026-03-22 17:28:03 -04:00
mo
2f623dc2f8 S2-B3/S3-05: PortfolioRiskManager, connection loss recovery, long-only lock
Some checks failed
Build and Test / build (push) Has been cancelled
2026-03-19 16:17:02 -04:00
mo
3282254572 S2-B1/B2: live account balance, Optimizable attrs, BarsRequired=50, archive NT8.Core.Orders
Some checks failed
Build and Test / build (push) Has been cancelled
2026-03-19 14:48:22 -04:00