feat: finalize portfolio system and quantitative validation- Finalized MA_Crossover(30,100) and TrendFiltered_MA(30,100,ADX=15)
- Implemented portfolio engine with risk-based allocation (50/50) - Added equity-based metrics for system-level evaluation - Validated portfolio against standalone strategies - Reduced max drawdown and volatility at system level - Quantitative decision closed before paper trading phase
This commit is contained in:
25
src/strategies/optimization/opt_moving_average.py
Normal file
25
src/strategies/optimization/opt_moving_average.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from itertools import product
|
||||
from src.strategies.moving_average import MovingAverageCrossover
|
||||
|
||||
class MACrossoverOptimization:
|
||||
|
||||
name = "MA_Crossover"
|
||||
|
||||
@staticmethod
|
||||
def parameter_grid():
|
||||
fast = [10, 15, 20, 25, 30]
|
||||
slow = [40, 50, 60, 80, 100]
|
||||
min_gap = 15
|
||||
|
||||
for f, s in product(fast, slow):
|
||||
if s - f >= min_gap:
|
||||
yield {
|
||||
"fast_period": f,
|
||||
"slow_period": s,
|
||||
"ma_type": "ema",
|
||||
"use_adx": False,
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def build_strategy(params):
|
||||
return MovingAverageCrossover(**params)
|
||||
Reference in New Issue
Block a user