Completed: Strategy Factory with 50 base templates, batch backtesting (200 strategies/cycle), genetic evolution (crossover + mutation). Immediate run on startup, 30-min interval. API endpoint /api/strategies.
Results: Population: 200, Generation: 0, Top Fitness: 0.404, Throughput: ~200K strategies/min
- Best: Volatility Expansion (volatility category)
- Templates: 48 active (Trend:15, MeanRev:15, Momentum:10, Volatility:5, Pattern:3)
- Port: 3002 (separate Express server)
Files created:
• strategy-factory.js — StrategyFactory class (50 templates, batch backtest, evolution)
• engine-manager.js — Updated: _runStrategyFactory(), interval 30min, immediate run
• index.js — Updated: Strategy Factory Express server on port 3002
• routes/market.js — Updated: /api/strategies endpoint
Architecture:
• nt-mcp main API: port 3003
• Strategy Factory API: port 3002
• nginx: /api/* → 3003, /api/strategies → 3002
Templates:
• Trend Following (15): MA Cross, EMA, ADX, MACD, Parabolic SAR, Ichimoku, SuperTrend, Donchian, Keltner, Volume-Trend, Hull MA, Triple MA, Price Channel, Aroon, Vortex
• Mean Reversion (15): RSI, Bollinger, Stochastic, CCI, Williams %R, MFI, ROC, Deviation, Fibonacci, CMO, Ultimate Oscillator, TRIX, APO, KST
• Momentum (10): RSI-Momentum, MACD-Momentum, Awesome Oscillator, Coppock, Klinger, RVI, TSI, Force Index, EOM
• Volatility Breakout (5): BB Squeeze, Keltner Squeeze, ATR Break, Vol Expansion, Chandelier
• Pattern/Composite (5): Engulfing, Doji Reversal, Three Soldiers, RSI+BB Composite, MACD+RSI Composite
Fitness Function:
• Fitness = Sharpe × WinRate × (1 - MaxDD) × Consistency
• Elite selection: top 20% strategies preserved
• Tournament selection: size 3
• Crossover: single-point with 70% probability
• Mutation: per-parameter with 15% rate