Back to Dashboard

Mispriced

fundamental valuation software

Model Methodology

1. Overview

What the Model Does

The model predicts fair market capitalization from financial statement data using machine learning. It learns historical relationships between company fundamentals (revenue, profits, debt, cash flows) and market valuations across thousands of stocks.

What the Model Does NOT Do

  • It does not predict future stock prices or returns
  • It does not account for growth expectations or momentum
  • It does not provide buy/sell recommendations
  • It is not a fundamental DCF or comparable company analysis

Key Insight

Mispricing signals are relative, not absolute. A stock showing 20% mispricing means the current market cap exceeds the model's predicted fair value by 20% based on fundamentals alone. This indicates overvaluation — investors are willing to pay beyond what fundamentals suggest, which could reflect growth expectations, brand value, or other intangibles not captured by financial statements.

Cross-Sectional, Not Time-Series

Each quarter is trained independently — the model only compares companies within the same quarter. This means:

  • No future leakage: The model cannot learn from future quarters
  • Market regime adaptation: Valuation multiples change over time (e.g., tech was valued higher in 2021)
  • Fair comparison: Companies are valued against contemporaries, not historical norms

2. Model Architecture

Algorithm

XGBoost

Gradient Boosted Decision Trees

Target Variable

log(market_cap)

Log-transformed for numerical stability

Why Tree-Based Models?

  • Non-linear relationships: Financial ratios have complex, non-linear effects on valuation
  • Feature interactions: Trees naturally capture interactions (e.g., high debt is worse for low-margin companies)
  • Robustness: Less sensitive to outliers and missing data than linear models
  • No scaling required: Tree splits are invariant to monotonic feature transformations

Fixed Hyperparameters

n_estimators: 200
max_depth: 5
learning_rate: 0.1
subsample: 0.8
colsample_bytree: 0.8
objective: reg:absoluteerror

Fixed parameters ensure consistency across quarters. No hyperparameter tuning is performed.

3. Cross-Validation Methodology

The model uses repeated K-fold cross-validation to generate prediction distributions. This approach prevents data leakage and provides uncertainty estimates.

10

CV Repeats

5

Folds per Repeat

50

Predictions per Stock

K-Fold Cross-Validation Diagram

Each row shows one fold. Blue = training data, Red = test data (held-out).

Fold 1
Test
Fold 2
Test
Fold 3
Test
Fold 4
Test
Fold 5
Test

Why Repeated CV?

  • Uncertainty quantification: The standard deviation across 50 predictions measures model confidence
  • Robustness: Averaging reduces sensitivity to specific train/test splits
  • No data leakage: Each prediction is made on held-out data the model has never seen

4. Feature Engineering

Features are extracted from quarterly financial statements. The model uses a combination of raw fundamentals and financial ratios.

Core Features

Feature Category Transform Fill Strategy
Total Revenue Fundamentals log1p Required
Gross Profit Fundamentals log1p Zero
EBITDA Fundamentals log1p Median
Net Income Fundamentals - Zero
Total Debt Balance Sheet log1p Zero
Total Cash Balance Sheet log1p Zero
Free Cash Flow Cash Flow - Zero
Profit Margin Ratio - Median
Debt-to-Equity Ratio log Median
ROE / ROA Ratio - Median

Current Data Coverage

Feature availability across ~32,000 quarterly snapshots:

Revenue: 91%
Net Income: 72%
Total Debt: 72%
Total Cash: 72%
EBITDA: 64%
Free Cash Flow: 69%
ROA/ROE: 65-71%
Gross Profit: 43%

Transforms Explained

  • log1p: Applies log(1 + x) to handle large scale differences and zeros
  • log: Standard log transform for ratio features (excludes zeros)
  • Median fill: Replaces missing values with sector/industry median
  • Zero fill: Assumes missing financial data indicates zero (conservative)

5. Mispricing Calculation

Raw Mispricing

mispricing = (actual_mcap - predicted_mcap) / actual_mcap

Positive Mispricing

Current market cap exceeds model's predicted fair value. Suggests potential overvaluation — investors are paying beyond fundamentals.

Negative Mispricing

Current market cap is below model's predicted fair value. Suggests potential undervaluation based on fundamentals.

