@@ -40,12 +40,17 @@ class BacktestConfig(dg.Config):
4040 description = "Backtest economy state analysis with historical data cutoff" ,
4141 deps = [
4242 dg .AssetKey (["fred_series_latest_aggregates_snapshot" ]),
43+ dg .AssetKey (["fred_monthly_diff" ]),
4344 dg .AssetKey (["leading_econ_return_indicator_snapshot" ]),
4445 dg .AssetKey (["us_sector_summary_snapshot" ]),
46+ dg .AssetKey (["major_indicies_summary" ]),
4547 dg .AssetKey (["energy_commodities_summary_snapshot" ]),
4648 dg .AssetKey (["input_commodities_summary_snapshot" ]),
4749 dg .AssetKey (["agriculture_commodities_summary_snapshot" ]),
4850 dg .AssetKey (["financial_conditions_index" ]),
51+ dg .AssetKey (["housing_inventory_latest_aggregates" ]),
52+ dg .AssetKey (["housing_mortgage_rates" ]),
53+ dg .AssetKey (["stg_treasury_yields" ]),
4954 ],
5055)
5156def backtest_analyze_economy_state (
@@ -97,6 +102,21 @@ def backtest_analyze_economy_state(
97102 md , cutoff_date = config .backtest_date
98103 )
99104
105+ context .log .info ("Gathering housing market data with cutoff date..." )
106+ housing_data = economic_analysis .get_housing_data (
107+ md , cutoff_date = config .backtest_date
108+ )
109+
110+ context .log .info ("Gathering yield curve data with cutoff date..." )
111+ yield_curve_data = economic_analysis .get_yield_curve_data (
112+ md , cutoff_date = config .backtest_date
113+ )
114+
115+ context .log .info ("Gathering economic trends data with cutoff date..." )
116+ economic_trends = economic_analysis .get_economic_trends (
117+ md , cutoff_date = config .backtest_date
118+ )
119+
100120 optimized_analyzer = None
101121 if config .use_optimized_models and economic_analysis .use_optimized_models :
102122 optimized_analyzer = economic_analysis .load_optimized_module (
@@ -126,12 +146,15 @@ def backtest_analyze_economy_state(
126146 )
127147
128148 context .log .info (
129- f"Running economy state analysis with historical data including FCI (personality: { config .personality } )..."
149+ f"Running economy state analysis with historical data including FCI, housing, yield curve, and trends (personality: { config .personality } )..."
130150 )
131151 analysis_result = analyzer_to_use (
132152 economic_data = economic_data ,
133153 commodity_data = commodity_data ,
134154 financial_conditions_index = fci_data ,
155+ housing_data = housing_data ,
156+ yield_curve_data = yield_curve_data ,
157+ economic_trends = economic_trends ,
135158 personality = config .personality ,
136159 )
137160
@@ -155,6 +178,16 @@ def backtest_analyze_economy_state(
155178 "agriculture_commodities_summary_snapshot" ,
156179 ],
157180 "financial_conditions_index_table" : "financial_conditions_index" ,
181+ "housing_data_tables" : [
182+ "housing_inventory_latest_aggregates" ,
183+ "housing_mortgage_rates" ,
184+ ],
185+ "yield_curve_table" : "stg_treasury_yields" ,
186+ "economic_trends_table" : "fred_monthly_diff" ,
187+ "market_data_tables" : [
188+ "us_sector_summary_snapshot" ,
189+ "major_indicies_summary" ,
190+ ],
158191 },
159192 }
160193
0 commit comments