DCF Valuation
curl --request GET \
--url https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcfimport requests
url = "https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf")
.asString();require 'uri'
require 'net/http'
url = URI("https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"symbol": "<string>",
"date": "<string>",
"dcf": 123,
"stock_price": 123,
"revenue_growth_rate": 123,
"discount_rate": 123,
"terminal_growth_rate": 123,
"years_of_projection": 123,
"source": "<string>",
"timestamp": "<string>"
}FMP Professional
DCF Valuation
Get Discounted Cash Flow valuation and intrinsic value calculation
GET
/
api
/
v1
/
fmp
/
stock
/
{symbol}
/
dcf
DCF Valuation
curl --request GET \
--url https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcfimport requests
url = "https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf")
.asString();require 'uri'
require 'net/http'
url = URI("https://stocks-dev.up.railway.app/api/v1/fmp/stock/{symbol}/dcf")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"symbol": "<string>",
"date": "<string>",
"dcf": 123,
"stock_price": 123,
"revenue_growth_rate": 123,
"discount_rate": 123,
"terminal_growth_rate": 123,
"years_of_projection": 123,
"source": "<string>",
"timestamp": "<string>"
}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.DCF analysis is a fundamental valuation method used by professional analysts and institutional investors to determine fair value based on future cash flow projections.
Parameters
string
required
Stock ticker symbol (e.g., AAPL, MSFT, GOOGL, TSLA)
Response
string
The stock ticker symbol
string
Date of the DCF calculation
number
Calculated DCF value (intrinsic value per share)
number
Current stock price for comparison
number
Projected revenue growth rate used in calculation
number
Discount rate (WACC) used in DCF calculation
number
Terminal growth rate assumption
number
Number of years projected in the model
string
Data source identifier (“FMP”)
string
ISO timestamp of the response
Examples
curl "https://stocks-dev.up.railway.app/api/v1/fmp/stock/AAPL/dcf"
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")
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
$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";
}
?>
Response Example
{
"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
DCF Methodology
DCF Methodology
Discounted Cash Flow analysis estimates intrinsic value by:
- Projecting Future Cash Flows: Based on revenue growth assumptions
- Applying Discount Rate: Using WACC (Weighted Average Cost of Capital)
- Terminal Value: Calculating value beyond projection period
- Present Value: Discounting all future cash flows to today’s value
Key Assumptions
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
Investment Interpretation
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
Use Cases
Value Investing
Long-term Analysis
- Identify undervalued stocks
- Calculate margin of safety
- Compare with market price
Portfolio Management
Investment Decisions
- Asset allocation guidance
- Risk assessment
- Entry/exit timing
Due Diligence
Research & Analysis
- Fundamental analysis
- Peer comparison
- Sensitivity analysis
Risk Management
Valuation Risk
- Overvaluation detection
- Bubble identification
- Conservative estimates
Important Considerations
Model Limitations: DCF models are sensitive to assumptions. Small changes in growth rates or discount rates can significantly impact valuations.
Professional Use: This DCF calculation uses institutional-grade methodology but should be combined with other valuation methods for comprehensive analysis.
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
Error Responses
Invalid Symbol (404)
Invalid Symbol (404)
{
"error": "404: Failed to fetch DCF valuation for INVALID"
}
Insufficient Data (422)
Insufficient Data (422)
{
"error": "Insufficient financial data for DCF calculation",
"detail": "Company requires more historical data for accurate DCF modeling"
}
Rate Limited (429)
Rate Limited (429)
{
"error": "Rate limit exceeded",
"detail": "FMP API limit reached. Please upgrade plan or try again later."
}
MCP Protocol Usage
For AI agents using the Model Context Protocol:{
"method": "tools/call",
"params": {
"name": "fmp_get_dcf_valuation",
"arguments": {
"symbol": "AAPL"
}
}
}
Related Endpoints
Financial Statements
Get detailed income, balance sheet, and cash flow data
Key Metrics
Get financial ratios and performance metrics
Analyst Estimates
Get professional earnings and revenue forecasts
Stock Quote
Get current market price for comparison