Size Premium Correction

Raw mispricing exhibits a systematic size effect: smaller companies tend to show positive mispricing while larger companies show negative mispricing. This reflects the historical "size premium" where smaller companies trade at higher multiples.

size_neutral_mispricing = raw_mispricing - size_premium(market_cap)

The size premium is estimated by fitting a smooth curve (spline or polynomial) to the mispricing vs. market cap relationship. This correction isolates stock-specific mispricing from the systematic size effect.

When to Use Each Mode

  • Raw: Compare stocks within similar market cap ranges
  • Size-Neutral: Compare stocks across different market caps (recommended)

Conformal Prediction Intervals (CQR)

Each prediction ships with a 90% prediction interval [predicted_lo, predicted_hi] built via Conformalized Quantile Regression with a CV+ calibration loop1,2. Two auxiliary XGBoost models are fit at the 5th and 95th conditional quantiles; out-of-fold nonconformity scores s_i = max(ŷ_lo − y_i, y_i − ŷ_hi) are pooled across folds and the 90th percentile q is added back to widen the band to its calibrated width. The result is a multiplicative band in raw market-cap space (constant width in log space): a $10B name gets a tighter dollar band than a $1T name in absolute terms, but the same relative band — which is the right scaling for market caps spanning five orders of magnitude.

Note: the central estimate predicted is a separately fit gradient-boosted mean regressor; the CI bounds come from two quantile regressors plus the conformal correction. For a small fraction of stocks (typically those where the mean and quantile models disagree most), predicted can fall outside [predicted_lo, predicted_hi] — this is expected and does not invalidate the interval's calibration.

Empirical Coverage

Calibration is verified per quarter by computing the fraction of stocks whose actual market cap falls inside its predicted interval. A well-calibrated 90% CI lands at empirical coverage ≈ 0.90.

Loading coverage diagnostic…

Assumption. Conformal coverage holds under exchangeability of the calibration and test data. Within a single quarter this is a reasonable approximation; across quarters it does not hold because market regimes shift. Quarters not yet re-run with CQR will show as in the table above until the backfill completes.

Conditional Coverage by Market Cap

The 90% empirical coverage above is a marginal guarantee — pooled across all stocks. Coverage conditional on market cap is much less uniform. On the latest quarter (2026-03-31, n=3055):

Market cap bucket n Empirical coverage Median width (hi / lo)
$0–1B51796.3%13.8×
$1–5B1,06193.8%14.0×
$5–20B76688.3%11.3×
$20–100B51387.9%8.6×
$100–500B17572.0%8.8×
$500B–5T2236.4%16.0×
$5T+10.0%5.8×

