feat: wire 6 new strategies and fundamentals into signal generator

This commit is contained in:
Viktor Barzin 2026-02-23 21:55:59 +00:00
parent 4d6bebe6f7
commit b8eaa20d63
No known key found for this signature in database
GPG key ID: 0EB088298288D958
5 changed files with 169 additions and 11 deletions

View file

@ -1,9 +1,15 @@
"""Seed default trading strategies.
Inserts three strategies with equal initial weights (0.333 each):
Inserts nine strategies with equal initial weights (~0.111 each):
- momentum
- mean_reversion
- news_driven
- value
- macd_crossover
- bollinger_breakout
- vwap
- liquidity
- ma_stack
Usage:
python -m scripts.seed_strategies
@ -30,7 +36,7 @@ DEFAULT_STRATEGIES = [
"Buy when price crosses above N-period SMA with increasing volume; "
"sell when it crosses below."
),
"current_weight": 0.333,
"current_weight": 0.111,
"active": True,
},
{
@ -39,7 +45,7 @@ DEFAULT_STRATEGIES = [
"Buy when RSI < 30 (oversold); sell when RSI > 70 (overbought). "
"Signal strength proportional to RSI extremity."
),
"current_weight": 0.333,
"current_weight": 0.111,
"active": True,
},
{
@ -48,7 +54,61 @@ DEFAULT_STRATEGIES = [
"Buy on strong positive sentiment (score > 0.7, confidence > 0.6); "
"sell on strong negative. Decay factor for stale news (> 4 hours)."
),
"current_weight": 0.333,
"current_weight": 0.111,
"active": True,
},
{
"name": "value",
"description": (
"Fundamental valuation: LONG when PEG < 1.0 and P/E < 25 with positive "
"EPS growth; SHORT when PEG > 3.0 or P/E > 50 with negative growth."
),
"current_weight": 0.111,
"active": True,
},
{
"name": "macd_crossover",
"description": (
"MACD/signal line crossover: LONG on bullish crossover (MACD crosses above "
"signal), SHORT on bearish. Strength from histogram magnitude."
),
"current_weight": 0.111,
"active": True,
},
{
"name": "bollinger_breakout",
"description": (
"Bollinger Band breakout: LONG on upper band break with high volume (momentum) "
"or below lower band (mean reversion). SHORT on failed breakout."
),
"current_weight": 0.111,
"active": True,
},
{
"name": "vwap",
"description": (
"VWAP crossover: LONG when price crosses above VWAP with increasing volume, "
"SHORT when below."
),
"current_weight": 0.111,
"active": True,
},
{
"name": "liquidity",
"description": (
"Volume-based: LONG on high relative volume (>2x) with rising price, "
"SHORT on high volume with falling price or bearish divergence."
),
"current_weight": 0.112,
"active": True,
},
{
"name": "ma_stack",
"description": (
"Moving average alignment: LONG when price > EMA-9 > EMA-21 > SMA-50 > "
"SMA-200 (full bull stack). Golden/death cross detection."
),
"current_weight": 0.111,
"active": True,
},
]