> ## Documentation Index
> Fetch the complete documentation index at: https://finance.chiefpriest.design/llms.txt
> Use this file to discover all available pages before exploring further.

# DCF Valuation

> Get Discounted Cash Flow valuation and intrinsic value calculation

## Overview

Retrieve DCF (Discounted Cash Flow) valuation analysis for any publicly traded company. This endpoint provides professional-grade intrinsic value calculations based on projected future cash flows, helping investors determine if a stock is undervalued or overvalued.

<Info>
  DCF analysis is a fundamental valuation method used by professional analysts and institutional investors to determine fair value based on future cash flow projections.
</Info>

## Parameters

<ParamField path="symbol" type="string" required>
  Stock ticker symbol (e.g., AAPL, MSFT, GOOGL, TSLA)
</ParamField>

## Response

<ResponseField name="symbol" type="string">
  The stock ticker symbol
</ResponseField>

<ResponseField name="date" type="string">
  Date of the DCF calculation
</ResponseField>

<ResponseField name="dcf" type="number">
  Calculated DCF value (intrinsic value per share)
</ResponseField>

<ResponseField name="stock_price" type="number">
  Current stock price for comparison
</ResponseField>

<ResponseField name="revenue_growth_rate" type="number">
  Projected revenue growth rate used in calculation
</ResponseField>

<ResponseField name="discount_rate" type="number">
  Discount rate (WACC) used in DCF calculation
</ResponseField>

<ResponseField name="terminal_growth_rate" type="number">
  Terminal growth rate assumption
</ResponseField>

<ResponseField name="years_of_projection" type="number">
  Number of years projected in the model
</ResponseField>

<ResponseField name="source" type="string">
  Data source identifier ("FMP")
</ResponseField>

<ResponseField name="timestamp" type="string">
  ISO timestamp of the response
