Commit Graph

40 Commits

Author SHA1 Message Date
mo
a99ce1d0e7 [GAP-050]: quantity-aware risk contract complete
- IRiskManager.cs: add quantity-aware ValidateOrder contract

- AdvancedRiskManager.cs: delegate Tier 1 through sized BasicRiskManager overload and preserve 3-arg behavior

- NT8StrategyBase.cs: remove BasicRiskManager type-check workaround and call sized interface method

- NT8OrderAdapter.cs: size before risk validation and pass actual contracts

- tests: add AdvancedRiskManager, NT8OrderAdapter, and NT8StrategyBase coverage

Build: clean | Tests: 566 passing; Core 476 passing | Dual-deployed: no - skipped by prompt
2026-08-25 16:39:56 -04:00
mo
a673475738 [GAP-061]: AVWAP state context telemetry complete
- SimpleORBNT8.cs: append Avwap, AvwapSlope, and TrendConfirm to STATE_CONTEXT when CustomData contains them

- SimpleORBNT8DefaultsTests.cs: add source assertions for AVWAP telemetry formatting, missing-key omission, and no scoring/log-format changes

- SPRINT_BOARD.md/decisions.md: record observability-only implementation and direction-blind trend_confirm finding

Build: clean | Tests: 561 passing; Core 472 passing | Dual-deployed: no - skipped by prompt
2026-08-25 16:24:53 -04:00
mo
0607d44388 [GAP-057]: runner trail source regression seam
- NT8StrategyBaseRunnerTrailTests.cs: assert no runner SetStopLoss after SetTrailStop and no post-entry runner stop resets

- SPRINT_BOARD.md/decisions.md: record Option B source-text seam choice and verification evidence

Build: clean | Tests: 558 passing; Core 469 passing | Dual-deployed: no - test-only skipped by prompt
2026-08-25 13:33:54 -04:00
mo
cdd9aa25bb [GAP-056]: inert breakeven params hidden
- NT8StrategyBase.cs: hide inert breakeven parameters with Browsable(false) and unused descriptions

- SimpleORBNT8.cs: label settings export AutoBreakeven values as unused compatibility fields

- NT8StrategyBaseBreakevenParamsTests.cs: add source assertions for hidden/inert parameters and no order-flow reads

- SPRINT_BOARD.md/decisions.md: record Option A and verification evidence

Build: clean | Tests: 555 passing; Core 466 passing | Dual-deployed: no - skipped by prompt
2026-08-25 13:30:11 -04:00
mo
8a1c3d1649 [GAP-053]: stale docs prune complete
- executive_summary.md: replace v6 stale critical list with current status and resolved history

- roadmap.md: remove stale Sprint 3 warning/list and record verified resolved items

- decisions.md: record GAP-053 implementation and verification evidence

Build: clean | Tests: 552 passing | Dual-deployed: no - docs only
2026-08-25 13:25:24 -04:00
mo
8b9a2e2b6a [GAP-052]: tick value table consolidation complete
- InstrumentTickValueTable.cs: add shared platform-neutral union tick-value table

- BasicRiskManager.cs and BasicPositionSizer.cs: delegate tick lookup and supported symbols to shared table

- AdvancedRiskManager.cs and AdvancedPositionSizer.cs: remove duplicate tick tables and delegate to shared table

- BasicRiskManagerTests.cs: prove risk/sizing table parity and 6A uses  tick value

- SPRINT_BOARD.md and decisions.md: record Option A, platform-neutrality rationale, and verification evidence

Build: clean | Tests: 552 passing; Core 463 passing | Dual-deployed: no - skipped per operator instruction
2026-08-25 10:50:27 -04:00
mo
18877c376c [GAP-051]: micro upgrade advisory persistence complete
- NT8StrategyBase.cs: persist MicroUpgradeThreshold advisory state per account

- NT8StrategyBaseMicroUpgradeTests.cs: add source guards for persistence, corrupt files, and Account-null behavior

- SPRINT_BOARD.md and decisions.md: record Option A and verification evidence

Build: clean | Tests: 550 passing; Core 461 passing | Dual-deployed: no - skipped per operator instruction
2026-08-25 10:14:23 -04:00
mo
7e82b2ce5a [GAP-059]: ORB range telemetry context complete
- SimpleORBNT8.cs: source telemetry ORB range from SDK opening range tracker

