DCF Valuation (AAPL)
Stock Valuation using Free Cash Flow to the Firm with Python
For this analysis, we use several Python-based scientific computing technologies along with the AlphaWave Data Financial Statements API and the AlphaWave Data Stock Analysis API.
from bs4 import BeautifulSoup as bs
import pandas as pd
import requests
import pandas_datareader as dr
import datetime
We will value Apple Inc. (AAPL) in the subsequent code; however, this analysis works with the ticker of any large publicly traded company.
company_ticker = 'AAPL'
Introduction to Free Cash Flow Valuation
In stock valuation models, there are three predominant definitions of future cash flows: dividends, free cash flows, and residual income. We will focus on building a free cash flow model for stock valuation in this article. Let’s discuss the advantages and disadvantages of free cash flow valuation.
One advantage of free cash flow models is that they can be applied to many firms, regardless of dividend policies or capital structures. The ability to influence the distribution and application of a firm’s free cash flow makes these models more pertinent to a firm’s controlling shareholders.
However, there are cases in which the application of a free cash flow model may be very difficult. Firms that have significant capital requirements may have negative free cash flow for many years into the future. This can be caused by a technological revolution in an industry that requires greater investment to remain competitive or by rapid expansion into untapped markets. This negative free cash flow complicates the cash flow forecast and makes the estimates less reliable.
Free cash flow models are most appropriate:
- For firms that do not have a dividend payment history or have a dividend payment history that is not clearly and appropriately related to earnings.
- For firms with free cash flow that corresponds with their profitability.
- When the valuation perspective is that of a controlling shareholder.
We will build our free cash flow model in three steps. First, we will calculate the Free Cash Flow to the Firm. Second, we will determine the Weighted Average Cost of Capital. Finally, we will perform Stock Valuation using these inputs.
1. Free Cash Flow to the Firm
Forget about all the complicated financial statement relationships for a minute and simply picture the firm as a cash “processor.” Cash flows into the firm in the form of revenue as it sells its product, and cash flows out as it pays its cash operating expenses (e.g., salaries and taxes, but not interest expense, which is a financing and not an operating expense). The firm takes the cash that is left over and makes short-term net investments in working capital (e.g., inventory and receivables) and long-term investments in property, plant, and equipment. After these actions, the cash that remains is available to pay out to the firm’s investors: bondholders, and common shareholders (let’s assume for the moment that the firm has not issued preferred stock). That pile of remaining cash is called Free Cash Flow to the Firm (FCFF) because it’s “free” to payout to the firm’s investors.
The formal definition of FCFF is the cash available to all of the firm’s investors, including stockholders and bondholders, after the firm buys and sells products, provides services, pays its cash operating expenses, and makes short-term and long-term investments.
When building a FCFF valuation model, one can typically choose between a single-stage, two-stage, or three stage valuation model. The single-stage FCFF valuation model is useful for stable firms in mature industries. Two-stage and three-stage FCFF valuation models are used when you want to model multiple phases of growth (e.g., a growth phase, a mature phase, and a transition phase). We use a two-stage FCFF valuation model in this example.
A general expression for the two-stage FCFF valuation model is:
\[Firm\ Value = \sum_{t=1}^n\frac{FCFF_t}{(1 + WACC)^t}+\frac{FCFF_{n+1}}{(WACC - g)}*\frac{1}{(1 + WACC)^n}\]\(Where :\)
- \(FCFF_t\) = expected free cash flow to the firm in year \(t\)
- \(FCFF_{n+1}\) = expected free cash flow to the firm in the last year (Year 6 in this example)
- \(g\) = constant expected growth rate in \(FCFF\)
- \(WACC\) = weighted average cost of capital
One common two-stage model assumes a constant growth rate in each stage, and a second common model assumes declining growth in Stage 1 followed by a long-run sustainable growth rate in Stage 2. In our model, we assume a constant growth rate in each stage.
We will show how to obtain each component of the two-stage FCFF valuation model, but we begin with expected FCFF which requires an ability to determine the appropriate growth rate.
To calculate the FCFF growth rate, we take the compound annual growth rate (CAGR) of FCFF over the past three years. This FCFF growth rate is then used to generate FCFF forecasts for each of the next 5 years, which is Stage 1 in our model. For the constant expected growth rate that will be applied to Stage 2, we divide the CAGR of FCFF by two in order to estimate the long-term growth rate of FCFF in perpetuity.
In order to calculate the FCFF growth rate and long-term growth rate, we must first acquire the FCFF from the company’s financial statements.
url = "https://financial-statements.p.rapidapi.com/api/v1/resources/cash-flow"
querystring = {"ticker":company_ticker}
headers = {
"X-RapidAPI-Key": "API_Key",
"X-RapidAPI-Host": "API_Key"
}
cf_response = requests.get(url, headers=headers, params=querystring)
# Create Cash Flow Statement DataFrame
cash_flow_df = pd.DataFrame.from_dict(cf_response.json())
cash_flow_df = cash_flow_df.drop('ttm', axis = 1)
cash_flow_df
9/30/2020 | 9/30/2021 | 9/30/2022 | |
---|---|---|---|
Capital Expenditure | -7309000 | -11085000 | -10708000 |
End Cash Position | 39789000 | 35929000 | 24977000 |
Financing Cash Flow | -86820000 | -93353000 | -110749000 |
Free Cash Flow | 73365000 | 92953000 | 111443000 |
Income Tax Paid Supplemental Data | 9501000 | 25385000 | 19573000 |
Interest Paid Supplemental Data | 3002000 | 2687000 | 2865000 |
Investing Cash Flow | -4289000 | -14545000 | -22354000 |
Issuance of Capital Stock | 880000 | 1105000 | None |
Issuance of Debt | 16091000 | 20393000 | 9420000 |
Operating Cash Flow | 80674000 | 104038000 | 122151000 |
Repayment of Debt | -13592000 | -8750000 | -9543000 |
Repurchase of Capital Stock | -72358000 | -85971000 | -89402000 |
url = "https://financial-statements.p.rapidapi.com/api/v1/resources/income-statement"
querystring = {"ticker":company_ticker}
headers = {
"X-RapidAPI-Key": "API_Key",
"X-RapidAPI-Host": "API_Key"
}
income_statement_response = requests.get(url, headers=headers, params=querystring)
# Create Income Statement DataFrame
income_statement_df = pd.DataFrame.from_dict(income_statement_response.json())
income_statement_df = income_statement_df.drop('ttm', axis = 1)
income_statement_df
9/30/2020 | 9/30/2021 | 9/30/2022 | |
---|---|---|---|
Basic Average Shares | 17352119 | 16701272 | 16215963 |
Cost of Revenue | 169559000 | 212981000 | 223546000 |
Diluted Average Shares | 17528214 | 16864919 | 16325819 |
Diluted NI Available to Com Stockholders | 57411000 | 94680000 | 99803000 |
EBIT | 66288000 | 108949000 | 119437000 |
EBITDA | 77344000 | 120233000 | 130541000 |
Gross Profit | 104956000 | 152836000 | 170782000 |
Interest Expense | 2873000 | 2645000 | 2931000 |
Interest Income | 3763000 | 2843000 | 2825000 |
Net Income Common Stockholders | 57411000 | 94680000 | 99803000 |
Net Income from Continuing & Discontinued Operation | 57411000 | 94680000 | 99803000 |
Net Income from Continuing Operation Net Minority Interest | 57411000 | 94680000 | 99803000 |
Net Interest Income | 890000 | 198000 | -106000 |
Net Non Operating Interest Income Expense | 890000 | 198000 | -106000 |
Normalized EBITDA | 77344000 | 120233000 | 130541000 |
Normalized Income | 57411000 | 94680000 | 99803000 |
Operating Expense | 38668000 | 43887000 | 51345000 |
Operating Income | 66288000 | 108949000 | 119437000 |
Other Income Expense | 803000 | 258000 | -334000 |
Pretax Income | 67091000 | 109207000 | 119103000 |
Reconciled Cost of Revenue | 169559000 | 212981000 | 223546000 |
Reconciled Depreciation | 11056000 | 11284000 | 11104000 |
Tax Effect of Unusual Items | 0 | 0 | 0 |
Tax Provision | 9680000 | 14527000 | 19300000 |
Tax Rate for Calcs | 0 | 0 | 0 |
Total Expenses | 208227000 | 256868000 | 274891000 |
Total Operating Income as Reported | 66288000 | 108949000 | 119437000 |
Total Revenue | 274515000 | 365817000 | 394328000 |
Using the Cash Flow Statement and Income Statement, we calculate FCFF as:
- \[FCFF = Free\ Cash\ Flow\ +\ Interest\ Expense*(1\ -\ Effective\ Tax\ Rate)\]
- \[FCFF = EBITDA*(1\ −\ TR)\ +\ DA*TR\ +\ WC\ −\ CE\]
\(Where:\)
\(EBITDA\) = Earnings, before interest, taxes, and depreciation
\(TR\) = Tax rate
\(DA\) = Depreciation & amortization
\(WC\) = Changes in working capital
\(CE\) = Capital Expenditures
With this understanding, we are able to store the historical FCFF in a dataframe when running the code below.
# FCFF Calculation using Cash Flow Statement and Income Statement Inputs
free_cash_flow_firm = (cash_flow_df.loc['Free Cash Flow'].astype(int) \
+ (income_statement_df.loc['Interest Expense'].astype(int) \
* (1 - income_statement_df.loc['Tax Provision'].astype(int) \
/ income_statement_df.loc['Pretax Income'].astype(int)))).astype(int)
# Change Series to a Pandas Dataframe
free_cash_flow_firm_df = free_cash_flow_firm.to_frame().transpose()
free_cash_flow_firm_df
9/30/2020 | 9/30/2021 | 9/30/2022 | |
---|---|---|---|
0 | 75823478 | 95246155 | 113899047 |
This allows us to proceed in determining the CAGR and the long-term growth rate that will be used in calculating the forecasted FCFF.
# CAGR of FCFF
latest_free_cash_flow_firm = float(free_cash_flow_firm_df.iloc[0,len(free_cash_flow_firm_df.columns)-1])
earliest_free_cash_flow_firm = float(free_cash_flow_firm_df.iloc[0,1])
free_cash_flow_firm_CAGR = (latest_free_cash_flow_firm/earliest_free_cash_flow_firm)\
**(float(1/(len(free_cash_flow_firm_df.columns))))-1
free_cash_flow_firm_CAGR
0.06142882923846793
# Constant Expected Growth Rate
long_term_growth = free_cash_flow_firm_CAGR / 2
long_term_growth
0.030714414619233965
# Forecasted FCFF
forecast_free_cash_flow_firm_df = pd.DataFrame(columns=['Year ' + str(i) for i in range(1,7)])
free_cash_flow_firm_forecast_lst = []
for i in range(1,7):
if i != 6:
free_cash_flow_firm_forecast = latest_free_cash_flow_firm*(1+free_cash_flow_firm_CAGR)**i
else:
free_cash_flow_firm_forecast = latest_free_cash_flow_firm*(1+free_cash_flow_firm_CAGR)\
**(i-1)*(1+long_term_growth)
free_cash_flow_firm_forecast_lst.append(int(free_cash_flow_firm_forecast))
forecast_free_cash_flow_firm_df.loc[0] = free_cash_flow_firm_forecast_lst
forecast_free_cash_flow_firm_df
Year 1 | Year 2 | Year 3 | Year 4 | Year 5 | Year 6 | |
---|---|---|---|---|---|---|
0 | 120895732 | 128322215 | 136204898 | 144571806 | 153452683 | 158165892 |
Now that we have successfully forecasted FCFF for the next six years and calculated the long-term growth rate, we turn our attention to WACC, which is the final input required in our two-stage FCFF valuation model.
2. Weighted Average Cost of Capital
The Weighted Average Cost of Capital (WACC) is the weighted average of the rates of return required by each of the capital suppliers to the firm (usually this is just equity and debt) where the weights are the proportions of the firm’s total market value from each capital source:
WACC = (equity-to-capital ratio * required return on equity) + (debt-to-capital ratio * after-tax required return on debt)
\[WACC = \frac{E}{E+D}*r_e\ +\ \frac{D}{E+D}*r_d*(1\ -\ tax\ rate)\]\(Where:\)
\(E\) = market value of equity
\(D\) = market value of debt
\(r_e\) = required return on equity
\(r_d\) = required return on debt
\(tax\ rate\) = effective tax rate
We can pull in the remaining data required to calculate WACC from API.
To call these APIs with Python, you can choose one of the supported Python code snippets provided in the API console. The following are examples of how to invoke the APIs with Python Requests. You will need to insert your own x-rapidapi-host and x-rapidapi-key information in the code blocks below.
url = "https://financial-statements.p.rapidapi.com/api/v1/resources/balance-sheet"
querystring = {"ticker":company_ticker}
headers = {
"X-RapidAPI-Key": "API_Key",
"X-RapidAPI-Host": "API_Key"
}
balance_sheet_response = requests.get(url, headers=headers, params=querystring)
# Create Balance Sheet DataFrame
balance_sheet_df = pd.DataFrame.from_dict(balance_sheet_response.json())
# balance_sheet_df = balance_sheet_df.drop('ttm', axis = 1)
balance_sheet_df
9/30/2020 | 9/30/2021 | 9/30/2022 | |
---|---|---|---|
Common Stock Equity | 65339000 | 63090000 | 50672000 |
Invested Capital | 177775000 | 187809000 | 170741000 |
Net Debt | 74420000 | 89779000 | 96423000 |
Net Tangible Assets | 65339000 | 63090000 | 50672000 |
Ordinary Shares Number | 16976763 | 16426786 | 15943425 |
Share Issued | 16976763 | 16426786 | 15943425 |
Tangible Book Value | 65339000 | 63090000 | 50672000 |
Total Assets | 323888000 | 351002000 | 352755000 |
Total Capitalization | 164006000 | 172196000 | 149631000 |
Total Debt | 112436000 | 124719000 | 120069000 |
Total Equity Gross Minority Interest | 65339000 | 63090000 | 50672000 |
Total Liabilities Net Minority Interest | 258549000 | 287912000 | 302083000 |
Working Capital | 38321000 | 9355000 | -18577000 |
url = "https://stock-analysis.p.rapidapi.com/api/v1/resources/key-stats"
querystring = {"ticker":company_ticker}
headers = {
"X-RapidAPI-Key": "API_Key",
"X-RapidAPI-Host": "API_Key"
}
key_stats_response = requests.get(url, headers=headers, params=querystring)
# Create Key Statistics DataFrame
key_stats_df = pd.DataFrame.from_dict(key_stats_response.json())
key_stats_df = key_stats_df.transpose()
key_stats_df
Value | |
---|---|
% held by insiders | 0.07% |
% held by institutions | 61.32% |
200-day moving average | 167.12 |
5-year average dividend yield | 0.85 |
50-day moving average | 179.39 |
52-week change | 26.40% |
52-week high | 198.23 |
52-week low | 124.17 |
Avg vol (10-day) | 54.63M |
Avg vol (3-month) | 58.54M |
Beta (5Y monthly) | 1.31 |
Book value per share (mrq) | 3.85 |
Current ratio (mrq) | 0.98 |
Diluted EPS (ttm) | 5.96 |
Dividend date | 16 Aug 2023 |
EBITDA | 123.96B |
Enterprise value | 2.82T |
Enterprise value/EBITDA | 22.24 |
Enterprise value/revenue | 7.35 |
Ex-dividend date | 10 Aug 2023 |
Fiscal year ends | 23 Sept 2022 |
Float | 15.62B |
Forward P/E | 26.81 |
Forward annual dividend rate | 0.96 |
Forward annual dividend yield | 0.54% |
Gross profit (ttm) | 170.78B |
Implied shares outstanding | 15.63B |
Last split date | 30 Aug 2020 |
Last split factor | 4:1 |
Levered free cash flow (ttm) | 90.68B |
Market cap (intra-day) | 2.77T |
Most-recent quarter (mrq) | 30 Jun 2023 |
Net income avi to common (ttm) | 94.76B |
Operating cash flow (ttm) | 113.07B |
Operating margin (ttm) | 29.23% |
PEG Ratio (5 yr expected) | 2.27 |
Payout ratio | 15.60% |
Price/book (mrq) | 46.03 |
Price/sales (ttm) | 7.36 |
Profit margin | 24.68% |
Quarterly earnings growth (yoy) | 2.30% |
Quarterly revenue growth (yoy) | -1.40% |
Return on assets (ttm) | 20.90% |
Return on equity (ttm) | 160.09% |
Revenue (ttm) | 383.93B |
Revenue per share (ttm) | 24.22 |
S&P500 52-week change | 19.27% |
Shares outstanding | 15.63B |
Shares short (14 Sept 2023) | 107.33M |
Shares short (prior month 14 Aug 2023) | 88.85M |
Short % of float (14 Sept 2023) | 0.69% |
Short % of shares outstanding (14 Sept 2023) | 0.69% |
Short ratio (14 Sept 2023) | 1.72 |
Total cash (mrq) | 62.48B |
Total cash per share (mrq) | 4 |
Total debt (mrq) | 109.28B |
Total debt/equity (mrq) | 181.30% |
Trailing P/E | 29.78 |
Trailing annual dividend rate | 0.93 |
Trailing annual dividend yield | 0.53% |
2a. Estimating the Required Return on Equity
In order to calculate the Required Return on Equity, we will use the Capital Asset Pricing Model (CAPM) which is an equilibrium model that takes the risk-free rate, the stock’s equity beta, and the market risk premium as inputs.
\(Where:\)
\(r_e\) = required return on equity
\(r_f\) = risk-free rate
\(Beta\) = beta
\(MRP\) = market risk premium
Estimating the Risk-Free Rate
Government securities are assumed to be risk-free, at least from a credit standpoint. With this assumption, the appropriate rate to use in the CAPM is the government security having approximately the same duration as the asset being valued and sufficient liquidity so that the yield does not have an embedded liquidity risk premium. Equities are assumed to have a long duration, so a long-term government bond yield is an appropriate proxy for the risk-free rate.
In this model, the yield on the 10 Year U.S. Treasury Note will be used as the risk-free rate. We can scrape the current yield on the 10 Year U.S. Treasury Note from Yahoo Finance using the code below.
import yfinance as yf
import datetime
# Risk-free Rate
timespan = 100
current_date = datetime.date.today()
formatted_date = current_date.strftime('%Y-%m-%d')
past_date = current_date-datetime.timedelta(days=timespan)
formatted_past_date = past_date.strftime('%Y-%m-%d')
tk = yf.Ticker('^TNX')
risk_free_rate_df = tk.history(period='3mo')
risk_free_rate = (risk_free_rate_df.iloc[len(risk_free_rate_df)-1,3])/100
risk_free_rate
0.047839999198913574
Estimating the Stock’s Beta
A stock’s beta is the sensitivity of that stock’s return to the return of the market index.
# Stock's Beta
equity_beta = float(key_stats_df.loc[r'Beta (5Y monthly)'])
equity_beta
1.31
Estimating the Market Risk Premium
The market risk premium should be the expected return on the market index less the expected return (or yield) on the long-term government bond. For our purposes, we use the annual market risk premium provided by Aswath Damodaran, who is a professor at the Stern School of Business at New York University. Professor Damodaran teaches Corporate Finance and Equity Instruments & Markets. He provides a multitude of financial information and I encourage you to visit his website.
# Market Risk Premium
#Market Risk Premium = Return of market(5% most likely) - Free risk rate
market_risk_premium = (0.05-risk_free_rate)
market_risk_premium
0.0021600008010864286
Using the CAPM, we can now calculate the required return on equity for the company.
# Required Cost of Equity
coe = risk_free_rate + (equity_beta*market_risk_premium)
coe
0.0506696002483368
2b. Estimating the Required Return on Debt
Firms have a cost of debt, which is the interest rate a company pays on its debt, such as bonds and loans. From the lender’s perspective, this rate is the required return on debt.
After dividing Interest Expense by Total Debt to calculate the required rate of return on debt, we will multiply this rate by (1 - effective tax rate) as seen in the WACC formula in order to get the after-tax required return on debt. The reason for this is because there are tax deductions available on interest paid, which are often to the firm’s benefit. As a result, the net cost of a company’s debt is the amount of interest the firm is paying minus the amount it has saved in taxes because of its tax-deductible interest payments.
The code below gives a good approximation for the required rate of return on debt and the effective tax rate that will be used in the WACC calculation.
# Interest Expense
interest_expense = income_statement_df.loc['Interest Expense']
interest_expense_df = interest_expense.to_frame().transpose()
interest_expense_str = interest_expense_df.values[0][-1:]
interest_expense_int = int(interest_expense_str)
# Total Debt
total_debt = balance_sheet_df.loc['Total Debt']
total_debt_df = total_debt.to_frame().transpose()
total_debt_str = total_debt_df.values[0][-1:]
total_debt_int = int(total_debt_str)
# Required Cost of Debt
cod = interest_expense_int / total_debt_int
cod
0.024410963695874872
# Effective Tax Rate
effective_tax_rate = income_statement_df.loc['Tax Provision'].astype(int) \
/ income_statement_df.loc['Pretax Income'].astype(int)
avg_effective_tax_rate = sum(effective_tax_rate) / len(effective_tax_rate)
avg_effective_tax_rate
0.14644962419997865
2c. Estimating the Capital Structure
The final inputs for calculating WACC deal with the firm’s capital structure, which is a company’s mix of equity and debt. As previously noted, WACC is a blend of a company’s equity and debt cost of capital based on the company’s equity and debt capital ratio.
# Market Value of Equity
market_cap_str = key_stats_df.loc[r'Market cap (intra-day)'][0]
market_cap_lst = market_cap_str.split('.')
if market_cap_str[len(market_cap_str)-1] == 'T':
market_cap_length = len(market_cap_lst[1])-1
market_cap_lst[1] = market_cap_lst[1].replace('T',(9-market_cap_length)*'0')
market_cap_int = int(''.join(market_cap_lst))
if market_cap_str[len(market_cap_str)-1] == 'B':
market_cap_length = len(market_cap_lst[1])-1
market_cap_lst[1] = market_cap_lst[1].replace('B',(6-market_cap_length)*'0')
market_cap_int = int(''.join(market_cap_lst))
market_cap_int
2770000000
In most cases, you can use the book value of debt from a company’s latest balance sheet as an approximation for market value of debt. Unlike equity, the market value of debt usually does not deviate too far from the book value.
# Market Value of Debt
net_debt = balance_sheet_df.loc['Net Debt']
net_debt_df = net_debt.to_frame().transpose()
net_debt_str = net_debt_df.values[0][-1:]
net_debt_int = int(net_debt_str)
net_debt_int
96423000
The company value is the sum of its equity and debt market values.
# Enterprise Value
last_cf = cash_flow_df.loc['Free Cash Flow']
last_cf_df = last_cf.to_frame().transpose()
last_cf_str = last_cf_df.values[0][-1]
last_cf_int = int(last_cf_str)
last_equity = balance_sheet_df.loc['Total Equity Gross Minority Interest']
last_equity_df = last_equity.to_frame().transpose()
last_equity_str = last_equity_df.values[0][-1]
last_equity_int = int(last_equity_str)
enterprise_value = market_cap_int + net_debt_int - last_cf_int
enterprise_value
2754980000
We are now able to determine the equity and debt capital ratios by dividing both the market value of equity and the market value of debt by the company value.
With all the components acquired, we can calculate the firm’s WACC.
WACC = ((last_equity_int/(last_equity_int + net_debt_int)) * coe) \
+ ((net_debt_int/(last_equity_int + net_debt_int)) * (cod * (1-avg_effective_tax_rate)))
WACC
0.031113215140318208
3. Valuation
We need to discount all the forecasted cash flows to get the Firm Value. First, discount the forecasted FCFF for each of the next five years (Stage 1). Then, the present value of the terminal value of the firm using the forecasted FCFF in Year 6 is added to this amount (Stage 2).
\[Firm\ Value = \sum_{t=1}^n \frac{FCFF_t}{(1 + WACC)^t}+ \frac{FCFF_{n+1}}{(WACC - g)}* \frac{1}{(1 + WACC)^n}\]\(Where:\)
\(FCFF_t\) = expected free cash flow to the firm in year \(t\)
\(FCFF_{n+1}\) = expected free cash flow to the firm in the last year (Year 6 in this example)
\(g\) = constant expected growth rate in \(FCFF\)
\(WACC\) = weighted average cost of capital
As the resulting value gives us the Firm Value of the company (which is the value to both equity and debt holders), we need to deduct the company’s Market Value of Debt to arrive at the Equity Value of the firm.
Equity Value = Firm Value – Market Value of Debt
# Equity Value Calculation
discounted_FCFF_lst = []
for year in range(0,5):
discounted_FCFF = forecast_free_cash_flow_firm_df.iloc[0,year]/(1+WACC)**(year+1)
discounted_FCFF_lst.append(int(discounted_FCFF))
terminal_value = (forecast_free_cash_flow_firm_df.iloc[0,5]*(1+long_term_growth))/(WACC-long_term_growth)
PV_terminal_value = int(terminal_value/(1+WACC)**6)
firm_value = sum(discounted_FCFF_lst)+PV_terminal_value
equity_value = (firm_value - net_debt_int + last_cf_int)/100
equity_value
3407764791.1
We will use to calculate the two-stage FCFF valuation model’s stock price estimate for the firm.
# Total Shares Outstanding
shares_outstanding_str = key_stats_df.loc[r'Shares outstanding '][0]
shares_outstanding_lst = shares_outstanding_str.split('.')
if shares_outstanding_str[len(shares_outstanding_str)-1] == 'T':
shares_outstanding_length = len(shares_outstanding_lst[1])-1
shares_outstanding_lst[1] = shares_outstanding_lst[1].replace('T',(9-shares_outstanding_length)*'0')
shares_outstanding_int = int(''.join(shares_outstanding_lst))
if shares_outstanding_str[len(shares_outstanding_str)-1] == 'B':
shares_outstanding_length = len(shares_outstanding_lst[1])-1
shares_outstanding_lst[1] = shares_outstanding_lst[1].replace('B',(6-shares_outstanding_length)*'0')
shares_outstanding_int = int(''.join(shares_outstanding_lst))
shares_outstanding_int
15630000
# Two-stage FCFF Valuation Model Stock Price Estimate
stock_price = equity_value / shares_outstanding_int
stock_price = '${:,.2f}'.format(stock_price)
print("Model Stock Price = %s"%(stock_price))
# Actual Stock Price
actual_stock_price = market_cap_int / shares_outstanding_int
actual_stock_price = '${:,.2f}'.format(actual_stock_price)
print("Actual Stock Price = %s"%(actual_stock_price))
Model Stock Price = $218.03
Actual Stock Price = $177.22
4. Conclusion
As can be seen in this article, we were able to calculate Stock Valuation using FCFF and WACC. In the example above, the two-stage FCFF valuation model does a reasonably good job at estimating the fair value of a company’s stock price.
However, the model is very sensitive to the discount and growth rates selected. When applying this model, it is important to consider the type of growth the company is currently experiencing along with the anticipated growth characteristics for the future.
A single-stage FCFF valuation model is useful for stable firms in mature industries while two-stage and three-stage FCFF valuation models are useful when you want to model multiple phases of growth.