---
name: company_valuation_basics
description: Value a company from scratch with DCF models, comparable multiples, WACC builds, and margin-of-safety analysis. Triggers on requests to value a company or stock, build a DCF, run comps, check if a price is fair, or estimate intrinsic value per share.
---

# Company Valuation Basics

## Purpose
Take a company's financials and produce a defensible intrinsic-value range, using three lenses that cross-check each other: a discounted cash flow model (intrinsic), comparable multiples (market-relative), and a margin-of-safety decision rule. Output is a football field: bear/base/bull values per method, a composite, and a clear cheap-or-expensive verdict.

## Workflow
1. **Gather inputs.** Revenue, EBIT, D&A, CapEx, change in net working capital, total debt, cash, diluted shares, current price. Five years of history beats one year of estimates.
2. **Build WACC.** `bin/dcf.py --capm Rf beta ERP` for cost of equity; `--wacc E D Re Rd Tc` blends it with after-tax debt. Use market values, not book values, for the E/D weights. Record every input and where it came from.
3. **Project unlevered free cash flow, 5 years.** UFCF = EBIT x (1 - tax rate) + D&A - change in NWC - CapEx. Tie revenue growth and margins to history and the industry, never to a target price.
4. **Terminal value, two ways.** Gordon growth: FCF_last x (1+g)/(WACC-g), with g below long-run economic growth. Exit multiple: terminal-year EBITDA x peer EV/EBITDA. If the two disagree by more than ~25%, your assumptions are inconsistent; find out which one is wrong.
5. **Bridge to equity.** Enterprise value minus net debt (debt minus cash) equals equity value; divide by diluted shares. This bridge is where most spreadsheet errors hide, so state it explicitly.
6. **Run comps.** Pick 5-8 peers in the same industry with similar size and growth. Apply peer median multiples (median, not mean) to the target's EPS and EBITDA. Never mix trailing and forward multiples in one column.
7. **Write the case file and run the model.** `python3 bin/dcf.py case.json` prints the football field, composite, and margin of safety. Worked numbers live in `references/dcf-worked-example.md`.
8. **Apply the margin of safety.** Only act when price sits well below composite intrinsic value (30%+ discount is the classic bar). See `references/multiples-guide.md` for picking multiples per sector.

## Output Contract
A valuation report contains:
- Inputs table with sources (every number traceable)
- Football field: DCF (Gordon) and DCF (exit) in bear/base/bull, comps P/E and EV/EBITDA, composite base value
- Enterprise-to-equity bridge, stated line by line
- Margin of safety vs market price, with the verdict: compelling / fair / thin / expensive
- Sensitivity note: what breaks the thesis (e.g. WACC +150bps, growth halved)
- Limitations: which assumptions the result is most fragile to

## Operating Rules
1. Never invent financials. If a number is estimated, label it estimated and show the basis. Unverifiable = cut it.
2. One method is never enough. Always pair DCF with at least one market-multiple check.
3. Flag when terminal value exceeds ~70% of enterprise value. That means the forecast window carries the model and the assumptions are doing too much work.
4. Terminal growth must stay below long-run economic growth and below WACC. Violating this silently produces infinite value.
5. A multiple means nothing alone. P/E of 20 says nothing without the peer median, the company's history, and the growth rate behind it.
6. Price and value are different things. The model's job is the gap between them, not predicting where price goes next.
7. This is an analytical tool, not financial advice. Say that when the audience is a human making decisions with real money.
