Back to Portfolio
Excel Python Claude Code

Adaptive Valuation Engine

One DCF model. Three company profiles. Adaptation through configuration, not complexity.

Mega-Cap to Turnaround

AAPL, FSLY, CVNA

1 Engine, 3 Profiles

Adaptive DCF

$0 Data Cost

yfinance

Equity ValuationDCF ModelingMarket Gap Analysis

How I Built This with Claude Code

This project was built end-to-end using Claude Code as the primary development and analysis tool across Python and Excel.

  • Python modeling: Wrote and iterated on a single adaptive DCF engine covering WACC construction, operating model projections, sensitivity grids, Monte Carlo simulations, and adaptive features like beta overrides, sigmoid margin curves, and NOL carryforward logic.
  • Excel outputs: Generated 9-tab live-formula workbooks via openpyxl covering assumptions, operating models, DCF valuations, comps tables, sensitivity analysis, and full financial statements.
  • yfinance integration: Sourced all financial data from Yahoo Finance at zero cost, with documented overrides where free data fell short (beta, cost of debt, peer coverage).

From Ticker to Deliverable in Under 30 Seconds

Type the ticker, adjust the config block, and execute. The pipeline fetches LTM financials from yfinance, constructs WACC, builds three scenario-weighted operating models, computes DCF under both perpetuity and exit multiple methods, runs sensitivity analysis, and writes a 9-tab Excel workbook with live formulas. Every number in the case studies below was produced this way. The engine works on any publicly traded ticker. The analytical work is in the configuration. The execution is instantaneous.

How the Model Adapts

Same codebase. Same pipeline. Only the configuration changes. The three companies represent three distinct challenges for a single DCF framework.

Portfolio at a Glance

Company Profiles

MetricAAPLFSLYCVNA
Market Price (Mar 6, 2026)$257.62$20.16$317.21
LTM Revenue$435.6B$624M$20.32B
LTM Gross Margin47.3%57.1%20.6%
LTM EBITDA Margin35.1%NegativeNear breakeven
Profitability CheckPassedFailedFailed (transition)

Model Output

MetricAAPLFSLYCVNA
Base Implied (Perpetuity)$161.15N/M¹$189.19
Base Implied (Exit)$223.52$15.79$321.66
Gap to Market (Exit)-13.2%-21.7%+1.4%
TV % of EV75-80%104%80-88%
VerdictOvervaluedMod. overvaluedFairly valued

¹ N/M = Not Measured. Year 5 EBIT is still negative, so perpetuity valuation produces negative equity value. The exit method works because it normalizes to steady-state margins instead.

Why a DCF

DCFs are assumption-driven. Small input changes swing output by double digits, and terminal value typically does 70-90% of the work. Practitioners know this. Most use comps and multiples as the primary valuation tool, with DCF as a cross-check. The implied price is not the point. The model's value is the structured decomposition underneath it: specific growth rates, margin trajectories, discount rates, and terminal multiples, each testable on its own terms. That is something a comps table cannot do.

Data Source: yfinance Constraints

All financial data is derived from yfinance, a free Python library pulling from Yahoo Finance. The model runs on publicly available data without a Bloomberg terminal, Capital IQ, or paid API.

The tradeoff is by design. Beta, cost of debt, and peer coverage are the three weak points.

Every override in the case studies (beta floors, beta overrides, cost of debt overrides) exists because the analyst recognized where the free data fell short. A Bloomberg-sourced model would have cleaner inputs. It would also require a $24,000/yr terminal. yfinance makes the model accessible to anyone with a Python environment.

For educational and analytical purposes only. Not investment advice.