Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"mcpServers": {
"dbt_index": {
"command": "dbt-index",
"args": [
"--auto-reingest",
"serve"
]
},
"motherduck": {
"type": "http",
"url": "https://mcp.motherduck.com/mcp",
Expand Down
93 changes: 87 additions & 6 deletions dbt_project/models/commodities/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
112 changes: 0 additions & 112 deletions dbt_project/models/commodities/semantic_models.yml

This file was deleted.

47 changes: 46 additions & 1 deletion dbt_project/models/government/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
42 changes: 0 additions & 42 deletions dbt_project/models/government/semantic_models.yml

This file was deleted.

Loading
Loading