A single global calibration constant gets inflated by tail residuals (mega-cap misses driven by intangibles the books don't capture), which over-covers the small-cap bucket and still leaves the large-cap bucket badly under-covered. Median band widths of 8–16× hi/lo at the tails reflect a real property of the data — fundamentals do not pin down log(mcap) for large companies — rather than a pipeline defect. This is the intangibles-premium claim, quantified one more way.

Why the per-stock tooltip does not show this interval. Because conditional coverage is uneven and the bands at the tails are too wide to be informative per-stock, the valuation-map tooltip displays Model stability — the std of the point prediction across CV folds, as a fraction of actual market cap. Model stability is not a coverage statement; it is fold-disagreement, which under the dashboard’s framing (“what does a book-fundamentals model say is fair?”) is the more interpretable per-stock metric. The CQR intervals are retained on the methodology page as a calibration diagnostic, not a per-stock display.

6. Signal Quality & Backtesting

Backtest results measure whether historical mispricing signals predicted future price movements.

Information Coefficient (IC)

IC = correlation(mispricing_signal, future_return)

Interpreting IC

The signal convention is signal_raw = (predicted_mcap - actual_mcap) / actual_mcap, so signal_raw > 0 means the model thinks the stock is undervalued (price should be higher than it is). IC is the raw Spearman rank correlation of the signal against the forward return — no sign flip is applied.

  • IC > 0: Book-based residual predicted mean reversion — undervalued stocks outperformed and overvalued underperformed (value strategy worked over the horizon).
  • IC ~ 0: No predictive signal.
  • IC < 0: Market continued to price the non-book premium — undervalued stocks kept underperforming (intangibles/growth/quality factors dominated book value).

The dashboard shows the raw Spearman IC. Which sign counts as "expected" depends on how you read the result: as a value-strategy backtest (reversion framing — positive IC is the headline) or as evidence of a persistent intangibles premium (intangibles framing — negative IC is the headline). The two framings agree on the data and disagree only on which pole counts as confirmation.

Hit Rate

hit_rate = fraction of stocks where sign(signal) == sign(forward_return)

A "hit" occurs when the signal and the forward return have the same sign (both positive or both negative). Under the convention used in this dashboard (signal > 0 = undervalued), hit rate above 50% indicates the signal's sign agrees with the return's sign more often than chance. Hit rate is intentionally symmetric and does not pre-commit to a value-vs-momentum framing — that interpretation comes from the IC sign described above. As always, the magnitude of returns matters more than hit rate for portfolio construction.

Statistical Significance

P-values are corrected using the Benjamini-Hochberg procedure to control the false discovery rate across the multiple cells of each heatmap. The correction is applied server-side during dashboard JSON generation: each (metric, horizon) cohort (one column of one heatmap, ~33 sector or index cells) is adjusted independently, and the per-quarter scatter points are adjusted within their own (metric, horizon, quarter) cohorts. The dashboard reads the adjusted p-value (pval_adj) directly; the star annotations and the "significant" flag both reflect the adjusted value, not the raw one.

Significance Stars

  • p < 0.05 (significant)
  • ★★ p < 5e-4 (highly significant)
  • ★★★ p < 5e-8 (extremely significant)

Horizon Analysis

Backtests are run across multiple forward-looking horizons (e.g., 5, 10, 21, 63, 126 trading days) to understand signal persistence and decay. Shorter horizons capture momentum effects while longer horizons reflect fundamental mean reversion.

7. Limitations & Caveats

Not Financial Advice

This tool is for research and educational purposes only. The mispricing signals should not be used as the sole basis for investment decisions. Always consult with a qualified financial advisor and conduct your own due diligence.

Model Limitations

  • Backward-looking fundamentals: Financial statements are historical. The model cannot capture future growth expectations, pending acquisitions, or unreleased products.
  • No intangibles: Brand value, intellectual property, network effects, and other intangible assets are not directly measured in financial statements.
  • Cross-sectional only: The model compares companies at a single point in time. It does not model time-series dynamics or macroeconomic factors.
  • Sector mixing: The model trains on all sectors together. Industry-specific valuation multiples may not be fully captured.
  • Survivorship bias: The dataset includes currently traded stocks. Delisted companies are not included in backtests.
  • Cross-quarter coverage drift: The 90% prediction intervals shown in the dashboard tooltip rely on a conformal calibration that assumes exchangeability between calibration and test data. Within a single quarter this is approximately true; across quarters it is not — under regime shifts (rate changes, sector rotations, vol spikes) the empirical coverage on a held-out quarter can drift away from the nominal 90% even when the in-quarter calibration is perfect.

Data Limitations

  • Variable coverage: Revenue has ~91% coverage, but some features like gross profit have lower availability (~43%). Missing values are filled with sector medians or zeros.
  • Point-in-time accuracy: Quarterly snapshots may not perfectly align with earnings release dates.
  • Market cap timing: Historical market caps are reconstructed from price × shares outstanding.

Backtest Caveats

  • Look-ahead bias: Model hyperparameters were tuned on the full dataset. True out-of-sample performance may differ.
  • Transaction costs: Backtests do not include trading costs, slippage, or market impact.
  • Past performance: Historical signal quality does not guarantee future results.

References

  1. Romano, Y., Patterson, E., & Candès, E. J. (2019). Conformalized Quantile Regression. Advances in Neural Information Processing Systems 32 (NeurIPS 2019). arXiv:1905.03222
  2. Barber, R. F., Candès, E. J., Ramdas, A., & Tibshirani, R. J. (2021). Predictive inference with the jackknife+. The Annals of Statistics, 49(1), 486–507. arXiv:1905.02928