- SimpleORBNT8DefaultsTests.cs: guard against dead adapter ORB fields and verify SDK source

- OrbConfluenceFactorTests.cs: prove realistic ORB range ticks produce ratio reason

- SPRINT_BOARD.md and decisions.md: record implementation and deploy blocker

Build: clean | Tests: 545 passing; Core 456 passing | Dual-deployed: no - NinjaTrader.exe PID 18800 locked NT8.Core.dll
2026-08-25 10:10:27 -04:00
mo
6c672a5247 [GAP-060]: reject summary visibility complete
- NT8StrategyBase.cs: made reject summary snapshots ORB-window/date-aware with heartbeat flush

- SimpleORBNT8.cs: bound summary suppression to configured opening range

- tests: added reject summary source guards and SimpleORB no-breakout rejection coverage

- SPRINT_BOARD.md: marked GAP-060 implemented with deploy blocker

- docs/00-governance/decisions.md: recorded DEC-20260823-08 implementation evidence

Build: clean | Tests: 543 passing | Dual-deployed: no - NinjaTrader.exe PID 18800 locked NT8.Core.dll
2026-08-25 10:04:22 -04:00
mo
a005deeabf [GAP-049]: telemetry direction context complete
- SimpleORBNT8.cs: clone daily context for STATE telemetry and set direction/session-open fields

- SimpleORBNT8DefaultsTests.cs: add source tests for telemetry clone and orb_range_ticks metadata

- OrbConfluenceFactorTests.cs: prove sell/down-gap alignment scores correctly

- SPRINT_BOARD.md and decisions.md: record implementation, P1-E finding, verification, and deploy evidence

Build: clean | Tests: 538 passing; Core 449 passing | Deploy: backup 20260823_151931
2026-08-23 15:20:49 -04:00
mo
f45adcaa03 [GAP-058]: reject line test coverage complete
- SimpleORBRejectionLoggingTests.cs: replace literal-only comparison with real RecordSignalRejection output comparison

- decisions.md: mark DEC-20260823-02 implemented

- SPRINT_BOARD.md: record GAP-058 housekeeping completion

Build: clean | Tests: focused 3 passing; Core 446 passing; verify-build 535 passing
2026-08-23 15:10:58 -04:00
mo
d652e29959 [GAP-045/GAP-046]: risk envelope guards complete
- BasicRiskManager.cs: add sized per-position risk validation and startup validator

- NT8StrategyBase.cs: fail fast on incoherent risk config and validate after sizing

- BasicRiskManagerTests.cs: cover assertions, sized risk, property sweep, MNQ tables

- docs/00-governance: record validation evidence and NQ SIM follow-up

Build: clean | Tests: 535 passing; Core 446 passing | Deploy: backup 20260823_144817
2026-08-23 14:50:02 -04:00
mo
6658d2d120 [GAP-055]: MaxDailyTrades persistence complete
- SimpleORBStrategy.cs: persist and rehydrate daily trade count by trading date

- NT8StrategyBase.cs: pass live account/log metadata for persistence

- SimpleORBNT8.cs: seed persistence metadata in strategy config

- MaxDailyTradesTests.cs: cover restore, reset, corrupt file, backtest no-I/O, CME date

- docs/00-governance: record validation evidence and manual SIM follow-up

