diff --git a/.mcp.json b/.mcp.json index beb255e..69925d4 100644 --- a/.mcp.json +++ b/.mcp.json @@ -1,5 +1,12 @@ { "mcpServers": { + "dbt_index": { + "command": "dbt-index", + "args": [ + "--auto-reingest", + "serve" + ] + }, "motherduck": { "type": "http", "url": "https://mcp.motherduck.com/mcp", diff --git a/dbt_project/models/commodities/schema.yml b/dbt_project/models/commodities/schema.yml index 2910fde..fab8171 100644 --- a/dbt_project/models/commodities/schema.yml +++ b/dbt_project/models/commodities/schema.yml @@ -117,19 +117,35 @@ models: - name: energy_commodities_analysis_return description: > - Daily rolling analysis of energy commodities with rolling windows (1 year, 9 months, 6 months, 3 months, 1 month). - For each window, calculates highs, lows, standard deviation of daily price differences, and percentage changes. + Daily spot prices and rolling returns for energy commodities + (crude oil, natural gas, gasoline, heating oil). + Grain: one row per commodity per unit per trading day. + semantic_model: + enabled: true + name: energy_commodity_prices + agg_time_dimension: trade_date columns: - name: commodity_name description: Name of the energy commodity + entity: + name: energy_commodity + type: primary + dimension: + type: categorical tests: - not_null - name: commodity_unit description: Unit of measurement for the commodity + dimension: + type: categorical tests: - not_null - name: date description: Trading date + granularity: day + dimension: + name: trade_date + type: time tests: - not_null - name: current_price @@ -174,22 +190,45 @@ models: description: Standard deviation of daily price differences over the past 1 month - name: pct_change_1mo description: Percentage change from 1 month ago to current price + metrics: + - name: energy_return_1yr + label: Energy Commodity 1-Year Return (%) + description: 1-year trailing return for energy commodities. + type: simple + agg: average + expr: pct_change_1yr - name: input_commodities_analysis_return description: > - Daily rolling analysis of input/industrial commodities with rolling windows (1 year, 9 months, 6 months, 3 months, 1 month). - For each window, calculates highs, lows, standard deviation of daily price differences, and percentage changes. + Daily spot prices and rolling returns for industrial/input commodities + (e.g. crude oil, natural gas, copper, aluminum). + Grain: one row per commodity per unit per trading day. + semantic_model: + enabled: true + name: commodity_daily_prices + agg_time_dimension: trade_date columns: - name: commodity_name description: Name of the input/industrial commodity + entity: + name: commodity + type: primary + dimension: + type: categorical tests: - not_null - name: commodity_unit description: Unit of measurement for the commodity + dimension: + type: categorical tests: - not_null - name: date description: Trading date + granularity: day + dimension: + name: trade_date + type: time tests: - not_null - name: current_price @@ -234,22 +273,57 @@ models: description: Standard deviation of daily price differences over the past 1 month - name: pct_change_1mo description: Percentage change from 1 month ago to current price + metrics: + - name: commodity_spot_price + label: Commodity Spot Price + description: Daily spot price for the selected commodity. + type: simple + agg: max + expr: current_price + - name: commodity_return_1mo + label: Commodity 1-Month Return (%) + description: 1-month trailing return for commodities. + type: simple + agg: average + expr: pct_change_1mo + - name: commodity_return_1yr + label: Commodity 1-Year Return (%) + description: 1-year trailing return for commodities. + type: simple + agg: average + expr: pct_change_1yr - name: agriculture_commodities_analysis_return description: > - Daily rolling analysis of agriculture commodities with rolling windows (1 year, 9 months, 6 months, 3 months, 1 month). - For each window, calculates highs, lows, standard deviation of daily price differences, and percentage changes. + Daily spot prices and rolling returns for agricultural commodities + (corn, wheat, soybeans, etc.). + Grain: one row per commodity per unit per trading day. + semantic_model: + enabled: true + name: agriculture_commodity_prices + agg_time_dimension: trade_date columns: - name: commodity_name description: Name of the agriculture commodity + entity: + name: agri_commodity + type: primary + dimension: + type: categorical tests: - not_null - name: commodity_unit description: Unit of measurement for the commodity + dimension: + type: categorical tests: - not_null - name: date description: Trading date + granularity: day + dimension: + name: trade_date + type: time tests: - not_null - name: current_price @@ -294,3 +368,10 @@ models: description: Standard deviation of daily price differences over the past 1 month - name: pct_change_1mo description: Percentage change from 1 month ago to current price + metrics: + - name: agri_return_1yr + label: Agricultural Commodity 1-Year Return (%) + description: 1-year trailing return for agricultural commodities. + type: simple + agg: average + expr: pct_change_1yr diff --git a/dbt_project/models/commodities/semantic_models.yml b/dbt_project/models/commodities/semantic_models.yml deleted file mode 100644 index 69963e8..0000000 --- a/dbt_project/models/commodities/semantic_models.yml +++ /dev/null @@ -1,112 +0,0 @@ -version: 2 - -semantic_models: - - name: commodity_daily_prices - description: > - Daily spot prices and rolling returns for industrial/input commodities - (e.g. crude oil, natural gas, copper, aluminum). - Grain: one row per commodity per unit per trading day. - model: ref('input_commodities_analysis_return') - defaults: - agg_time_dimension: trade_date - entities: - - name: commodity - type: primary - expr: "commodity_name || '|' || commodity_unit" - dimensions: - - name: trade_date - type: time - type_params: - time_granularity: day - expr: date - - name: commodity_name - type: categorical - - name: commodity_unit - type: categorical - measures: - - name: spot_price - agg: max - expr: current_price - description: Daily spot price in commodity_unit terms - - name: commodity_return_1mo - agg: average - expr: pct_change_1mo - - name: commodity_return_3mo - agg: average - expr: pct_change_3mo - - name: commodity_return_6mo - agg: average - expr: pct_change_6mo - - name: commodity_return_1yr - agg: average - expr: pct_change_1yr - - name: commodity_price_std_1yr - agg: average - expr: std_diff_1yr - description: 1-year standard deviation of daily price changes - - - name: energy_commodity_prices - description: > - Daily spot prices and rolling returns for energy commodities - (crude oil, natural gas, gasoline, heating oil). - Grain: one row per commodity per unit per trading day. - model: ref('energy_commodities_analysis_return') - defaults: - agg_time_dimension: trade_date - entities: - - name: energy_commodity - type: primary - expr: "commodity_name || '|' || commodity_unit" - dimensions: - - name: trade_date - type: time - type_params: - time_granularity: day - expr: date - - name: commodity_name - type: categorical - - name: commodity_unit - type: categorical - measures: - - name: energy_spot_price - agg: max - expr: current_price - - name: energy_return_1mo - agg: average - expr: pct_change_1mo - - name: energy_return_1yr - agg: average - expr: pct_change_1yr - - - name: agriculture_commodity_prices - description: > - Daily spot prices and rolling returns for agricultural commodities - (corn, wheat, soybeans, etc.). - Grain: one row per commodity per unit per trading day. - model: ref('agriculture_commodities_analysis_return') - defaults: - agg_time_dimension: trade_date - entities: - - name: agri_commodity - type: primary - expr: "commodity_name || '|' || commodity_unit" - dimensions: - - name: trade_date - type: time - type_params: - time_granularity: day - expr: date - - name: commodity_name - type: categorical - - name: commodity_unit - type: categorical - measures: - - name: agri_spot_price - agg: max - expr: current_price - - name: agri_return_1mo - agg: average - expr: pct_change_1mo - - name: agri_return_1yr - agg: average - expr: pct_change_1yr diff --git a/dbt_project/models/government/schema.yml b/dbt_project/models/government/schema.yml index 405f653..fa1f8f7 100644 --- a/dbt_project/models/government/schema.yml +++ b/dbt_project/models/government/schema.yml @@ -76,11 +76,56 @@ models: - name: fred_monthly_diff description: > - Economic time series data with monthly grain and simple difference imputation + Monthly FRED economic indicator values with period-over-period change. + Grain: one row per series_code per month. + Covers: GDP, CPI, PCE, unemployment rate, Fed funds rate, housing starts, + industrial production, and 100+ other macro series. + semantic_model: + enabled: true + name: economic_indicators + agg_time_dimension: observation_date columns: - name: series_code + description: FRED series identifier (e.g. UNRATE, FEDFUNDS, CPIAUCSL) + entity: + name: fred_series + type: primary + dimension: + type: categorical tests: - not_null - name: date + granularity: month + dimension: + name: observation_date + type: time tests: - not_null + - name: series_name + description: Human-readable series name + dimension: + type: categorical + - name: data_source + dimension: + type: categorical + - name: value + description: Series value for the observation period + - name: period_diff + description: Absolute month-over-month change in indicator value + metrics: + - name: fred_indicator_value + label: FRED Indicator Value + description: > + Current or most-recent value of a FRED economic series. + Group by series_code or series_name to compare multiple indicators. + type: simple + agg: max + expr: value + - name: fred_mom_change + label: FRED Month-over-Month Change + description: > + Absolute month-over-month change in FRED indicator value. + Positive = rising, negative = falling. + type: simple + agg: max + expr: period_diff diff --git a/dbt_project/models/government/semantic_models.yml b/dbt_project/models/government/semantic_models.yml deleted file mode 100644 index c1d3cdd..0000000 --- a/dbt_project/models/government/semantic_models.yml +++ /dev/null @@ -1,42 +0,0 @@ -version: 2 - -semantic_models: - - name: economic_indicators - description: > - Monthly FRED economic indicator values with period-over-period change. - Grain: one row per series_code per month. - Covers: GDP, CPI, PCE, unemployment rate, Fed funds rate, housing starts, - industrial production, and 100+ other macro series. - model: ref('fred_monthly_diff') - defaults: - agg_time_dimension: observation_date - entities: - - name: fred_series - type: primary - expr: "series_code || '|' || CAST(date AS VARCHAR)" - dimensions: - - name: observation_date - type: time - type_params: - time_granularity: month - expr: date - - name: series_code - type: categorical - description: FRED series identifier (e.g. UNRATE, FEDFUNDS, CPIAUCSL) - - name: series_name - type: categorical - description: Human-readable series name - - name: data_source - type: categorical - measures: - - name: indicator_value - agg: max - expr: value - description: Series value for the observation period - - name: indicator_mom_change - agg: max - expr: period_diff - description: Absolute month-over-month change in indicator value - - name: series_count - agg: count_distinct - expr: series_code diff --git a/dbt_project/models/markets/schema.yml b/dbt_project/models/markets/schema.yml index 186e049..dbb4b24 100644 --- a/dbt_project/models/markets/schema.yml +++ b/dbt_project/models/markets/schema.yml @@ -199,69 +199,63 @@ models: - name: currency_analysis_return description: > - Daily rolling analysis of currency pairs with rolling windows (1 year, 9 months, 6 months, 3 months, 1 month). - For each window, calculates highs, lows, standard deviation of daily price differences, and percentage changes. + Daily forex exchange rates and rolling returns. + Grain: one row per currency pair per trading day. + semantic_model: + enabled: true + name: currency_daily_rates + agg_time_dimension: trade_date columns: - name: symbol description: Currency pair symbol + entity: + name: currency_pair + type: primary + dimension: + type: categorical tests: - not_null - name: exchange description: Exchange where the currency pair is traded + dimension: + type: categorical tests: - not_null - name: date description: Trading date + granularity: day + dimension: + name: trade_date + type: time tests: - not_null - name: current_price description: Current adjusted close price - - name: current_high - description: Current day's high price - - name: current_low - description: Current day's low price - - name: current_volume - description: Current day's trading volume - - name: high_1yr - description: Maximum price over the past 1 year - - name: low_1yr - description: Minimum price over the past 1 year - - name: std_diff_1yr - description: Standard deviation of daily price differences over the past 1 year - - name: pct_change_1yr - description: Percentage change from 1 year ago to current price - - name: high_9mo - description: Maximum price over the past 9 months - - name: low_9mo - description: Minimum price over the past 9 months - - name: std_diff_9mo - description: Standard deviation of daily price differences over the past 9 months - - name: pct_change_9mo - description: Percentage change from 9 months ago to current price - - name: high_6mo - description: Maximum price over the past 6 months - - name: low_6mo - description: Minimum price over the past 6 months - - name: std_diff_6mo - description: Standard deviation of daily price differences over the past 6 months - - name: pct_change_6mo - description: Percentage change from 6 months ago to current price - - name: high_3mo - description: Maximum price over the past 3 months - - name: low_3mo - description: Minimum price over the past 3 months - - name: std_diff_3mo - description: Standard deviation of daily price differences over the past 3 months - - name: pct_change_3mo - description: Percentage change from 3 months ago to current price - - name: high_1mo - description: Maximum price over the past 1 month - - name: low_1mo - description: Minimum price over the past 1 month - - name: std_diff_1mo - description: Standard deviation of daily price differences over the past 1 month - name: pct_change_1mo description: Percentage change from 1 month ago to current price + - name: pct_change_1yr + description: Percentage change from 1 year ago to current price + metrics: + - name: fx_spot_rate + label: FX Spot Rate + description: > + Maximum daily FX rate across the selected currency pairs and time range. + Group by currency pair and trade_date for point-in-time rates. + type: simple + agg: max + expr: current_price + - name: fx_return_1mo + label: FX 1-Month Return (%) + description: Average 1-month trailing return across selected currency pairs. + type: simple + agg: average + expr: pct_change_1mo + - name: fx_return_1yr + label: FX 1-Year Return (%) + description: Average 1-year trailing return across selected currency pairs. + type: simple + agg: average + expr: pct_change_1yr - name: global_markets_analysis_return description: > @@ -349,21 +343,118 @@ models: - name: sp500_companies_analysis_return description: > - Daily rolling analysis of S&P 500 companies with rolling windows (1 year, 9 months, 6 months, 3 months, 1 month). - For each window, calculates highs, lows, standard deviation of daily price differences, and percentage changes. + Daily OHLCV price data and rolling returns for S&P 500 companies. + Grain: one row per symbol per exchange per trading day. + semantic_model: + enabled: true + name: market_daily_prices + agg_time_dimension: trade_date columns: - name: symbol description: Company symbol + entity: + name: stock + type: primary + dimension: + type: categorical tests: - not_null - name: exchange description: Exchange where the security is traded + dimension: + type: categorical tests: - not_null - name: date description: Trading date + granularity: day + dimension: + name: trade_date + type: time tests: - not_null + - name: current_price + description: Current adjusted close price + - name: current_volume + description: Current day's trading volume + - name: pct_change_1mo + description: Percentage change from 1 month ago to current price + - name: pct_change_3mo + description: Percentage change from 3 months ago to current price + - name: pct_change_6mo + description: Percentage change from 6 months ago to current price + - name: pct_change_1yr + description: Percentage change from 1 year ago to current price + - name: std_diff_1yr + description: Standard deviation of daily price differences over the past 1 year + metrics: + - name: max_close_price + label: Max Close Price + description: > + Maximum daily closing price across the selected symbols and time range. + Group by stock and trade_date for point-in-time close price analysis. + type: simple + agg: max + expr: current_price + fill_nulls_with: 0 + - name: total_volume + label: Total Trading Volume + description: Total share volume traded across selected symbols and time range. + type: simple + agg: sum + expr: current_volume + - name: avg_return_1mo + label: Avg 1-Month Return (%) + description: > + Average 1-month trailing price return (%). Reflects the mean of each + symbol's 1-month lookback return across selected dates. + type: simple + agg: average + expr: pct_change_1mo + - name: avg_return_3mo + label: Avg 3-Month Return (%) + description: Average 3-month trailing price return (%). + type: simple + agg: average + expr: pct_change_3mo + - name: avg_return_6mo + label: Avg 6-Month Return (%) + description: Average 6-month trailing price return (%). + type: simple + agg: average + expr: pct_change_6mo + - name: avg_return_1yr + label: Avg 1-Year Return (%) + description: > + Average 1-year trailing price return (%). Common baseline for annual + performance comparisons (not annualized — reflects actual 12m return). + type: simple + agg: average + expr: pct_change_1yr + - name: price_volatility_proxy + label: Price Volatility (1-Year StdDev) + description: > + Average 1-year standard deviation of daily dollar price changes. + Higher = more price dispersion. For a normalized volatility ratio, + see annualized_volatility_ratio. + type: simple + agg: average + expr: std_diff_1yr + - name: annualized_volatility_ratio + label: Annualized Volatility Ratio + description: > + Average ratio of 1-year price StdDev to close price — a dimensionless + proxy for annualized volatility (analogous to daily vol * sqrt(252) / price). + Higher = more volatile relative to price level. + type: simple + agg: average + expr: std_diff_1yr / nullif(current_price, 0) + - name: unique_symbols + label: Distinct Symbols + description: Count of distinct ticker symbols in the selection. + type: simple + agg: count_distinct + expr: symbol - name: nasdaq_companies_analysis_return description: > @@ -433,19 +524,34 @@ models: - name: us_sector_analysis_return description: > - Daily rolling analysis of US sector ETFs with rolling windows (1 year, 9 months, 6 months, 3 months, 1 month). - For each window, calculates highs, lows, standard deviation of daily price differences, and percentage changes. + Daily OHLCV price data and rolling returns for US sector ETFs. + Grain: one row per sector symbol per exchange per trading day. + semantic_model: + enabled: true + name: sector_daily_performance + agg_time_dimension: trade_date columns: - name: symbol description: US sector ETF symbol + entity: + name: sector_etf + type: primary + dimension: + type: categorical tests: - not_null - name: exchange description: Exchange where the ETF is traded + dimension: + type: categorical tests: - not_null - name: date description: Trading date + granularity: day + dimension: + name: trade_date + type: time tests: - not_null - name: current_price @@ -496,22 +602,64 @@ models: description: Standard deviation of daily price differences over the past 1 month - name: pct_change_1mo description: Percentage change from 1 month ago to current price + metrics: + - name: sector_avg_return_1yr + label: Sector Avg 1-Year Return (%) + description: Average 1-year trailing return across sector ETFs. + type: simple + agg: average + expr: pct_change_1yr + - name: sector_avg_return_1mo + label: Sector Avg 1-Month Return (%) + description: Average 1-month trailing return across sector ETFs. + type: simple + agg: average + expr: pct_change_1mo + - name: sector_volatility_proxy + label: Sector Price Volatility (1-Year StdDev) + description: Average 1-year standard deviation of daily price changes for sector ETFs. + type: simple + agg: average + expr: std_diff_1yr + - name: sector_max_close_price + label: Sector Max Close Price + description: > + Maximum daily closing price for sector ETFs across the selected time range. + Group by sector ETF and trade_date for point-in-time price analysis. + type: simple + agg: max + expr: current_price - name: fixed_income_analysis_return description: > - Daily rolling analysis of fixed income ETFs with rolling windows (1 year, 9 months, 6 months, 3 months, 1 month). - For each window, calculates highs, lows, standard deviation of daily price differences, and percentage changes. + Daily price data and rolling returns for fixed income instruments (bonds, Treasuries). + Grain: one row per symbol per exchange per trading day. + semantic_model: + enabled: true + name: fixed_income_daily_prices + agg_time_dimension: trade_date columns: - name: symbol description: Fixed income ETF symbol + entity: + name: bond_instrument + type: primary + dimension: + type: categorical tests: - not_null - name: exchange description: Exchange where the ETF is traded + dimension: + type: categorical tests: - not_null - name: date description: Trading date + granularity: day + dimension: + name: trade_date + type: time tests: - not_null - name: current_price @@ -562,4 +710,30 @@ models: description: Standard deviation of daily price differences over the past 1 month - name: pct_change_1mo description: Percentage change from 1 month ago to current price - + metrics: + - name: bond_max_price + label: Fixed Income Max Price + description: > + Maximum daily price for fixed income instruments across the selected time range. + Group by bond instrument and trade_date for point-in-time price analysis. + type: simple + agg: max + expr: current_price + - name: bond_return_1mo + label: Fixed Income 1-Month Return (%) + description: Average 1-month trailing return across selected fixed income instruments. + type: simple + agg: average + expr: pct_change_1mo + - name: bond_return_1yr + label: Fixed Income 1-Year Return (%) + description: Average 1-year trailing return across selected fixed income instruments. + type: simple + agg: average + expr: pct_change_1yr + - name: bond_volatility_proxy + label: Fixed Income Price Volatility (1-Year StdDev) + description: Average 1-year standard deviation of daily price changes for fixed income instruments. + type: simple + agg: average + expr: std_diff_1yr diff --git a/dbt_project/models/markets/semantic_models.yml b/dbt_project/models/markets/semantic_models.yml deleted file mode 100644 index c1316e1..0000000 --- a/dbt_project/models/markets/semantic_models.yml +++ /dev/null @@ -1,176 +0,0 @@ -version: 2 - -semantic_models: - - name: market_daily_prices - description: > - Daily OHLCV price data and rolling returns for S&P 500 companies. - Grain: one row per symbol per exchange per trading day. - model: ref('sp500_companies_analysis_return') - defaults: - agg_time_dimension: trade_date - entities: - - name: stock - type: primary - expr: "symbol || '|' || exchange" - dimensions: - - name: trade_date - type: time - type_params: - time_granularity: day - expr: date - - name: symbol - type: categorical - - name: exchange - type: categorical - measures: - - name: close_price - agg: max - expr: current_price - description: Daily closing price - - name: high_price - agg: max - expr: current_high - - name: low_price - agg: min - expr: current_low - - name: share_volume - agg: sum - expr: current_volume - - name: daily_price_change - agg: average - expr: daily_diff - description: Dollar change from prior close - - name: return_1mo - agg: average - expr: pct_change_1mo - description: 1-month percent price return - - name: return_3mo - agg: average - expr: pct_change_3mo - - name: return_6mo - agg: average - expr: pct_change_6mo - - name: return_9mo - agg: average - expr: pct_change_9mo - - name: return_1yr - agg: average - expr: pct_change_1yr - description: 1-year percent price return - - name: price_std_1yr - agg: average - expr: std_diff_1yr - description: > - 1-year standard deviation of daily dollar price changes. - Divide by close_price to get a dimensionless volatility estimate. - - name: symbol_count - agg: count_distinct - expr: symbol - - - name: sector_daily_performance - description: > - Daily OHLCV price data and rolling returns for US sector ETFs. - Grain: one row per sector symbol per exchange per trading day. - model: ref('us_sector_analysis_return') - defaults: - agg_time_dimension: trade_date - entities: - - name: sector_etf - type: primary - expr: "symbol || '|' || exchange" - dimensions: - - name: trade_date - type: time - type_params: - time_granularity: day - expr: date - - name: symbol - type: categorical - - name: exchange - type: categorical - measures: - - name: sector_close_price - agg: max - expr: current_price - - name: sector_volume - agg: sum - expr: current_volume - - name: sector_return_1mo - agg: average - expr: pct_change_1mo - - name: sector_return_3mo - agg: average - expr: pct_change_3mo - - name: sector_return_1yr - agg: average - expr: pct_change_1yr - - name: sector_price_std_1yr - agg: average - expr: std_diff_1yr - - - name: currency_daily_rates - description: > - Daily forex exchange rates and rolling returns. - Grain: one row per currency pair per trading day. - model: ref('currency_analysis_return') - defaults: - agg_time_dimension: trade_date - entities: - - name: currency_pair - type: primary - expr: "symbol || '|' || exchange" - dimensions: - - name: trade_date - type: time - type_params: - time_granularity: day - expr: date - - name: symbol - type: categorical - - name: exchange - type: categorical - measures: - - name: fx_rate - agg: max - expr: current_price - - name: fx_return_1mo - agg: average - expr: pct_change_1mo - - name: fx_return_1yr - agg: average - expr: pct_change_1yr - - - name: fixed_income_daily_prices - description: > - Daily price data and rolling returns for fixed income instruments (bonds, Treasuries). - Grain: one row per symbol per exchange per trading day. - model: ref('fixed_income_analysis_return') - defaults: - agg_time_dimension: trade_date - entities: - - name: bond_instrument - type: primary - expr: "symbol || '|' || exchange" - dimensions: - - name: trade_date - type: time - type_params: - time_granularity: day - expr: date - - name: symbol - type: categorical - - name: exchange - type: categorical - measures: - - name: bond_price - agg: max - expr: current_price - - name: bond_return_1mo - agg: average - expr: pct_change_1mo - - name: bond_return_1yr - agg: average - expr: pct_change_1yr - - name: bond_price_std_1yr - agg: average - expr: std_diff_1yr diff --git a/dbt_project/models/metrics.yml b/dbt_project/models/metrics.yml deleted file mode 100644 index aae1fc5..0000000 --- a/dbt_project/models/metrics.yml +++ /dev/null @@ -1,433 +0,0 @@ -version: 2 - -metrics: - - # ============================================================ - # EQUITY MARKET METRICS - # ============================================================ - - - name: max_close_price - label: Max Close Price - description: > - Maximum daily closing price across the selected symbols and time range. - Group by stock and trade_date for point-in-time close price analysis. - type: simple - type_params: - measure: - name: close_price - fill_nulls_with: 0 - - - name: total_volume - label: Total Trading Volume - description: Total share volume traded across selected symbols and time range. - type: simple - type_params: - measure: - name: share_volume - - - name: avg_return_1mo - label: Avg 1-Month Return (%) - description: > - Average 1-month trailing price return (%). Reflects the mean of each - symbol's 1-month lookback return across selected dates. - type: simple - type_params: - measure: - name: return_1mo - - - name: avg_return_3mo - label: Avg 3-Month Return (%) - description: Average 3-month trailing price return (%). - type: simple - type_params: - measure: - name: return_3mo - - - name: avg_return_6mo - label: Avg 6-Month Return (%) - description: Average 6-month trailing price return (%). - type: simple - type_params: - measure: - name: return_6mo - - - name: avg_return_1yr - label: Avg 1-Year Return (%) - description: > - Average 1-year trailing price return (%). Common baseline for annual - performance comparisons (not annualized — reflects actual 12m return). - type: simple - type_params: - measure: - name: return_1yr - - - name: price_volatility_proxy - label: Price Volatility (1-Year StdDev) - description: > - Average 1-year standard deviation of daily dollar price changes. - Higher = more price dispersion. For a normalized volatility ratio, - see annualized_volatility_ratio. - type: simple - type_params: - measure: - name: price_std_1yr - - - name: annualized_volatility_ratio - label: Annualized Volatility Ratio - description: > - Ratio of 1-year price StdDev to close price — a dimensionless proxy for - annualized volatility (analogous to daily vol * sqrt(252) / price). - Higher = more volatile relative to price level. - type: ratio - type_params: - numerator: - name: price_volatility_proxy - denominator: - name: max_close_price - - - name: unique_symbols - label: Distinct Symbols - description: Count of distinct ticker symbols in the selection. - type: simple - type_params: - measure: - name: symbol_count - - # ============================================================ - # SECTOR METRICS - # ============================================================ - - - name: sector_avg_return_1yr - label: Sector Avg 1-Year Return (%) - description: Average 1-year trailing return across sector ETFs. - type: simple - type_params: - measure: - name: sector_return_1yr - - - name: sector_avg_return_1mo - label: Sector Avg 1-Month Return (%) - description: Average 1-month trailing return across sector ETFs. - type: simple - type_params: - measure: - name: sector_return_1mo - - - name: sector_volatility_proxy - label: Sector Price Volatility (1-Year StdDev) - description: Average 1-year standard deviation of daily price changes for sector ETFs. - type: simple - type_params: - measure: - name: sector_price_std_1yr - - - name: sector_max_close_price - label: Sector Max Close Price - description: > - Maximum daily closing price for sector ETFs across the selected time range. - Group by sector ETF and trade_date for point-in-time price analysis. - type: simple - type_params: - measure: - name: sector_close_price - - # ============================================================ - # CURRENCY METRICS - # ============================================================ - - - name: fx_spot_rate - label: FX Spot Rate - description: > - Maximum daily FX rate across the selected currency pairs and time range. - Group by currency pair and trade_date for point-in-time rates. - type: simple - type_params: - measure: - name: fx_rate - - - name: fx_return_1mo - label: FX 1-Month Return (%) - description: Average 1-month trailing return across selected currency pairs. - type: simple - type_params: - measure: - name: fx_return_1mo - - - name: fx_return_1yr - label: FX 1-Year Return (%) - description: Average 1-year trailing return across selected currency pairs. - type: simple - type_params: - measure: - name: fx_return_1yr - - # ============================================================ - # FIXED INCOME METRICS - # ============================================================ - - - name: bond_max_price - label: Fixed Income Max Price - description: > - Maximum daily price for fixed income instruments across the selected time range. - Group by bond instrument and trade_date for point-in-time price analysis. - type: simple - type_params: - measure: - name: bond_price - - - name: bond_return_1mo - label: Fixed Income 1-Month Return (%) - description: Average 1-month trailing return across selected fixed income instruments. - type: simple - type_params: - measure: - name: bond_return_1mo - - - name: bond_return_1yr - label: Fixed Income 1-Year Return (%) - description: Average 1-year trailing return across selected fixed income instruments. - type: simple - type_params: - measure: - name: bond_return_1yr - - - name: bond_volatility_proxy - label: Fixed Income Price Volatility (1-Year StdDev) - description: Average 1-year standard deviation of daily price changes for fixed income instruments. - type: simple - type_params: - measure: - name: bond_price_std_1yr - - # ============================================================ - # COMMODITY METRICS - # ============================================================ - - - name: commodity_spot_price - label: Commodity Spot Price - description: Daily spot price for the selected commodity. - type: simple - type_params: - measure: - name: spot_price - - - name: commodity_return_1mo - label: Commodity 1-Month Return (%) - description: 1-month trailing return for commodities. - type: simple - type_params: - measure: - name: commodity_return_1mo - - - name: commodity_return_1yr - label: Commodity 1-Year Return (%) - description: 1-year trailing return for commodities. - type: simple - type_params: - measure: - name: commodity_return_1yr - - - name: energy_return_1yr - label: Energy Commodity 1-Year Return (%) - description: 1-year trailing return for energy commodities. - type: simple - type_params: - measure: - name: energy_return_1yr - - - name: agri_return_1yr - label: Agricultural Commodity 1-Year Return (%) - description: 1-year trailing return for agricultural commodities. - type: simple - type_params: - measure: - name: agri_return_1yr - - # ============================================================ - # ECONOMIC INDICATOR METRICS (FRED) - # ============================================================ - - - name: fred_indicator_value - label: FRED Indicator Value - description: > - Current or most-recent value of a FRED economic series. - Group by series_code or series_name to compare multiple indicators. - type: simple - type_params: - measure: - name: indicator_value - - - name: fred_mom_change - label: FRED Month-over-Month Change - description: > - Absolute month-over-month change in FRED indicator value. - Positive = rising, negative = falling. - type: simple - type_params: - measure: - name: indicator_mom_change - - # ============================================================ - # INFLATION METRICS - # ============================================================ - - - name: cpi_yoy - label: CPI Year-over-Year (%) - description: Consumer Price Index year-over-year percent change. Core inflation gauge. - type: simple - type_params: - measure: - name: cpi_12m_yoy - - - name: cpi_3m_annualized - label: CPI 3-Month Annualized (%) - description: > - CPI 3-month annualized rate — a forward-looking inflation momentum signal. - When above cpi_yoy, inflation is re-accelerating. - type: simple - type_params: - measure: - name: cpi_3m_annualized - - - name: inflation_momentum - label: CPI Momentum Spread - description: > - 3-month annualized CPI minus 12-month YoY CPI. Positive = re-accelerating - inflation pressure. Negative = inflation decelerating. - type: simple - type_params: - measure: - name: cpi_momentum_spread - - - name: core_pce_yoy - label: Core PCE Year-over-Year (%) - description: > - Core Personal Consumption Expenditures year-over-year change (%). - The Federal Reserve's preferred inflation gauge (2% target). - type: simple - type_params: - measure: - name: core_pce_yoy - - - name: pce_above_target - label: PCE Deviation from 2% Target - description: > - Core PCE minus 2% Fed target. Positive = above target (hawkish signal), - negative = below target (dovish signal). - type: simple - type_params: - measure: - name: pce_vs_target - - - name: breakeven_inflation_5y - label: 5-Year Breakeven Inflation Rate (%) - description: > - Market-implied 5-year inflation expectation from TIPS breakeven. - Reflects bond market inflation pricing over the near-term horizon. - type: simple - type_params: - measure: - name: breakeven_5y - - - name: breakeven_inflation_10y - label: 10-Year Breakeven Inflation Rate (%) - description: Market-implied 10-year inflation expectation from TIPS breakeven. - type: simple - type_params: - measure: - name: breakeven_10y - - - name: breakeven_term_spread - label: 5y/10y Breakeven Spread - description: > - 5-year minus 10-year breakeven spread. Positive = near-term inflation - expectations exceed long-term (front-loaded inflation). Useful for - identifying transitory vs. structural inflation regimes. - type: simple - type_params: - measure: - name: breakeven_5y_10y_spread - - # ============================================================ - # LABOR MARKET METRICS - # ============================================================ - - - name: unemployment_rate - label: Unemployment Rate (%) - description: Civilian unemployment rate. Fed dual-mandate metric. - type: simple - type_params: - measure: - name: unemployment_rate - - - name: labor_market_tightness - label: Job Openings / Unemployed Ratio - description: > - Job openings divided by unemployed workers. > 1.0 = more openings than - job seekers (tight market). < 1.0 = labor slack. Fed watches this closely. - type: simple - type_params: - measure: - name: jo_unemployed_ratio - - - name: labor_tightness_momentum - label: Labor Tightness 3-Month Change - description: > - 3-month change in the job openings / unemployed ratio. Negative = labor - market loosening. Key leading indicator for Fed pivot timing. - type: simple - type_params: - measure: - name: jo_ratio_3m_change - - - name: sahm_rule_indicator - label: Sahm Rule Indicator - description: > - Sahm Rule recession indicator. Based on 3-month average unemployment rate - minus prior 12-month minimum. >= 0.5 historically signals recession onset. - Original work: Claudia Sahm, Fed (2019). - type: simple - type_params: - measure: - name: sahm_rule - - - name: worker_confidence - label: Quits Rate - description: > - Job quits rate. Higher = workers more confident in finding new jobs - (tight market). Declining quits rate signals workers becoming less - confident — often leads unemployment rate rises. - type: simple - type_params: - measure: - name: quits_rate - - - name: initial_claims - label: Average Monthly Initial Claims - description: > - Average monthly initial unemployment insurance claims. Rising claims - are an early warning of labor market deterioration. - type: simple - type_params: - measure: - name: avg_monthly_claims - - - name: employment_population_ratio - label: Employment-Population Ratio (%) - description: > - Share of working-age population that is employed. More stable than - unemployment rate since it does not move with labor force participation. - type: simple - type_params: - measure: - name: employment_ratio - - - name: unrate_3m_momentum - label: Unemployment Rate 3-Month Change - description: > - 3-month change in unemployment rate (percentage points). Component of - the Sahm Rule calculation. Positive = rising unemployment (deteriorating). - type: simple - type_params: - measure: - name: unrate_3m_change diff --git a/dbt_project/models/saved_queries.yml b/dbt_project/models/saved_queries.yml deleted file mode 100644 index 6edaee2..0000000 --- a/dbt_project/models/saved_queries.yml +++ /dev/null @@ -1,129 +0,0 @@ -version: 2 - -saved_queries: - - - name: equity_performance_by_symbol - label: Equity Performance by Symbol - description: > - 1-month, 6-month, and 1-year trailing returns for each S&P 500 symbol - as of the most recent trading day. Use this to rank stocks by momentum - or identify outlier performers. - query_params: - metrics: - - avg_return_1mo - - avg_return_6mo - - avg_return_1yr - - max_close_price - - annualized_volatility_ratio - group_by: - - "Dimension('stock__symbol')" - - "Dimension('stock__exchange')" - - - name: sector_relative_performance - label: Sector Relative Performance - description: > - 1-month and 1-year returns for US sector ETFs. Useful for sector - rotation analysis — which sectors are leading/lagging the broad market? - query_params: - metrics: - - sector_avg_return_1mo - - sector_avg_return_1yr - - sector_volatility_proxy - - sector_max_close_price - group_by: - - "Dimension('sector_etf__symbol')" - - - name: currency_performance_by_pair - label: Currency Performance by Pair - description: > - Spot rate plus 1-month and 1-year FX returns for each currency pair. - Useful for dollar strength, carry proxy, and cross-asset macro checks. - query_params: - metrics: - - fx_spot_rate - - fx_return_1mo - - fx_return_1yr - group_by: - - "Dimension('currency_pair__symbol')" - - "Dimension('currency_pair__exchange')" - - - name: fixed_income_performance_by_instrument - label: Fixed Income Performance by Instrument - description: > - Price, 1-month return, 1-year return, and volatility proxy for fixed income - instruments. Useful for duration, rates, and risk-off regime analysis. - query_params: - metrics: - - bond_max_price - - bond_return_1mo - - bond_return_1yr - - bond_volatility_proxy - group_by: - - "Dimension('bond_instrument__symbol')" - - "Dimension('bond_instrument__exchange')" - - - name: inflation_dashboard - label: Inflation Dashboard - description: > - Monthly CPI, core PCE, and breakeven inflation readings over the past - 2 years. Core inputs for assessing Fed policy stance. - query_params: - metrics: - - cpi_yoy - - cpi_3m_annualized - - inflation_momentum - - core_pce_yoy - - pce_above_target - - breakeven_inflation_5y - - breakeven_inflation_10y - - breakeven_term_spread - group_by: - - "TimeDimension('inflation_month__signal_date', 'month')" - - - name: labor_market_dashboard - label: Labor Market Dashboard - description: > - Monthly labor market composite: Sahm Rule, job openings/unemployed ratio, - unemployment rate, quits rate, and initial claims. Core inputs for - assessing recession risk and Fed dual-mandate. - query_params: - metrics: - - unemployment_rate - - labor_market_tightness - - labor_tightness_momentum - - sahm_rule_indicator - - worker_confidence - - initial_claims - - employment_population_ratio - - unrate_3m_momentum - group_by: - - "TimeDimension('labor_month__signal_date', 'month')" - - - name: macro_indicators_by_series - label: Macro Indicators by FRED Series - description: > - Latest value and month-over-month change for each FRED economic series. - Use this to scan across GDP, rates, housing, and employment indicators - in a single query. Filter by series_code to drill into a specific indicator. - query_params: - metrics: - - fred_indicator_value - - fred_mom_change - group_by: - - "Dimension('fred_series__series_code')" - - "Dimension('fred_series__series_name')" - - "TimeDimension('fred_series__observation_date', 'month')" - - - name: commodity_price_overview - label: Commodity Price Overview - description: > - 1-month and 1-year returns for input commodities. Useful for tracking - cost-of-production pressures and upstream inflation signals. - query_params: - metrics: - - commodity_spot_price - - commodity_return_1mo - - commodity_return_1yr - group_by: - - "Dimension('commodity__commodity_name')" - - "Dimension('commodity__commodity_unit')" diff --git a/dbt_project/models/signals/semantic_models.yml b/dbt_project/models/signals/semantic_models.yml deleted file mode 100644 index 5bb352c..0000000 --- a/dbt_project/models/signals/semantic_models.yml +++ /dev/null @@ -1,145 +0,0 @@ -version: 2 - -semantic_models: - - name: inflation_indicators - description: > - Monthly composite inflation signal model combining CPI, core PCE, and - Treasury inflation breakeven rates. Grain: one row per month. - model: ref('inflation_signals') - defaults: - agg_time_dimension: signal_date - entities: - - name: inflation_month - type: primary - expr: "CAST(date AS VARCHAR)" - dimensions: - - name: signal_date - type: time - type_params: - time_granularity: month - expr: date - - name: cpi_momentum_status - type: categorical - description: "Categorical CPI momentum signal: high / medium / normal" - - name: core_pce_status - type: categorical - description: "Categorical core PCE signal: high / medium / normal" - - name: breakeven_status - type: categorical - description: "Categorical inflation expectations signal from breakeven rates" - measures: - - name: cpi_3m_annualized - agg: max - expr: cpi_3m_annualized - description: CPI 3-month annualized rate of change (%) - - name: cpi_12m_yoy - agg: max - expr: cpi_12m_yoy - description: CPI year-over-year percent change (%) - - name: cpi_momentum_spread - agg: max - expr: cpi_momentum_spread - description: Spread between 3m annualized and 12m YoY CPI (momentum indicator) - - name: core_pce_yoy - agg: max - expr: core_pce_yoy - description: Core PCE year-over-year percent change (%) - - name: pce_vs_target - agg: max - expr: pce_deviation_from_target - description: Core PCE deviation from 2% Fed target (positive = above target) - - name: breakeven_5y - agg: max - expr: breakeven_5y - description: 5-year Treasury inflation breakeven rate (%) - - name: breakeven_10y - agg: max - expr: breakeven_10y - description: 10-year Treasury inflation breakeven rate (%) - - name: breakeven_5y_10y_spread - agg: max - expr: breakeven_5y_10y_spread - description: > - 5y minus 10y breakeven spread. Positive = near-term inflation expected - to exceed long-term (front-loaded inflation pressure). - - - name: labor_market_indicators - description: > - Monthly composite labor market signal model combining job openings, - unemployment, claims, and the Sahm Rule. Grain: one row per month. - model: ref('labor_signals') - defaults: - agg_time_dimension: signal_date - entities: - - name: labor_month - type: primary - expr: "CAST(date AS VARCHAR)" - dimensions: - - name: signal_date - type: time - type_params: - time_granularity: month - expr: date - - name: jo_ratio_status - type: categorical - description: > - Job openings / unemployed ratio signal: - high (JO >> unemployed, very tight), medium, normal, low (slack labor market) - - name: claims_trend_status - type: categorical - description: > - Initial claims 3-month trend signal: - high (claims rising >15%), medium (>10%), normal - - name: sahm_approx_status - type: categorical - description: > - Sahm Rule recession signal: - high (>= 0.5 — recession signal), medium (>= 0.3), normal - - name: quits_trend_status - type: categorical - description: > - Quits rate 3-month change signal: - high (declining sharply — workers less confident), medium, normal - measures: - - name: job_openings - agg: max - expr: job_openings - description: Monthly job openings count (thousands) - - name: unemployed_count - agg: max - expr: unemployed_count - description: Monthly unemployed persons count (thousands) - - name: jo_unemployed_ratio - agg: max - expr: jo_unemployed_ratio - description: Job openings / unemployed ratio (>1 = more openings than workers) - - name: unemployment_rate - agg: max - expr: unrate - description: Civilian unemployment rate (%) - - name: avg_monthly_claims - agg: max - expr: avg_monthly_claims - description: Average monthly initial jobless claims - - name: employment_ratio - agg: max - expr: emratio - description: Employment-population ratio (%) - - name: quits_rate - agg: max - expr: quits_rate - description: Job quits rate — proxy for worker confidence - - name: sahm_rule - agg: max - expr: sahm_approx - description: > - Sahm Rule indicator value. Threshold of 0.5 historically signals - recession onset. Based on 3-month average unemployment rate rise. - - name: jo_ratio_3m_change - agg: max - expr: jo_ratio_3m_change - description: 3-month change in job openings / unemployed ratio (momentum) - - name: unrate_3m_change - agg: max - expr: unrate_3m_change - description: 3-month change in unemployment rate (percentage points) diff --git a/dbt_project/models/signals/signals_schema.yml b/dbt_project/models/signals/signals_schema.yml index 1bf12b7..40ea3b3 100644 --- a/dbt_project/models/signals/signals_schema.yml +++ b/dbt_project/models/signals/signals_schema.yml @@ -24,11 +24,22 @@ models: - name: inflation_signals description: > - Inflation signals derived from FRED data: CPI momentum (3mo annualized vs 12mo YoY), - Core PCE deviation from Fed's 2% target, and breakeven inflation spread (5Y vs 10Y). + Monthly composite inflation signal model combining CPI, core PCE, and + Treasury inflation breakeven rates. Grain: one row per month. + semantic_model: + enabled: true + name: inflation_indicators + agg_time_dimension: signal_date columns: - name: date description: Observation date + entity: + name: inflation_month + type: primary + granularity: month + dimension: + name: signal_date + type: time tests: - not_null - name: cpi_3m_annualized @@ -45,20 +56,99 @@ models: description: 5Y breakeven minus 10Y breakeven (positive = near-term inflation stress) - name: cpi_momentum_status description: "Signal severity: high (re-accelerating), medium, low (decelerating), normal" + dimension: + type: categorical tests: - not_null - name: core_pce_status description: "Signal severity based on distance from 2% target" + dimension: + type: categorical - name: breakeven_status description: "Signal severity based on breakeven spread" + dimension: + type: categorical + metrics: + - name: cpi_yoy + label: CPI Year-over-Year (%) + description: Consumer Price Index year-over-year percent change. Core inflation gauge. + type: simple + agg: max + expr: cpi_12m_yoy + - name: cpi_3m_annualized + label: CPI 3-Month Annualized (%) + description: > + CPI 3-month annualized rate — a forward-looking inflation momentum signal. + When above cpi_yoy, inflation is re-accelerating. + type: simple + agg: max + expr: cpi_3m_annualized + - name: inflation_momentum + label: CPI Momentum Spread + description: > + 3-month annualized CPI minus 12-month YoY CPI. Positive = re-accelerating + inflation pressure. Negative = inflation decelerating. + type: simple + agg: max + expr: cpi_momentum_spread + - name: core_pce_yoy + label: Core PCE Year-over-Year (%) + description: > + Core Personal Consumption Expenditures year-over-year change (%). + The Federal Reserve's preferred inflation gauge (2% target). + type: simple + agg: max + expr: core_pce_yoy + - name: pce_above_target + label: PCE Deviation from 2% Target + description: > + Core PCE minus 2% Fed target. Positive = above target (hawkish signal), + negative = below target (dovish signal). + type: simple + agg: max + expr: pce_deviation_from_target + - name: breakeven_inflation_5y + label: 5-Year Breakeven Inflation Rate (%) + description: > + Market-implied 5-year inflation expectation from TIPS breakeven. + Reflects bond market inflation pricing over the near-term horizon. + type: simple + agg: max + expr: breakeven_5y + - name: breakeven_inflation_10y + label: 10-Year Breakeven Inflation Rate (%) + description: Market-implied 10-year inflation expectation from TIPS breakeven. + type: simple + agg: max + expr: breakeven_10y + - name: breakeven_term_spread + label: 5y/10y Breakeven Spread + description: > + 5-year minus 10-year breakeven spread. Positive = near-term inflation + expectations exceed long-term (front-loaded inflation). Useful for + identifying transitory vs. structural inflation regimes. + type: simple + agg: max + expr: breakeven_5y_10y_spread - name: labor_signals description: > - Labor market signals: job openings to unemployed ratio, initial claims trends, - quits rate direction, and Sahm Rule indicator (SAHMCURRENT). + Monthly composite labor market signal model combining job openings, + unemployment, claims, and the Sahm Rule. Grain: one row per month. + semantic_model: + enabled: true + name: labor_market_indicators + agg_time_dimension: signal_date columns: - name: date description: Monthly observation date + entity: + name: labor_month + type: primary + granularity: month + dimension: + name: signal_date + type: time tests: - not_null - name: jo_unemployed_ratio @@ -67,14 +157,87 @@ models: description: Sahm Rule recession indicator (SAHMCURRENT) - name: jo_ratio_status description: "Signal severity: high (<0.5 recessionary), medium (<1.0 slack), normal" + dimension: + type: categorical tests: - not_null - name: claims_trend_status description: "Signal severity based on 3-month claims trend" + dimension: + type: categorical - name: sahm_approx_status description: "Signal severity: high (>=0.50 recession), medium (>=0.30 warning)" + dimension: + type: categorical - name: quits_trend_status description: "Signal severity based on quits rate decline" + dimension: + type: categorical + metrics: + - name: unemployment_rate + label: Unemployment Rate (%) + description: Civilian unemployment rate. Fed dual-mandate metric. + type: simple + agg: max + expr: unrate + - name: labor_market_tightness + label: Job Openings / Unemployed Ratio + description: > + Job openings divided by unemployed workers. > 1.0 = more openings than + job seekers (tight market). < 1.0 = labor slack. Fed watches this closely. + type: simple + agg: max + expr: jo_unemployed_ratio + - name: labor_tightness_momentum + label: Labor Tightness 3-Month Change + description: > + 3-month change in the job openings / unemployed ratio. Negative = labor + market loosening. Key leading indicator for Fed pivot timing. + type: simple + agg: max + expr: jo_ratio_3m_change + - name: sahm_rule_indicator + label: Sahm Rule Indicator + description: > + Sahm Rule recession indicator. Based on 3-month average unemployment rate + minus prior 12-month minimum. >= 0.5 historically signals recession onset. + Original work: Claudia Sahm, Fed (2019). + type: simple + agg: max + expr: sahm_approx + - name: worker_confidence + label: Quits Rate + description: > + Job quits rate. Higher = workers more confident in finding new jobs + (tight market). Declining quits rate signals workers becoming less + confident — often leads unemployment rate rises. + type: simple + agg: max + expr: quits_rate + - name: initial_claims + label: Average Monthly Initial Claims + description: > + Average monthly initial unemployment insurance claims. Rising claims + are an early warning of labor market deterioration. + type: simple + agg: max + expr: avg_monthly_claims + - name: employment_population_ratio + label: Employment-Population Ratio (%) + description: > + Share of working-age population that is employed. More stable than + unemployment rate since it does not move with labor force participation. + type: simple + agg: max + expr: emratio + - name: unrate_3m_momentum + label: Unemployment Rate 3-Month Change + description: > + 3-month change in unemployment rate (percentage points). Component of + the Sahm Rule calculation. Positive = rising unemployment (deteriorating). + type: simple + agg: max + expr: unrate_3m_change - name: housing_signals description: >