--- license: cc-by-4.0 --- # Financial Data — Marts Schema Data Dictionary This document provides a comprehensive schema reference and metric dictionary for the 23 analytical tables compiled in the `marts` schema of `database.db` (and saved as Parquet files under `marts/`). --- ## Table of Contents 1. [`fct_combined_scorecard`](#1-fct_combined_scorecard) (Unified screening table) 2. [`dim_company_profiles`](#2-dim_company_profiles) (Company metadata) 3. [`fct_financial_ratios`](#3-fct_financial_ratios) (Core ratios, owner earnings, RONTA) 4. [`fct_growth_rates`](#4-fct_growth_rates) (Multi-year CAGRs & consistency) 5. [`fct_earnings_quality`](#5-fct_earnings_quality) (Sloan accruals & Beneish M-Score) 6. [`fct_dupont_decompositions`](#6-fct_dupont_decompositions) (3-factor and 5-factor ROE decompositions) 7. [`fct_valuation_multiples`](#7-fct_valuation_multiples) (Daily historical multiples & Z-Scores) 8. [`fct_macro_sensitivity`](#8-fct_macro_sensitivity) (Treasury beta & R-squared) 9. [`fct_insider_sentiment`](#9-fct_insider_sentiment) (Rolling 30d/90d/180d net transactions) 10. [`fct_dividend_history`](#10-fct_dividend_history) (Chronological distributions & streaks) 11. [`fct_magic_formulas`](#11-fct_magic_formulas) (Greenblatt ranking) 12. [`fct_piotroski_fscores`](#12-fct_piotroski_fscores) (9-point financial health scorecard) 13. [`fct_altman_zscores`](#13-fct_altman_zscores) (Credit strength & solvency) 14. [`fct_shareholder_yields`](#14-fct_shareholder_yields) (Total capital return yield) 15. [`fct_momentum_metrics`](#15-fct_momentum_metrics) (Relative price strength) 16. [`fct_lynch_categories`](#16-fct_lynch_categories) (Peter Lynch stock archetypes) 17. [`fct_screener_recommendations`](#17-fct_screener_recommendations) (Long/Short composite scorecard) 18. [`fct_capital_allocation`](#18-fct_capital_allocation) (ROIC & incremental capital efficiency) 19. [`fct_dcf_valuations`](#19-fct_dcf_valuations) (WACC & multi-scenario DCF price targets) 20. [`fct_sector_benchmarks`](#20-fct_sector_benchmarks) (Sector and industry percentile benchmarks) 21. [`fct_macro_rates`](#21-fct_macro_rates) (Daily Treasury yields & exchange rates) 22. [`fct_earning_call_transcripts`](#22-fct_earning_call_transcripts) (Quarterly call text paragraphs) 23. [`fct_sec_filing_sections`](#23-fct_sec_filing_sections) (SEC MD&A & Risk Factors text sections) --- ### 1. `fct_combined_scorecard` * **Purpose**: The "front page" dashboard. Flat, denormalized view containing the latest values of every calculated metric joined into a single table for fast querying. * **SQL Source**: Derived from private transformation `9_z_combined_scorecard.sql` (which ingests: `dim_company_profiles`, `fct_financial_ratios`, `fct_growth_rates`, `fct_earnings_quality`, `fct_dupont_decompositions`, `fct_valuation_multiples`, `fct_macro_sensitivity`, `fct_insider_sentiment`, `fct_dividend_history`, `fct_magic_formulas`, `fct_piotroski_fscores`, `fct_altman_zscores`, `fct_shareholder_yields`, `fct_momentum_metrics`, `fct_lynch_categories`, `fct_screener_recommendations`, `fct_capital_allocation`, `fct_dcf_valuations`, and `fct_sector_benchmarks` from the `marts` schema; `statements_usd` from the `staging` schema; and `stock_valuation_snapshot` from the `raw` schema). * **Key Columns**: * `symbol` (VARCHAR): Stock ticker symbol (e.g. `AAPL`). * `report_date` (VARCHAR): Date of the latest statement period. * `market_cap` (DOUBLE): Market capitalization in USD. * `pe_ratio` (DOUBLE): Price-to-Earnings ratio. * `altman_z_score` (DOUBLE): Altman Z-score. * `piotroski_f_score` (INTEGER): Piotroski F-score (0 to 9). * `magic_formula_rank` (BIGINT): Overall rank according to the Magic Formula. * `total_shareholder_yield_pct` (DOUBLE): Combined yield (dividends, buybacks, debt paydowns). * `composite_momentum_pct` (DOUBLE): Weighted price momentum score. * `long_short_recommendation` (VARCHAR): Recommended screener classification (`STRONG_BUY`, `BUY`, `NEUTRAL`, `SHORT`, `STRONG_SHORT`). * `rev_cagr_3y` (DOUBLE): 3-year Revenue CAGR. * `accrual_ratio` (DOUBLE): Sloan accruals ratio. * `beneish_m_score` (DOUBLE): Beneish M-Score. * `roe_archetype` (VARCHAR): DuPont ROE driver archetype. * `pe_z_score` (DOUBLE): Standard deviations of PE vs. historical mean. * `treasury_beta_1y` (DOUBLE): Rolled 1-year regression beta vs. 10Y US Treasury yield change. * `insider_rolling_90d_net_value` (DECIMAL): USD net buy/sell transactions by corporate insiders. * `dividend_streak_years` (BIGINT): Consecutive years of dividend increases. --- ### 2. `dim_company_profiles` * **Purpose**: Holds static and semi-static qualitative metadata for each corporation. * **SQL Source**: Derived from private transformation `1.8_dim_company_profiles.sql` (which ingests: `stock_profile` from the `raw` schema). * **Key Columns**: * `symbol` (VARCHAR): Primary Key. * `sector` (VARCHAR): Macro sector (e.g. `Technology`). * `industry` (VARCHAR): Micro industry (e.g. `Consumer Electronics`). * `long_business_summary` (VARCHAR): Full textual description of company operations. * `full_time_employees` (BIGINT): Current headcount. * `web_site` (VARCHAR): Corporate URL. --- ### 3. `fct_financial_ratios` * **Purpose**: Core financial analysis metrics, normalized balance sheet totals, and specialized custom metrics (RONTA, capex-to-operating-cash-flow, R&D-adjusted asset values). * **SQL Source**: Derived from private transformation `2_financial_ratios.sql` (which ingests: `dim_company_profiles` from the `marts` schema; `prices` and `statements_usd` from the `staging` schema; and `stock_analyst_price_targets`, `stock_shares_outstanding`, and `stock_valuation_snapshot` from the `raw` schema). * **Key Columns**: * `net_tangible_assets` (DOUBLE): `Total Assets - Total Liabilities - Goodwill - Intangible Assets`. * `owner_earnings` (DOUBLE): `Net Income + D&A - Capital Expenditures`. * `ronta_pct` (DOUBLE): **Return on Net Tangible Assets**. Buffett's favorite profitability metric. * `buffett_classification` (VARCHAR): Classification of moat quality (`The Great`, `The Good`, `The Gruesome`). * `analyst_consensus_upside_pct` (DOUBLE): Percentage difference between current stock price and mean analyst price target. * `interest_coverage_ratio` (DOUBLE): `EBIT / Interest Expense`. * `rule_of_40_score` (DOUBLE): `Revenue Growth % + Free Cash Flow Margin %` (used for software/SaaS business models). * `is_excluded` (BOOLEAN): Flag denoting if the company belongs to financial/cyclical industries that distort structural ratio calculations. --- ### 4. `fct_growth_rates` * **Purpose**: Multi-year compound annual growth rates (CAGRs) for major items on the income and cash flow statements, along with consistency and momentum checks. * **SQL Source**: Derived from private transformation `9.0_growth_rates.sql` (which ingests: `statements_usd` from the `staging` schema). * **Key Columns**: * `rev_growth_1y` / `net_growth_1y` / `fcf_growth_1y` (DOUBLE): YoY growth rates. * `rev_cagr_3y` / `net_cagr_3y` / `fcf_cagr_3y` (DOUBLE): 3-year compound annual growth rates. * `rev_cagr_5y` / `net_cagr_5y` / `fcf_cagr_5y` (DOUBLE): 5-year compound annual growth rates. * `rev_deceleration_flag` (BOOLEAN): `True` if current YoY growth is lower than the previous period's growth. * `rev_growth_consistency_score` (DOUBLE): Standard deviation of growth rates over the lookback window (lower = more predictable growth). --- ### 5. `fct_earnings_quality` * **Purpose**: Evaluates whether reported net income is backed by cash flow, and flags signs of earnings manipulation or accounting anomalies. * **SQL Source**: Derived from private transformation `9.1_earnings_quality.sql` (which ingests: `statements_usd` from the `staging` schema). * **Key Columns**: * `accrual_ratio` (DOUBLE): Sloan accruals metric: `(Net Income - FCF) / Total Assets`. * *Threshold*: Values `> 0.10` indicate excessive accruals (earnings ahead of cash). * `fcf_conversion_rate` (DOUBLE): `FCF / Net Income`. * *Interpretation*: Ideal is `> 1.0`. Sustained values `< 0.70` suggest weak earnings quality. * `beneish_m_score` (DOUBLE): Mathematical model utilizing 8 accounting indexes (DSRI, GMI, AQI, SGI, DEPI, SGAI, LVGI, TATA) to detect earnings manipulation. * *Threshold*: Scores `> -1.78` denote possible manipulation; `> -1.49` represents a high-risk manipulation signal. * `beneish_m_score_label` (VARCHAR): Rating of manipulation risk (`High Risk`, `Safe`). --- ### 6. `fct_dupont_decompositions` * **Purpose**: Breaks down Return on Equity (ROE) into 3-factor and 5-factor component parts to determine if profitability is driven by profit margins, asset efficiency, or financial leverage. * **SQL Source**: Derived from private transformation `9.15_dupont_decomposition.sql` (which ingests: `statements_usd` from the `staging` schema). * **Key Columns**: * `roe_pct` (DOUBLE): Profit / Common Equity. * `net_margin_pct` (DOUBLE): Profit margin (`Net Income / Revenue`). * `asset_turnover` (DOUBLE): Asset efficiency (`Revenue / Average Assets`). * `equity_multiplier_leverage` (DOUBLE): Financial leverage (`Average Assets / Average Equity`). * `ebit_margin_pct` (DOUBLE): Operating profitability. * `interest_burden_factor` (DOUBLE): Pretax Income / EBIT. * `tax_burden_factor` (DOUBLE): Net Income / Pretax Income. * `roe_archetype` (VARCHAR): Business return driver label: * `High-Margin Compounder` (High profit margin, low leverage) * `Asset-Light Asset Turner` (High asset turnover, low leverage) * `Leverage-Driven Returns` (Low margins/turnover, high leverage) * `Underperforming` (Negative ROE) --- ### 7. `fct_valuation_multiples` * **Purpose**: Integrates daily stock prices with annual statement disclosures to output daily historical multiples and statistical z-scores (standard deviations from the company's own historical average). * **SQL Source**: Derived from private transformation `9.5_valuation_multiples.sql` (which ingests: `prices` and `statements_usd` from the `staging` schema; and `stock_shares_outstanding` from the `raw` schema). * **Key Columns**: * `price_date` (VARCHAR): Calendar date of the stock price. * `pe_ratio` (DOUBLE): Price / Trailing EPS. * `price_to_fcf` (DOUBLE): Market Cap / Free Cash Flow. * `pe_z_score` (DOUBLE): `(Current PE - Mean historical PE) / StdDev(PE)`. * *Interpretation*: Negative z-scores (e.g. `-1.5`) indicate that the stock is historically cheap compared to its own historical trading range. --- ### 8. `fct_macro_sensitivity` * **Purpose**: Gauges how sensitive a stock's returns are to macroeconomic interest rate shifts by running a rolling 1-year linear regression of daily stock returns against daily changes in the 10-year US Treasury yield. * **SQL Source**: Derived from private transformation `9.6_macro_sensitivity.sql` (which ingests: `fct_macro_rates` from the `marts` schema; and `prices` from the `staging` schema). * **Key Columns**: * `treasury_beta_1y` (DOUBLE): Slope coefficient of regression. * *Interpretation*: Positive beta (e.g. `1.2`) means the stock moves *up* when bond yields rise (cyclical/financials). Negative beta (e.g. `-0.8`) means the stock falls when yields rise (utilities/defensives). * `treasury_r2_1y` (DOUBLE): R-squared (goodness of fit) of the rolling regression, showing how much of the stock's return variance is explained by yield changes. --- ### 9. `fct_insider_sentiment` * **Purpose**: Tracks buying and selling activity by corporate executives, officers, and directors. * **SQL Source**: Derived from private transformation `9.3_insider_sentiment.sql` (which ingests: `stock_insider_transactions` from the `raw` schema). * **Key Columns**: * `tx_date` (DATE): Transaction execution date. * `net_shares_daily` (DOUBLE): Shares purchased minus shares sold on `tx_date`. * `net_value_daily` (DECIMAL): USD value of net transactions on `tx_date`. * `rolling_30d_net_value` / `rolling_90d_net_value` / `rolling_180d_net_value` (DECIMAL): Combined USD value of insider transactions over the respective trailing day windows. --- ### 10. `fct_dividend_history` * **Purpose**: Tracks distributions, stock splits, annual payouts, and consecutive dividend increase streaks. * **SQL Source**: Derived from private transformation `9.4_dividend_history.sql` (which ingests: `stock_dividend_events` and `stock_split_events` from the `raw` schema). * **Key Columns**: * `event_date` (DATE): Date of dividend or split event. * `event_type` (VARCHAR): `dividend` or `split`. * `amount` (DOUBLE): Dividend distribution per share. * `split_factor` (VARCHAR): Split ratio (e.g. `2:1` or `1:1`). * `year_annual_payout` (DECIMAL): Sum of all dividends paid in that calendar year. * `year_dividend_increase_streak_years` (BIGINT): The consecutive streak of years where the annual dividend payout increased. --- ### 11. `fct_magic_formulas` * **Purpose**: Implements Joel Greenblatt's "Magic Formula" screen, ranking companies by their return on capital and earnings yield. * **SQL Source**: Derived from private transformation `3_magic_formula.sql` (which ingests: `dim_company_profiles` from the `marts` schema; `prices` and `statements_usd` from the `staging` schema; and `stock_shares_outstanding` and `stock_valuation_snapshot` from the `raw` schema). * **Key Columns**: * `return_on_capital_pct` (DOUBLE): `EBIT / (Net Working Capital + Net PPE)`. * `earnings_yield_pct` (DOUBLE): `EBIT / Enterprise Value`. * `roc_rank` (BIGINT): Return on Capital percentile rank within the universe. * `ey_rank` (BIGINT): Earnings Yield percentile rank within the universe. * `magic_formula_rank` (BIGINT): Consolidated rank (sum of `roc_rank` and `ey_rank`). --- ### 12. `fct_piotroski_fscores` * **Purpose**: Computes Joseph Piotroski's 9-point binary score (0-9) analyzing profitability, leverage/liquidity, and operating efficiency. * **SQL Source**: Derived from private transformation `4_piotroski_fscore.sql` (which ingests: `statements_usd` from the `staging` schema; and `stock_shares_outstanding` from the `raw` schema). * **Key Columns**: * `f1_positive_roa` to `f9_improving_asset_turnover` (INTEGER): Binary points (0 or 1) for each signal. * `f_score` (INTEGER): Combined health score (ranges from 0 to 9). * *Interpretation*: `8` or `9` is exceptionally strong; `0` to `3` is weak. * `f_score_label` (VARCHAR): Rating class (`Strong Health`, `Moderate Health`, `Weak Health`). --- ### 13. `fct_altman_zscores` * **Purpose**: Bankruptcy risk prediction using Edward Altman's 5-factor model for manufacturing and non-manufacturing firms. * **SQL Source**: Derived from private transformation `5_altman_zscore.sql` (which ingests: `prices` and `statements_usd` from the `staging` schema; and `stock_shares_outstanding` and `stock_valuation_snapshot` from the `raw` schema). * **Key Columns**: * `z_score` (DOUBLE): Output score. * `z_score_zone` (VARCHAR): Solvency health zones: * `Safe Zone` (Z-Score > 2.90 for manufacturing, > 2.90 for service) * `Grey Zone` (1.23 <= Z-Score <= 2.90) * `Distress Zone` (Z-Score < 1.23, high risk of insolvency) --- ### 14. `fct_shareholder_yields` * **Purpose**: Computes cash returned to investors via dividends, stock buybacks, and net debt reduction. * **SQL Source**: Derived from private transformation `6_shareholder_yield.sql` (which ingests: `prices` and `statements_usd` from the `staging` schema; and `stock_shares_outstanding` and `stock_valuation_snapshot` from the `raw` schema). * **Key Columns**: * `dividend_yield_pct` (DOUBLE): Cash dividends / Market Cap. * `buyback_yield_pct` (DOUBLE): Net stock buybacks / Market Cap. * `debt_paydown_yield_pct` (DOUBLE): Net debt paydown / Market Cap. * `total_shareholder_yield_pct` (DOUBLE): Combined yield of all three components. * `tsy_label` (VARCHAR): Rating based on shareholder yield strength. --- ### 15. `fct_momentum_metrics` * **Purpose**: Measures trend-following relative strength over multiple lookback windows (1m, 3m, 6m, 12m). * **SQL Source**: Derived from private transformation `7_momentum.sql` (which ingests: `prices` from the `staging` schema). * **Key Columns**: * `mom_12m_skip1m_pct` (DOUBLE): Returns over 12 months excluding the most recent month (captures structural momentum while avoiding short-term reversal noise). * `composite_momentum_pct` (DOUBLE): Weighted average of 3m (20%), 6m (30%), and 12m-skip-1m (50%) momentum returns. * `momentum_label` (VARCHAR): Classification (`Strong Momentum`, `Improving`, `Lagging`, etc.). --- ### 16. `fct_lynch_categories` * **Purpose**: Implements Peter Lynch's stock categorization framework (Slow Grower, Stalwart, Fast Grower, Cyclical, Asset Play, Turnaround) using growth rates, leverage, size, and health filters. * **SQL Source**: Derived from private transformation `8_lynch_categories.sql` (which ingests: `dim_company_profiles`, `fct_altman_zscores`, `fct_financial_ratios`, and `fct_piotroski_fscores` from the `marts` schema; and `statements_usd` from the `staging` schema). * **Key Columns**: * `lynch_category` (VARCHAR): The assigned Peter Lynch category. * `lynch_confidence` (VARCHAR): Strength classification of the assignment (`High`, `Medium`, `Low`). * `net_cash_to_mktcap_pct` (DOUBLE): Net balance sheet cash as a percentage of market cap (key for "Asset Play" screening). --- ### 17. `fct_screener_recommendations` * **Purpose**: A compound multi-factor grading model that weights Piotroski, Altman, Magic Formula, owner yield, growth, and R&D-adjusted efficiency into an overall long/short score. * **SQL Source**: Derived from private transformation `9_long_short_screener.sql` (which ingests: `dim_company_profiles`, `fct_altman_zscores`, `fct_financial_ratios`, `fct_magic_formulas`, and `fct_piotroski_fscores` from the `marts` schema). * **Key Columns**: * `long_score` (INTEGER): Points accrued for high quality, value, health, and momentum (0 to 10 scale). * `short_score` (INTEGER): Points accrued for distress, manipulation risk, high debt, or poor cash conversion (0 to 10 scale). * `long_short_recommendation` (VARCHAR): Screener recommendation rating (e.g. `STRONG_BUY` when `long_score >= 8` and `short_score <= 1`). --- ### 18. `fct_capital_allocation` * **Purpose**: Computes Return on Invested Capital (ROIC), pre-tax ROIC, and incremental ROIC over rolling 3-year and 5-year windows to evaluate management's capital deployment efficiency. * **SQL Source**: Derived from private transformation `9.18_capital_allocation.sql` (which ingests: `statements_usd` from the `staging` schema). * **Key Columns**: * `symbol` (VARCHAR): Stock ticker symbol. * `report_date` (DATE): Statement report date. * `tax_rate` (DOUBLE): Effective tax rate (capped at 35%, default to 21%). * `invested_capital` (DOUBLE): Total Debt + Total Equity - Cash. * `nopat` (DOUBLE): Net Operating Profit After Tax (`Operating Income * (1.0 - tax_rate)`). * `roic_pct` (DOUBLE): Return on Invested Capital percentage. * `pretax_roic_pct` (DOUBLE): Pre-tax Return on Invested Capital percentage. * `incremental_roic_3y_pct` (DOUBLE): 3-year Incremental ROIC (using NOPAT / Invested Capital change). * `pretax_incremental_roic_3y_pct` (DOUBLE): 3-year Pre-tax Incremental ROIC (using EBIT / Invested Capital change). * `incremental_roic_5y_pct` (DOUBLE): 5-year Incremental ROIC. * `pretax_incremental_roic_5y_pct` (DOUBLE): 5-year Pre-tax Incremental ROIC. * `capital_unlocked_growth_3y_flag` (BOOLEAN): `True` if operating income grew while invested capital decreased over 3 years. * `capital_allocation_category` (VARCHAR): Classification of management's capital allocation efficiency (`High-Efficiency Compounder`, `Fading Compounder`, `Turnaround Compounder`, `Value Destroyer`, `Capital-Light Grower`, `Standard Allocator`). --- ### 19. `fct_dcf_valuations` * **Purpose**: Computes Weighted Average Cost of Capital (WACC), Cost of Equity (CAPM), Cost of Debt, and projects 10-year discounted cash flows under three growth scenarios (Base, Conservative, Aggressive). * **SQL Source**: Derived from private transformation `9.8_dcf_valuation.sql` (which ingests: `fct_financial_ratios`, `fct_growth_rates`, and `fct_macro_rates` from the `marts` schema; `statements_usd` from the `staging` schema; and `stock_valuation_snapshot` from the `raw` schema). * **Key Columns**: * `symbol` (VARCHAR): Stock ticker symbol. * `report_date` (DATE): Reference report date for statement metrics. * `wacc` (DOUBLE): Weighted Average Cost of Capital (clamped between 5% and 15%). * `cost_of_equity` (DOUBLE): Cost of equity via CAPM (`Risk-Free Rate + Beta * 5.5% ERP`). * `cost_of_debt` (DOUBLE): Cost of debt (interest expense / total debt, or fallback). * `tax_rate` (DOUBLE): Effective tax rate. * `base_cash_flow` (DOUBLE): Owner earnings (falling back to FCF, then Net Income). * `enterprise_value_base` / `enterprise_value_conservative` / `enterprise_value_aggressive` (DOUBLE): Discounted enterprise values. * `equity_value_base` / `equity_value_conservative` / `equity_value_aggressive` (DOUBLE): Estimated equity value (`Enterprise Value + Cash - Debt`). * `dcf_price_per_share_base` / `dcf_price_per_share_conservative` / `dcf_price_per_share_aggressive` (DOUBLE): Estimated fair value per share. --- ### 20. `fct_sector_benchmarks` * **Purpose**: Computes peer-relative sector and industry percentiles and medians for multiple valuation, profitability, and momentum metrics. * **SQL Source**: Derived from private transformation `9.20_sector_benchmarks.sql` (which ingests: `dim_company_profiles`, `fct_capital_allocation`, `fct_financial_ratios`, `fct_growth_rates`, and `fct_momentum_metrics` from the `marts` schema). * **Key Columns**: * `symbol` (VARCHAR): Stock ticker symbol. * `sector` (VARCHAR): Corporate macro sector. * `industry` (VARCHAR): Corporate micro industry. * `pe_industry_percentile` (DOUBLE): Industry percentile for P/E (0 = cheapest/best, 100 = most expensive/worst). * `pb_industry_percentile` (DOUBLE): Industry percentile for P/B. * `roic_industry_percentile` (DOUBLE): Industry percentile for ROIC (0 = highest/best, 100 = lowest/worst). * `rev_growth_1y_industry_percentile` (DOUBLE): Industry percentile for 1-year revenue growth. * `mom_6m_industry_percentile` (DOUBLE): Industry percentile for 6-month price momentum. * `pe_sector_percentile` (DOUBLE): Sector percentile for P/E. * `mom_6m_sector_percentile` (DOUBLE): Sector percentile for 6-month price momentum. * `industry_median_pe` / `sector_median_pe` (DOUBLE): Median P/E ratios. * `industry_median_roic` / `sector_median_roic` (DOUBLE): Median ROIC values. --- ### 21. `fct_macro_rates` * **Purpose**: Cleans and merges daily currency exchange rates and U.S. Treasury constant maturity yields. * **SQL Source**: Derived from private transformation `9.2_macro_rates.sql` (which ingests: `daily_treasury_yield` and `exchange_rate` from the `raw` schema). * **Key Columns**: * `currency_symbol` (VARCHAR): Currency symbol (e.g. `EURUSD=X`). * `report_date` (DATE): Calendar date of the rates. * `exchange_rate` (DECIMAL): Daily close exchange rate. * `bc_1month` to `bc_30year` (DECIMAL): Constant maturity yields for 1m, 2m, 3m, 6m, 1y, 2y, 3y, 5y, 7y, 10y, 20y, and 30y U.S. Treasuries. --- ### 22. `fct_earning_call_transcripts` * **Purpose**: Compiles raw text paragraphs from quarterly earnings call transcripts and flags whether the speaker is a registered corporate officer (insider). * **SQL Source**: Derived from private transformation `9.21_fct_earning_call_transcripts.sql` (which ingests: `stock_earning_call_transcripts` and `stock_officers` from the `raw` schema). * **Key Columns**: * `symbol` (VARCHAR): Stock ticker symbol. * `fiscal_year` (INTEGER): Fiscal year of the earnings call. * `fiscal_quarter` (INTEGER): Fiscal quarter. * `paragraph_number` (BIGINT): Section paragraph index. * `speaker` (VARCHAR): Name of the individual speaking. * `is_insider` (BOOLEAN): `True` if speaker matches a known corporate officer name for that symbol. * `content` (VARCHAR): Text content of the transcript paragraph. * `transcripts_id` (BIGINT): Unique identifier hash for the paragraph. * `report_date` (DATE): Earnings report date. --- ### 23. `fct_sec_filing_sections` * **Purpose**: Consolidates Item 7 (MD&A) and Item 1A (Risk Factors) sections from SEC corporate filings (e.g., 10-K, 10-Q) into a single textual database table. * **SQL Source**: Derived from private transformation `9.22_fct_sec_filing_sections.sql` (which ingests: `stock_sec_filing` from the `raw` schema). * **Key Columns**: * `symbol` (VARCHAR): Stock ticker symbol. * `accession_number` (VARCHAR): Unique SEC accession identifier. * `form_type` (VARCHAR): Form type (e.g., `10-K` or `10-Q`). * `filing_date` (DATE): SEC filing submission date. * `section_type` (VARCHAR): Text category (`mda` or `risk_factors`). * `section_text` (VARCHAR): Full plaintext content extracted from the section. --- # Raw Schema Data Dictionary This section describes the 25 raw ingestion tables loaded into the `raw` schema of `database.db`. These tables store primary data fetched from yFinance, SEC EDGAR, daily Treasury rate feeds, and exchange listings before downstream transformations are applied. ## Table of Contents (Raw Schema) 1. [`daily_treasury_yield`](#raw-daily_treasury_yield) (U.S. Treasury constant maturity yields) 2. [`exchange_directories`](#raw-exchange_directories) (Asset mapping & exchange lists) 3. [`exchange_rate`](#raw-exchange_rate) (Daily currency exchange rates) 4. [`stock_analyst_price_targets`](#raw-stock_analyst_price_targets) (Sell-side consensus price targets) 5. [`stock_analyst_recommendations`](#raw-stock_analyst_recommendations) (Buy/Sell recommendation matrices) 6. [`stock_dividend_events`](#raw-stock_dividend_events) (Chronological cash payouts) 7. [`stock_earning_calendar`](#raw-stock_earning_calendar) (Earnings call dates and schedule) 8. [`stock_earning_call_transcripts`](#raw-stock_earning_call_transcripts) (Metadata for quarterly call transcript JSON files) 9. [`stock_earnings_estimates`](#raw-stock_earnings_estimates) (Analyst forward estimates) 10. [`stock_earnings_history`](#raw-stock_earnings_history) (Past quarterly EPS surprises) 11. [`stock_eps_trends`](#raw-stock_eps_trends) (Analyst consensus revisions) 12. [`stock_insider_transactions`](#raw-stock_insider_transactions) (Form 4 executive and director trades) 13. [`stock_institutional_holders`](#raw-stock_institutional_holders) (13F institutional ownership) 14. [`stock_mutualfund_holders`](#raw-stock_mutualfund_holders) (Mutual fund holdings) 15. [`stock_news`](#raw-stock_news) (Aggregated financial news feeds) 16. [`stock_officers`](#raw-stock_officers) (Company directors & executive compensation) 17. [`stock_prices`](#raw-stock_prices) (Daily historical price bars) 18. [`stock_profile`](#raw-stock_profile) (Sector, industry, and qualitative description) 19. [`stock_revenue_breakdown`](#raw-stock_revenue_breakdown) (Segmented product/region revenues) 20. [`stock_sec_filing`](#raw-stock_sec_filing) (Filing metadata & raw text pointers) 21. [`stock_shares_outstanding`](#raw-stock_shares_outstanding) (Historical share counts) 22. [`stock_split_events`](#raw-stock_split_events) (Stock splits history) 23. [`stock_statement`](#raw-stock_statement) (Faceted financial statements) 24. [`stock_trailing_eps`](#raw-stock_trailing_eps) (Trailing earnings per share records) 25. [`stock_valuation_snapshot`](#raw-stock_valuation_snapshot) (Latest yFinance snapshot metrics) --- ## Raw Table Reference ### `daily_treasury_yield` * **Purpose**: Daily constant maturity yields for U.S. government debt (from 1-month to 30-year bills/bonds). * **Columns**: * `bc_1month` to `bc_30year` (DECIMAL): Constant maturity yields for 1m, 2m, 3m, 6m, 1y, 2y, 3y, 5y, 7y, 10y, 20y, and 30y U.S. Treasuries. * `report_date` (DATE): Daily calendar date. ### `exchange_directories` * **Purpose**: Asset mapping directories linking tickers, exchange details, asset type, and corporate country of origin. * **Columns**: * `symbol` (VARCHAR): Stock ticker symbol. * `local_ticker` (VARCHAR): Ticker symbol on local exchange. * `exchange` (VARCHAR): Ticker exchange code. * `name` (VARCHAR): Full company name. * `asset_type` (VARCHAR): Security type (e.g. stock, ETF). * `country` (VARCHAR): Country of corporate headquarters. ### `exchange_rate` * **Purpose**: Daily close exchange rate value for currency cross-pairs. * **Columns**: * `symbol` (VARCHAR): Currency cross-pair symbol (e.g. `EURUSD=X`). * `open` / `close` / `high` / `low` (DECIMAL): Daily pricing values. * `report_date` (DATE): Calendar date. ### `stock_analyst_price_targets` * **Purpose**: Consensus, low, high, mean, and median price targets estimated by sell-side analysts. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `current` (DECIMAL): Current stock price. * `low` / `high` / `mean` / `median` (DECIMAL): Analyst price targets. * `report_date` (DATE): Extraction date. ### `stock_analyst_recommendations` * **Purpose**: Aggregate recommendations matrix (number of analysts recommending strong buy, buy, hold, sell, strong sell) over various rolling periods. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `period` (VARCHAR): Lookback period (e.g. `0m`, `-1m`, etc.). * `strong_buy` / `buy` / `hold` / `sell` / `strong_sell` (INTEGER): Tally counts of recommendations. * `report_date` (DATE): Capture date. ### `stock_dividend_events` * **Purpose**: Cash dividends declared and paid historically. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `amount` (DECIMAL): Dividend payout amount per share. * `report_date` (DATE): Ex-dividend or payment date. ### `stock_earning_calendar` * **Purpose**: Earnings announcement calendar, dates, and corresponding fiscal quarter info. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `time` (VARCHAR): Before/after market close timing flag. * `name` (VARCHAR): Event description. * `fiscal_quarter_ending` (VARCHAR): Period end date. * `report_date` (DATE): Date of earnings release. ### `stock_earning_call_transcripts` * **Purpose**: Metadata and directory path pointers for quarterly corporate earnings call transcript JSON text files. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `fiscal_year` (INTEGER): Fiscal year of call. * `fiscal_quarter` (INTEGER): Fiscal quarter. * `transcript_path` (VARCHAR): File system location of raw JSON transcripts. * `transcripts_id` (INTEGER): Unique transcript identifier. * `report_date` (DATE): Reference period date. ### `stock_earnings_estimates` * **Purpose**: Detailed forward consensus EPS/revenue estimate values, analyst counts, and target growth percentages. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `period` (VARCHAR): Estimate target period. * `estimate_type` (VARCHAR): EPS or Revenue indicator. * `avg_estimate` / `low_estimate` / `high_estimate` (DECIMAL): Estimate stats. * `number_of_analysts` (INTEGER): Count of estimating analysts. * `year_ago_value` (DECIMAL): Historical matching period actual value. * `growth` (DECIMAL): Projected YoY growth rate. * `currency` (VARCHAR): Reporting currency. * `report_date` (DATE): Period reference date. ### `stock_earnings_history` * **Purpose**: Tracks EPS surprise history by comparing actual quarterly EPS against consensus analyst estimates. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `quarter` (VARCHAR): Target quarter. * `eps_actual` (DECIMAL): Realized EPS. * `eps_estimate` (DECIMAL): Expected EPS. * `eps_difference` (DECIMAL): Delta surprise value. * `surprise_percent` (DECIMAL): Surprise ratio. * `report_date` (DATE): Filing/calendar date. ### `stock_eps_trends` * **Purpose**: Analyst EPS estimate revision trends showing revisions over 7, 30, 60, and 90-day horizons. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `period` (VARCHAR): Forecast target period. * `current_estimate` (DECIMAL): Current average estimate. * `days_7_ago` / `days_30_ago` / `days_60_ago` / `days_90_ago` (DECIMAL): Historical estimates. * `currency` (VARCHAR): Invoiced currency. * `report_date` (DATE): As-of date. ### `stock_insider_transactions` * **Purpose**: SEC Form 4 insider trading disclosures indicating trades executed by company officers and directors. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `insider` (VARCHAR): Name of the corporate insider. * `position` (VARCHAR): Job title or relation to company. * `transaction` (VARCHAR): Transaction type (e.g. Sale, Buy, Option Exercise). * `shares` (BIGINT): Quantity of shares traded. * `value` (DECIMAL): Estimated transaction USD value. * `ownership` (VARCHAR): Direct or indirect ownership status. * `url` (VARCHAR): SEC Edgar filing URL. * `text` (VARCHAR): Brief transaction commentary. * `report_date` (DATE): Transaction filing date. * `start_date` (DATE): Trade execution date. ### `stock_institutional_holders` * **Purpose**: Institutional ownership statistics based on SEC 13F filings. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `holder` (VARCHAR): Institutional entity name. * `pct_held` (DECIMAL): Percentage of total shares outstanding owned. * `shares` (BIGINT): Share count. * `value` (BIGINT): Estimated USD value. * `pct_change` (DECIMAL): Change in shares held vs. prior filing. * `report_date` (DATE): Collection date. * `date_reported` (DATE): 13F filing reporting date. ### `stock_mutualfund_holders` * **Purpose**: Mutual fund equity holder lists and ownership percentages. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `holder` (VARCHAR): Mutual fund name. * `pct_held` / `shares` / `value` / `pct_change` (DECIMAL/BIGINT): Position sizes and changes. * `report_date` (DATE): Collection date. * `date_reported` (DATE): Report date. ### `stock_news` * **Purpose**: Feeds of company-specific financial news articles and metadata. * **Columns**: * `uuid` (VARCHAR): Unique article ID. * `symbol` (VARCHAR): Associated ticker. * `title` (VARCHAR): Article headline. * `publisher` (VARCHAR): News source publisher. * `report_date` (DATE): Publication date. * `type` (VARCHAR): Category format. * `link` (VARCHAR): Web URL. * `news` (STRUCT): Nested structure containing paragraph details. * `bucket_id` (BIGINT): Storage grouping bucket. ### `stock_officers` * **Purpose**: Directors, officers, key executives, salaries, and stock options details. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `name` (VARCHAR): Officer name. * `title` (VARCHAR): Position title. * `age` (BIGINT): Executive's age. * `born` (BIGINT): Birth year. * `pay` (BIGINT): Total annual compensation in USD. * `exercised` / `unexercised` (BIGINT): Executed or outstanding options value. * `report_date` (DATE): Metadata capture date. ### `stock_prices` * **Purpose**: Historical daily price bars (Open, Close, High, Low, Volume). * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `report_date` (DATE): Price calendar date. * `open` / `close` / `high` / `low` (DECIMAL): Daily pricing indicators. * `volume` (BIGINT): Daily volume of shares traded. * `bucket_id` (BIGINT): Storage partition bucket. ### `stock_profile` * **Purpose**: Qualitative company background, office address, industry classification, employee count, and website URL. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `address` / `city` / `country` / `phone` / `zip` (VARCHAR): Corporate contact details. * `industry` / `sector` (VARCHAR): Industry and sector classifications. * `long_business_summary` (VARCHAR): Corporate business description. * `full_time_employees` (BIGINT): Count of employees. * `web_site` (VARCHAR): Corporate homepage URL. * `report_date` (DATE): Record capture date. ### `stock_revenue_breakdown` * **Purpose**: Segmented corporate revenue breakdowns (by geographic region or business line). * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `breakdown` (VARCHAR): Segment grouping category. * `report_date` (VARCHAR): Statement ending period date. * `breakdown_name` (VARCHAR): Segment name (e.g. North America, iPhone). * `value` (BIGINT): Revenue value. * `period_type` (VARCHAR): Period scale. * `value_type` (VARCHAR): Period or raw indicator. * `series_name` (VARCHAR): Statement series mapping. * `currency` (VARCHAR): Currency code. ### `stock_sec_filing` * **Purpose**: Metadata and local text file system pointers for Item 7 MD&A and Item 1A Risk Factors from SEC filings. * **Columns**: * `cik` (VARCHAR): Central Index Key. * `symbol` (VARCHAR): Stock ticker. * `company_name` (VARCHAR): Corporate name. * `form_type` (VARCHAR): Form type (e.g. `10-K`, `10-Q`). * `form_type_description` (VARCHAR): SEC form description. * `accession_number` (VARCHAR): Unique SEC accession identifier. * `acceptance_date_time` (VARCHAR): System timestamp of submission acceptance. * `filing_url` (VARCHAR): Online filing path. * `mda_text_path` / `risk_factors_text_path` (VARCHAR): Path pointers to cleaned local text sections. * `filing_date` (DATE): Filing release date. * `report_date` (DATE): Reference period date. ### `stock_shares_outstanding` * **Purpose**: Chronological corporate shares outstanding tracking history. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `shares_outstanding` (BIGINT): Share count outstanding. * `report_date` (DATE): Reference period date. ### `stock_split_events` * **Purpose**: Historic stock split coefficients and ratios. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `split_factor` (VARCHAR): Split ratio (e.g. `2:1`). * `rn_1` (BIGINT): Row number sorting. * `report_date` (DATE): Effective split date. ### `stock_statement` * **Purpose**: Normalized financial statement rows (balance sheet, income statement, cash flow) mapped to standard accounting items. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `item_name` (VARCHAR): Standard statement item key. * `item_value` (DECIMAL): Accounting dollar amount. * `finance_type` (VARCHAR): Balance sheet, income statement, or cash flow indicator. * `period_type` (VARCHAR): `annual` or `quarterly`. * `report_date` (DATE): Statement ending period date. ### `stock_trailing_eps` * **Purpose**: Trailing Twelve Months (TTM) earnings per share records. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `report_date` (VARCHAR): Capture date. * `trailing_eps` (DECIMAL): Trailing EPS value. * `update_time` (VARCHAR): System timestamp of capture. ### `stock_valuation_snapshot` * **Purpose**: Highly comprehensive daily metrics snapshot containing valuation ratios, growth rates, margin structures, balance sheet summaries, and trading metrics. * **Columns**: * `symbol` (VARCHAR): Stock ticker. * `market_cap` (BIGINT): Market capitalization. * `trailing_pe` / `forward_pe` / `price_to_book` / `price_to_sales` (DECIMAL): Core multiples. * `enterprise_value` (BIGINT): Corporate Enterprise Value. * `enterprise_to_revenue` / `enterprise_to_ebitda` (DECIMAL): Enterprise multiples. * `beta` (DECIMAL): Trading beta coefficient. * `dividend_rate` / `dividend_yield` (DECIMAL): Dividend summaries. * `payout_ratio` (DECIMAL): Dividend payout ratio. * `ex_dividend_date` (VARCHAR): Date of ex-dividend. * `fifty_two_week_high` / `fifty_two_week_low` (DECIMAL): Yearly price bounds. * `fifty_day_average` / `two_hundred_day_average` (DECIMAL): Moving price averages. * `short_ratio` / `short_percent_of_float` (DECIMAL): Short interest statistics. * `return_on_assets` / `return_on_equity` (DECIMAL): Asset and equity returns. * `profit_margins` / `operating_margins` (DECIMAL): Margin structures. * `revenue_growth` / `earnings_growth` (DECIMAL): Growth performance rates. * `total_cash` / `total_debt` (BIGINT): Debt and cash levels. * `debt_to_equity` / `current_ratio` / `quick_ratio` (DECIMAL): Leverage and liquidity ratios. * `held_percent_insiders` / `held_percent_institutions` (DECIMAL): Ownership concentration. * `float_shares` (BIGINT): Floating share count. * `current_price` (DECIMAL): Current close price. * `exchange` (VARCHAR): Trading exchange. * `website` (VARCHAR): Corporate homepage. * `trailing_eps` (DECIMAL): Trailing EPS. * `report_date` (DATE): Ingestion snapshot reference date.