Tweak the backtests.
* Start from 2011 instead of 2013. * Validate over two years instead of one.
This commit is contained in:
@@ -112,7 +112,7 @@ After running comprehensive backtests across multiple periods from 2013-2024, we
|
|||||||
|
|
||||||
1. Refined Backtest Framework
|
1. Refined Backtest Framework
|
||||||
- Implemented more granular 6-month step testing periods
|
- Implemented more granular 6-month step testing periods
|
||||||
- Standardized minimum training period (1 years) and validation window (8 years)
|
- Standardized minimum training period (2 years) and validation window (8 years)
|
||||||
- Separated results into "normal" and "stress" periods for clearer performance assessment
|
- Separated results into "normal" and "stress" periods for clearer performance assessment
|
||||||
|
|
||||||
2. Performance Evaluation Approach
|
2. Performance Evaluation Approach
|
||||||
|
|||||||
@@ -1019,6 +1019,8 @@ def run_projection(args):
|
|||||||
def run_projections(df):
|
def run_projections(df):
|
||||||
# Create main projection
|
# Create main projection
|
||||||
projection_starts = [
|
projection_starts = [
|
||||||
|
"2011-01-01",
|
||||||
|
"2012-01-01",
|
||||||
"2013-01-01",
|
"2013-01-01",
|
||||||
"2014-01-01",
|
"2014-01-01",
|
||||||
"2015-01-01",
|
"2015-01-01",
|
||||||
@@ -1073,7 +1075,7 @@ def run_single_backtest(args):
|
|||||||
return {"params": params, "error": str(e), "success": False}
|
return {"params": params, "error": str(e), "success": False}
|
||||||
|
|
||||||
|
|
||||||
def run_systematic_backtests(df, validation_years=1, min_training_years=8):
|
def run_systematic_backtests(df, validation_years=2, min_training_years=8):
|
||||||
"""
|
"""
|
||||||
Run a comprehensive suite of backtests with consistent validation periods.
|
Run a comprehensive suite of backtests with consistent validation periods.
|
||||||
Uses sliding windows for both start and end dates.
|
Uses sliding windows for both start and end dates.
|
||||||
@@ -1083,7 +1085,7 @@ def run_systematic_backtests(df, validation_years=1, min_training_years=8):
|
|||||||
min_training_days = min_training_years * 365
|
min_training_days = min_training_years * 365
|
||||||
|
|
||||||
# Define start date for reliable data
|
# Define start date for reliable data
|
||||||
mature_start = pd.Timestamp("2013-01-01")
|
mature_start = pd.Timestamp("2011-01-01")
|
||||||
last_possible_start = df["Date"].max() - pd.Timedelta(
|
last_possible_start = df["Date"].max() - pd.Timedelta(
|
||||||
days=min_training_days + validation_days
|
days=min_training_days + validation_days
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user