# Valuation methodology

> API version: v1

The [valuation](https://studyingstocks.com/developers/valuation) endpoint returns our discounted cash flow (DCF) model. It uses **only** the company's own SEC filings: no analyst forecasts and no market data. The response reports `methodology_version`, which changes whenever the method does.

## Steps (version 1)

1. **History.** The free cash flow and revenue of the last fiscal years (up to six).
2. **Base.** The latest fiscal year's revenue times the **median free cash flow margin** of the last five years, which smooths one-off years.
3. **Growth.** The revenue CAGR of the last five years, limited to between -5% and +15% a year. Years 1 to 5 grow at this rate; in years 6 to 10 the rate fades in equal steps to the perpetual growth rate of 2.5%.
4. **Discounting.** Each projected year is discounted at the required return of **8.5%**.
5. **Terminal value.** The year-10 cash flow grows at 2.5% a year forever (Gordon growth), is divided by required return minus growth, and is discounted back like year 10.
6. **Fair value.** Present value of the 10 years plus the terminal value, minus net debt (`total_debt` minus `cash_and_equivalents`, each from the newest period that reports it; a missing value is never treated as zero), divided by the latest diluted share count (basic when diluted is not reported).

The `assumptions` object reports the required return, perpetual growth and the first-stage growth, `free_cash_flow_projection` has each projected year with its discount factor and present value, and `inputs` has the balance sheet date and values used.

## When there is no valuation

A free cash flow model does not fit every company. The response is still `200`, with `meaningful: false` and a `reason`:

| Code | Why |
|---|---|
| `financial_company` | Banks, insurers, brokers and real estate companies (SIC 6000 to 6799): free cash flow says little about their value |
| `no_industry_code` | We do not know the SEC industry code, so we cannot tell whether the model fits |
| `insufficient_history` | Fewer than three fiscal years of data, or free cash flow that is not positive enough to project |
| `no_share_count` | The latest share count is not available |
| `missing_balance_sheet` | No period reports total debt, or none reports cash |
| `not_calculable` | The result was not a finite number |

## Limits of the model

It extrapolates the past. It does not know about acquisitions, new products, or changing margins, and a single discount rate for every company is a simplification. Treat the result as one input, not as advice. The data is provided as is and is not investment advice.