Build: clean | Tests: 521 passing; Core 432 passing | Deploy: backup 20260823_143311
2026-08-23 14:35:07 -04:00
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
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
ef36dae644 docs: archive Gate 3 failed freeze attempts 2026-08-16 17:02:05 -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
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
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
7b18df7f37 Document legacy source cleanup pass 1 2026-04-05 22:46:55 -04:00
mo
2ad2ddf38b Add operational runbooks and decisions stub 2026-04-05 19:39:56 -04:00
mo
de6e150655 Harden AI agent rules and compile learning workflow 2026-04-05 17:59:34 -04:00
mo
2be9c843e5 Archive stale docs and mark historical references 2026-04-05 17:38:35 -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
9a28a49292 Pre-cleanup baseline snapshot
Some checks failed
Build and Test / build (push) Has been cancelled
2026-04-05 16:50:18 -04:00
mo
a87152effb Production hardening: kill switch, circuit breaker, trailing stops, log level, holiday calendar
Some checks failed
Build and Test / build (push) Has been cancelled
2026-02-24 15:00:41 -05:00
mo
0e36fe5d23 feat: Complete Phase 5 Analytics & Reporting implementation
Some checks failed
Build and Test / build (push) Has been cancelled
Analytics Layer (15 components):
- TradeRecorder: Full trade lifecycle tracking with partial fills
- PerformanceCalculator: Sharpe, Sortino, win rate, profit factor, expectancy
- PnLAttributor: Multi-dimensional attribution (grade/regime/time/strategy)
- DrawdownAnalyzer: Period detection and recovery metrics
- GradePerformanceAnalyzer: Grade-level edge analysis
- RegimePerformanceAnalyzer: Regime segmentation and transitions
- ConfluenceValidator: Factor validation and weighting optimization
- ReportGenerator: Daily/weekly/monthly reporting with export
- TradeBlotter: Real-time trade ledger with filtering
- ParameterOptimizer: Grid search and walk-forward scaffolding
- MonteCarloSimulator: Confidence intervals and risk-of-ruin
- PortfolioOptimizer: Multi-strategy allocation and portfolio metrics

Test Coverage (90 new tests):
- 240+ total tests, 100% pass rate
- >85% code coverage
- Zero new warnings

Project Status: Phase 5 complete (85% overall), ready for NT8 integration
2026-02-16 21:30:51 -05:00
mo
fb2b0b6cf3 feat: Complete Phase 2 - Enhanced Risk & Sizing
Some checks failed
Build and Test / build (push) Has been cancelled
Implementation (7 files, ~2,640 lines):
- AdvancedRiskManager with Tier 2-3 risk controls
  * Weekly rolling loss limits (7-day window, Monday rollover)
  * Trailing drawdown protection from peak equity
  * Cross-strategy exposure limits by symbol
  * Correlation-based position limits
  * Time-based trading windows
  * Risk mode system (Normal/Aggressive/Conservative)
  * Cooldown periods after violations

- Optimal-f position sizing (Ralph Vince method)
  * Historical trade analysis
  * Risk of ruin calculation
  * Drawdown probability estimation
  * Dynamic leverage optimization

- Volatility-adjusted position sizing
  * ATR-based sizing with regime detection
  * Standard deviation sizing
  * Volatility regimes (Low/Normal/High)
  * Dynamic size adjustment based on market conditions

- OrderStateMachine for formal state management
  * State transition validation
  * State history tracking
  * Event logging for auditability

Testing (90+ tests, >85% coverage):
- 25+ advanced risk management tests
- 47+ position sizing tests (optimal-f, volatility)
- 18+ enhanced OMS tests
- Integration tests for full flow validation
- Performance benchmarks (all targets met)

Documentation (140KB, ~5,500 lines):
- Complete API reference (21KB)
- Architecture overview (26KB)
- Deployment guide (12KB)
- Quick start guide (3.5KB)
- Phase 2 completion report (14KB)
- Documentation index

Quality Metrics:
- Zero new compiler warnings
- 100% C# 5.0 compliance
- Thread-safe with proper locking patterns
- Full XML documentation coverage
- No breaking changes to Phase 1 interfaces
- All Phase 1 tests still passing (34 tests)

Performance:
- Risk validation: <3ms (target <5ms) ✅
- Position sizing: <2ms (target <3ms) ✅
- State transitions: <0.5ms (target <1ms) ✅

Phase 2 Status: ✅ COMPLETE
Time: ~3 hours (vs 10-12 hours estimated manual)
Ready for: Phase 3 (Market Microstructure & Execution)
2026-02-16 11:00:13 -05:00
mo
fb4f5d3bde chore: Add project configuration and documentation
Some checks failed
Build and Test / build (push) Has been cancelled
- Kilocode AI agent rules and guidelines
- Setup and implementation guides
- Architecture documentation
- Build and verification references
2026-02-15 14:59:36 -05:00
Billy Valentine
92f3732b3d Phase 0 completion: NT8 SDK core framework with risk management and position sizing
Some checks failed
Build and Test / build (push) Has been cancelled
2025-09-09 17:06:37 -04:00