Tweak the backtests.

* Start from 2011 instead of 2013.
* Validate over two years instead of one.
This commit is contained in:
sam
2024-11-16 20:00:58 -08:00
parent 47b2ce1476
commit 453df222d6
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ After running comprehensive backtests across multiple periods from 2013-2024, we
1. Refined Backtest Framework
- 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
2. Performance Evaluation Approach
+4 -2
View File
@@ -1019,6 +1019,8 @@ def run_projection(args):
def run_projections(df):
# Create main projection
projection_starts = [
"2011-01-01",
"2012-01-01",
"2013-01-01",
"2014-01-01",
"2015-01-01",
@@ -1073,7 +1075,7 @@ def run_single_backtest(args):
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.
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
# 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(
days=min_training_days + validation_days
)