Skip to content

Add factor ETF correlation metrics#125

Merged
C00ldudeNoonan merged 1 commit into
mainfrom
codex/issue-52-factor-analysis
Jul 7, 2026
Merged

Add factor ETF correlation metrics#125
C00ldudeNoonan merged 1 commit into
mainfrom
codex/issue-52-factor-analysis

Conversation

@C00ldudeNoonan

Copy link
Copy Markdown
Owner

Summary

  • Adds a factor ETF staging model and rolling return mart for VLUE, QUAL, MTUM, SIZE, and USMV using existing MarketStack major-index ingestion
  • Adds factor-to-sector/style/broad/thematic ETF rolling correlation and relative return spread analysis
  • Exposes factor ETF returns and factor correlation metrics through the semantic layer and technical price universe
  • Deduplicates asset_daily_returns at its documented asset/date grain to prevent upstream duplicate stock rows from breaking the semantic fact table

Fixes #52

Validation

  • uv run dbt parse
  • uv run dbt build --select stg_factor_etfs factor_analysis_return major_indicies_analysis_return factor_sector_correlation asset_daily_returns technical_price_universe
  • uv run ruff check macro_agents/src/macro_agents/defs/constants/market_stack_constants.py
  • git diff --check

Notes

  • Focused dbt build passed with 43 PASS, 1 WARN, 0 ERROR. The warn is the existing warn-level ohlc_consistency check on stg_factor_etfs showing 42 rows.

@C00ldudeNoonan

Copy link
Copy Markdown
Owner Author

@codex please review this PR.

@C00ldudeNoonan
C00ldudeNoonan force-pushed the codex/issue-52-factor-analysis branch from fca9433 to a732e7a Compare July 7, 2026 11:05
@C00ldudeNoonan
C00ldudeNoonan merged commit 8756702 into main Jul 7, 2026
2 checks passed
@C00ldudeNoonan
C00ldudeNoonan deleted the codex/issue-52-factor-analysis branch July 7, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Factor Analysis

1 participant