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:
DaM
2026-02-02 14:38:05 +01:00
parent c569170fcc
commit f85c522f22
53 changed files with 2389 additions and 104 deletions

View File

View File

View 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)

View File

@@ -0,0 +1,26 @@
from itertools import product
from src.strategies.trend_filtered import TrendFilteredMACrossover
class TrendFilteredMAOptimization:
name = "TrendFiltered_MA"
@staticmethod
def parameter_grid():
fast = [10, 15, 20, 25, 30]
slow = [40, 50, 60, 80, 100]
adx = [15, 20, 25, 30]
min_gap = 15
for f, s, a in product(fast, slow, adx):
if s - f >= min_gap:
yield {
"fast_period": f,
"slow_period": s,
"ma_type": "ema",
"adx_threshold": a,
}
@staticmethod
def build_strategy(params):
return TrendFilteredMACrossover(**params)