Commit Graph

22 Commits

Author SHA1 Message Date
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