</ResponseField>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://stocks-dev.up.railway.app/api/v1/fmp/stock/AAPL/dcf"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get("https://stocks-dev.up.railway.app/api/v1/fmp/stock/AAPL/dcf")
  data = response.json()

  dcf_value = data['dcf']
  current_price = data['stock_price']
  discount = ((dcf_value - current_price) / current_price) * 100

  print(f"DCF Analysis for {data['symbol']}:")
  print(f"Intrinsic Value: ${dcf_value:.2f}")
  print(f"Current Price: ${current_price:.2f}")
  print(f"Discount/Premium: {discount:.1f}%")

  if dcf_value > current_price:
      print("🟢 Stock appears undervalued")
  else:
      print("🔴 Stock appears overvalued")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://stocks-dev.up.railway.app/api/v1/fmp/stock/AAPL/dcf');
  const data = await response.json();

  const dcfValue = data.dcf;
  const currentPrice = data.stock_price;
  const discount = ((dcfValue - currentPrice) / currentPrice) * 100;

  console.log(`DCF Analysis for ${data.symbol}:`);
  console.log(`Intrinsic Value: $${dcfValue.toFixed(2)}`);
  console.log(`Current Price: $${currentPrice.toFixed(2)}`);
  console.log(`Discount/Premium: ${discount.toFixed(1)}%`);

  if (dcfValue > currentPrice) {
      console.log("🟢 Stock appears undervalued");
  } else {
      console.log("🔴 Stock appears overvalued");
  }
  ```

  ```php PHP theme={null}
  <?php
  $response = file_get_contents('https://stocks-dev.up.railway.app/api/v1/fmp/stock/AAPL/dcf');
  $data = json_decode($response, true);

  $dcf_value = $data['dcf'];
  $current_price = $data['stock_price'];
  $discount = (($dcf_value - $current_price) / $current_price) * 100;

  echo "DCF Analysis for " . $data['symbol'] . ":\n";
  echo "Intrinsic Value: $" . number_format($dcf_value, 2) . "\n";
  echo "Current Price: $" . number_format($current_price, 2) . "\n";
  echo "Discount/Premium: " . number_format($discount, 1) . "%\n";

  if ($dcf_value > $current_price) {
      echo "🟢 Stock appears undervalued\n";
  } else {
      echo "🔴 Stock appears overvalued\n";
  }
  ?>
  ```
</CodeGroup>

## Response Example

```json theme={null}
{
  "symbol": "AAPL",
  "date": "2025-06-28",
  "dcf": 167.07,
  "stock_price": 201.08,
  "revenue_growth_rate": 0.05,
  "discount_rate": 0.09,
  "terminal_growth_rate": 0.025,
  "years_of_projection": 5,
  "source": "FMP",
  "timestamp": "2025-06-28T19:45:12.123456"
}
```

## Understanding DCF Analysis

<AccordionGroup>
  <Accordion title="DCF Methodology">
    **Discounted Cash Flow** analysis estimates intrinsic value by:

    1. **Projecting Future Cash Flows**: Based on revenue growth assumptions
    2. **Applying Discount Rate**: Using WACC (Weighted Average Cost of Capital)
    3. **Terminal Value**: Calculating value beyond projection period
    4. **Present Value**: Discounting all future cash flows to today's value
  </Accordion>

  <Accordion title="Key Assumptions">
    * **Revenue Growth Rate**: Expected annual revenue growth
    * **Discount Rate (WACC)**: Company's cost of capital
    * **Terminal Growth**: Long-term sustainable growth rate
    * **Projection Period**: Typically 5-10 years of detailed forecasts
  </Accordion>

  <Accordion title="Investment Interpretation">
    * **DCF > Current Price**: Potentially undervalued (buy signal)
    * **DCF \< Current Price**: Potentially overvalued (sell signal)
    * **DCF ≈ Current Price**: Fairly valued
    * **Margin of Safety**: Consider 10-20% discount for risk buffer
  </Accordion>
</AccordionGroup>

## Use Cases

<CardGroup cols={2}>
  <Card title="Value Investing" icon="chart-line">
    **Long-term Analysis**

    * Identify undervalued stocks
    * Calculate margin of safety
    * Compare with market price
  </Card>

  <Card title="Portfolio Management" icon="briefcase">
    **Investment Decisions**

    * Asset allocation guidance
    * Risk assessment
    * Entry/exit timing
  </Card>

  <Card title="Due Diligence" icon="magnifying-glass">
    **Research & Analysis**

    * Fundamental analysis
    * Peer comparison
    * Sensitivity analysis
  </Card>

  <Card title="Risk Management" icon="shield">
    **Valuation Risk**

    * Overvaluation detection
    * Bubble identification
    * Conservative estimates
  </Card>
</CardGroup>

## Important Considerations

<Warning>
  **Model Limitations**: DCF models are sensitive to assumptions. Small changes in growth rates or discount rates can significantly impact valuations.
</Warning>

<Info>
  **Professional Use**: This DCF calculation uses institutional-grade methodology but should be combined with other valuation methods for comprehensive analysis.
</Info>

<Tip>
  **Best Practices**:

  * Compare DCF with P/E, P/B, and other multiples
  * Consider multiple scenarios (bull/bear/base case)
  * Account for industry-specific factors
  * Regular model updates with new data
</Tip>

## Error Responses

<AccordionGroup>
  <Accordion title="Invalid Symbol (404)">
    ```json theme={null}
    {
      "error": "404: Failed to fetch DCF valuation for INVALID"
    }
    ```
  </Accordion>

  <Accordion title="Insufficient Data (422)">
    ```json theme={null}
    {
      "error": "Insufficient financial data for DCF calculation",
      "detail": "Company requires more historical data for accurate DCF modeling"
    }
    ```
  </Accordion>

  <Accordion title="Rate Limited (429)">
    ```json theme={null}
    {
      "error": "Rate limit exceeded",
      "detail": "FMP API limit reached. Please upgrade plan or try again later."
    }
    ```
  </Accordion>
</AccordionGroup>

## MCP Protocol Usage

For AI agents using the Model Context Protocol:

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "fmp_get_dcf_valuation",
    "arguments": {
      "symbol": "AAPL"
    }
  }
}
```

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Financial Statements" icon="file-text" href="/api-reference/fmp/financials">
    Get detailed income, balance sheet, and cash flow data
  </Card>

  <Card title="Key Metrics" icon="calculator" href="/api-reference/fmp/key-metrics">
    Get financial ratios and performance metrics
  </Card>

  <Card title="Analyst Estimates" icon="crystal-ball" href="/api-reference/fmp/analyst-estimates">
    Get professional earnings and revenue forecasts
  </Card>

  <Card title="Stock Quote" icon="chart-line" href="/api-reference/stock/quote">
    Get current market price for comparison
  </Card>
</CardGroup>
