Fundamental Analysis

30 minbeginner

1. Fundamental Analysis

Introduction: The Foundation of Equity Valuation

Fundamental analysis is the cornerstone of equity valuation. It involves evaluating a company's intrinsic value by examining its financial statements, business model, competitive position, management quality, and industry dynamics. Unlike technical analysis, which focuses on price patterns and market sentiment, fundamental analysis seeks to understand the underlying business and determine whether a stock is undervalued or overvalued relative to its true worth.

Fundamental Analysis: A method of evaluating securities by attempting to measure the intrinsic value of a stock. It involves examining related economic, financial, and other qualitative and quantitative factors to determine a security's value. Fundamental analysis assumes that the market may misprice a security in the short run but will eventually correct itself to reflect the security's intrinsic value.

The fundamental analyst's goal is to determine the intrinsic value of a stock - the price that reflects all available information about the company's future cash flows, growth prospects, and risk profile. If the intrinsic value exceeds the current market price, the stock is undervalued and may represent a buying opportunity. If the intrinsic value is less than the market price, the stock is overvalued.

Theoretical Foundation: The Dividend Discount Model and DCF Framework

The theoretical foundation for fundamental analysis rests on the principle that a stock's value equals the present value of its future cash flows. This principle, formalized in the Dividend Discount Model (DDM) and Discounted Cash Flow (DCF) models, provides the conceptual framework that all fundamental analysis ultimately supports.

The fundamental equation of valuation states:

V0=∑t=1∞CFt(1+r)tV_0 = \sum_{t=1}^{\infty} \frac{CF_t}{(1 + r)^t}

Where:

  • V0V_0=Intrinsicvaluetoday−= Intrinsic value today -CFtCF_t=Cashflowattime= Cash flow at timet$t\text{\$}r=CF11+k+CF2(1+k)2+⋯+CFn(1+k)nr = \frac{CF_1}{1+k} + \frac{CF_2}{(1+k)^2} + \cdots + \frac{CF_n}{(1+k)^n}5million−TaxExpense:5 million - Tax Expense:6 million (20% tax rate)
  • Net Income: $19 million (19% net margin)
  • Shares Outstanding: 10 million
  • EPS: $1.90

Key Observations:

  • Strong gross margin (60%) suggests pricing power
  • Operating margin (30%) indicates efficient operations
  • Net margin (19%) shows good profitability after all costs

Understanding the Balance Sheet

The balance sheet provides a snapshot of a company's financial position at a point in time. It follows the fundamental accounting equation:

Assets=Liabilities+Shareholders’ Equity\text{Assets} = \text{Liabilities} + \text{Shareholders' Equity}

Assets (what the company owns):

  • Current Assets: Cash, accounts receivable, inventory (convertible to cash within 1 year)
  • Non-Current Assets: Property, plant, equipment (PP&E), intangible assets, long-term investments

Liabilities (what the company owes):

  • Current Liabilities: Accounts payable, short-term debt (due within 1 year)
  • Non-Current Liabilities: Long-term debt, deferred taxes

Shareholders' Equity (what shareholders own):

  • Common Stock: Par value of issued shares
  • Retained Earnings: Cumulative profits not paid as dividends
  • Additional Paid-In Capital: Amount paid above par value

Key Metrics from Balance Sheet:

  • Working Capital: Current Assets - Current Liabilities
  • Book Value: Total Assets - Total Liabilities = Shareholders' Equity
  • Book Value Per Share: Shareholders' Equity ÷ Shares Outstanding

Understanding the Cash Flow Statement

The cash flow statement shows how cash enters and leaves the company. It has three sections:

Operating Activities: Cash from core business operations

  • Net income (starting point)
  • Adjustments for non-cash items (depreciation, amortization)
  • Changes in working capital
  • Operating Cash Flow: Net cash from operations

Investing Activities: Cash from buying/selling assets

  • Capital expenditures (negative - cash out)
  • Asset sales (positive - cash in)
  • Acquisitions
  • Cash from Investing: Net cash from investment activities

Financing Activities: Cash from borrowing, equity issuance, dividends

  • Debt issuance/repayment
  • Stock issuance/repurchase
  • Dividends paid
  • Cash from Financing: Net cash from financing activities

Free Cash Flow: The most important metric for valuation

Free Cash Flow=Operating Cash Flow−Capital Expenditures\text{Free Cash Flow} = \text{Operating Cash Flow} - \text{Capital Expenditures}

Free cash flow represents cash available to shareholders after all operating expenses and necessary investments. It's the cash flow used in DCF valuation models.

Ratio Analysis: The Analytical Toolkit

Profitability Ratios

Gross Margin:

Gross Margin=Gross ProfitRevenue=Revenue−COGSRevenue\text{Gross Margin} = \frac{\text{Gross Profit}}{\text{Revenue}} = \frac{\text{Revenue} - \text{COGS}}{\text{Revenue}}

Measures pricing power and cost control. Higher gross margins indicate stronger competitive position.

Operating Margin:

Operating Margin=Operating IncomeRevenue\text{Operating Margin} = \frac{\text{Operating Income}}{\text{Revenue}}

Measures operating efficiency. Higher margins indicate better cost management.

Net Margin:

Net Margin=Net IncomeRevenue\text{Net Margin} = \frac{\text{Net Income}}{\text{Revenue}}

Measures overall profitability. Shows how much profit remains after all expenses.

Return on Assets (ROA):

ROA=Net IncomeTotal Assets\text{ROA} = \frac{\text{Net Income}}{\text{Total Assets}}

Measures efficiency in using assets to generate profits. Higher ROA indicates better asset utilization.

Return on Equity (ROE):

ROE=Net IncomeShareholders’ Equity\text{ROE} = \frac{\text{Net Income}}{\text{Shareholders' Equity}}

Measures return on shareholders' investment. Can be decomposed using the DuPont formula:

ROE=Net Margin×Asset Turnover×Equity Multiplier\text{ROE} = \text{Net Margin} \times \text{Asset Turnover} \times \text{Equity Multiplier}

Where:

  • Net Margin = Net Income ÷ Revenue
  • Asset Turnover = Revenue ÷ Total Assets
  • Equity Multiplier = Total Assets ÷ Shareholders' Equity

The DuPont formula shows that ROE is driven by three factors: profitability (net margin), efficiency (asset turnover), and leverage (equity multiplier). This decomposition helps identify whether a company's ROE comes from operational excellence, efficient asset use, or financial leverage. Let's visualize the DuPont analysis:

Python exercise

#| label: dupont-analysis-enhanced
#| fig-cap: "DuPont Analysis: Enhanced Visualization showing ROE = Net Margin × Asset Turnover × Equity Multiplier decomposition"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Example companies for DuPont analysis
companies = ['Company A\n(High Profitability)', 'Company B\n(High Efficiency)', 
             'Company C\n(High Leverage)', 'Company D\n(Balanced)']

# Financial data
net_incomes = [50, 30, 20, 40]  # Millions
revenues = [500, 600, 200, 400]  # Millions
total_assets = [1000, 500, 800, 600]  # Millions
shareholders_equity = [500, 400, 200, 300]  # Millions

# Calculate DuPont components
net_margins = [ni / rev for ni, rev in zip(net_incomes, revenues)]
asset_turnovers = [rev / ta for rev, ta in zip(revenues, total_assets)]
equity_multipliers = [ta / se for ta, se in zip(total_assets, shareholders_equity)]
roes = [nm * at * em for nm, at, em in zip(net_margins, asset_turnovers, equity_multipliers)]

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('DuPont Analysis: ROE = Net Margin × Asset Turnover × Equity Multiplier', 
            fontsize=16, fontweight='bold')

# Plot 1: ROE Components
ax1 = axes[0, 0]
x = np.arange(len(companies))
width = 0.2

bars1 = ax1.bar(x - 1.5*width, [nm * 100 for nm in net_margins], width,
               label='Net Margin (%)', color='blue', alpha=0.7, edgecolor='black', linewidth=1.5)
bars2 = ax1.bar(x - 0.5*width, asset_turnovers, width,
               label='Asset Turnover', color='green', alpha=0.7, edgecolor='black', linewidth=1.5)
bars3 = ax1.bar(x + 0.5*width, equity_multipliers, width,
               label='Equity Multiplier', color='orange', alpha=0.7, edgecolor='black', linewidth=1.5)
bars4 = ax1.bar(x + 1.5*width, [roe * 100 for roe in roes], width,
               label='ROE (%)', color='red', alpha=0.7, edgecolor='black', linewidth=1.5)

ax1.set_xlabel('Company', fontsize=12, fontweight='bold')
ax1.set_ylabel('Value', fontsize=12, fontweight='bold')
ax1.set_title('DuPont Components: Net Margin, Asset Turnover, Equity Multiplier, and ROE', 
             fontsize=13, fontweight='bold')
ax1.set_xticks(x)
ax1.set_xticklabels(companies)
ax1.legend(loc='best', fontsize=9)
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bars, values, scale in [(bars1, net_margins, 100), (bars2, asset_turnovers, 1), 
                            (bars3, equity_multipliers, 1), (bars4, roes, 100)]:
    for bar, val in zip(bars, values):
        height = bar.get_height()
        ax1.text(bar.get_x() + bar.get_width()/2., height + height*0.02,
                f'{val*scale:.2f}', ha='center', va='bottom',
                fontsize=8, fontweight='bold')

# Plot 2: DuPont Decomposition Visualization
ax2 = axes[0, 1]
# Show how components multiply to get ROE
colors_comp = ['blue', 'green', 'orange', 'red']
component_names = ['Net Margin', 'Asset Turnover', 'Equity Multiplier', 'ROE']

# Use Company D as example
example_idx = 3
example_components = [net_margins[example_idx], asset_turnovers[example_idx], 
                     equity_multipliers[example_idx], roes[example_idx]]
example_values = [example_components[0] * 100, example_components[1], 
                 example_components[2], example_components[3] * 100]

bars = ax2.bar(range(len(component_names)), example_values, 
               color=colors_comp, alpha=0.7, edgecolor='black', linewidth=1.5)
ax2.set_xlabel('Component', fontsize=12, fontweight='bold')
ax2.set_ylabel('Value', fontsize=12, fontweight='bold')
ax2.set_title(f'DuPont Decomposition Example (Company D)\nROE = {net_margins[example_idx]:.2%} × {asset_turnovers[example_idx]:.2f} × {equity_multipliers[example_idx]:.2f} = {roes[example_idx]:.2%}', 
             fontsize=13, fontweight='bold')
ax2.set_xticks(range(len(component_names)))
ax2.set_xticklabels(component_names, rotation=15, ha='right')
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, val, comp in zip(bars, example_values, component_names):
    height = bar.get_height()
    if comp == 'Net Margin' or comp == 'ROE':
        label = f'{val:.2f}%'
    else:
        label = f'{val:.2f}'
    ax2.text(bar.get_x() + bar.get_width()/2., height + height*0.02,
            label, ha='center', va='bottom',
            fontsize=10, fontweight='bold')

# Add formula annotation
ax2.text(0.02, 0.98, f'Formula:\nROE = Net Margin × Asset Turnover × Equity Multiplier\n\nCalculation:\n= {net_margins[example_idx]:.2%} × {asset_turnovers[example_idx]:.2f} × {equity_multipliers[example_idx]:.2f}\n= {roes[example_idx]:.2%}',
        transform=ax2.transAxes, fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.9),
        verticalalignment='top', family='monospace')

# Plot 3: ROE Comparison
ax3 = axes[1, 0]
bars = ax3.bar(range(len(companies)), [roe * 100 for roe in roes],
               color=plt.cm.RdYlGn(np.array(roes) / max(roes)), 
               alpha=0.7, edgecolor='black', linewidth=1.5)
ax3.set_xlabel('Company', fontsize=12, fontweight='bold')
ax3.set_ylabel('ROE (%)', fontsize=12, fontweight='bold')
ax3.set_title('ROE Comparison Across Companies', fontsize=13, fontweight='bold')
ax3.set_xticks(range(len(companies)))
ax3.set_xticklabels(companies, rotation=15, ha='right')
ax3.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, roe in zip(bars, roes):
    height = bar.get_height()
    ax3.text(bar.get_x() + bar.get_width()/2., height + 0.5,
            f'{roe*100:.2f}%', ha='center', va='bottom',
            fontsize=10, fontweight='bold')

# Plot 4: Component Contribution Analysis
ax4 = axes[1, 1]
# Show contribution of each component to ROE
component_contributions = []
for i in range(len(companies)):
    contrib = {
        'Net Margin': net_margins[i] * 100,
        'Asset Turnover': asset_turnovers[i],
        'Equity Multiplier': equity_multipliers[i]
    }
    component_contributions.append(contrib)

# Create grouped bar chart
x = np.arange(len(companies))
width = 0.25

bars1 = ax4.bar(x - width, [nm * 100 for nm in net_margins], width,
               label='Net Margin (%)', color='blue', alpha=0.7, edgecolor='black', linewidth=1.5)
bars2 = ax4.bar(x, asset_turnovers, width,
               label='Asset Turnover', color='green', alpha=0.7, edgecolor='black', linewidth=1.5)
bars3 = ax4.bar(x + width, equity_multipliers, width,
               label='Equity Multiplier', color='orange', alpha=0.7, edgecolor='black', linewidth=1.5)

ax4.set_xlabel('Company', fontsize=12, fontweight='bold')
ax4.set_ylabel('Component Value', fontsize=12, fontweight='bold')
ax4.set_title('DuPont Component Comparison: Driving ROE', fontsize=13, fontweight='bold')
ax4.set_xticks(x)
ax4.set_xticklabels(companies, rotation=15, ha='right')
ax4.legend(loc='best', fontsize=9)
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bars, values, scale in [(bars1, net_margins, 100), (bars2, asset_turnovers, 1), 
                            (bars3, equity_multipliers, 1)]:
    for bar, val in zip(bars, values):
        height = bar.get_height()
        ax4.text(bar.get_x() + bar.get_width()/2., height + height*0.02,
                f'{val*scale:.2f}', ha='center', va='bottom',
                fontsize=8, fontweight='bold')

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **DuPont Analysis**")
print(f"{'='*70}")
print(f"Formula: ROE = Net Margin × Asset Turnover × Equity Multiplier")
print(f"  where Net Margin = Net Income / Revenue")
print(f"        Asset Turnover = Revenue / Total Assets")
print(f"        Equity Multiplier = Total Assets / Shareholders' Equity")
print(f"{'='*70}")
print(f"Company Analysis:")
print(f"{'Company':<25} {'Net Margin':<15} {'Asset Turnover':<18} {'Equity Mult':<15} {'ROE':<10}")
print(f"{'-'*70}")
for i, (comp, nm, at, em, roe) in enumerate(zip(companies, net_margins, asset_turnovers, equity_multipliers, roes)):
    print(f"{comp.replace(chr(10), ' '):<25} {nm*100:>12.2f}%   {at:>15.2f}           {em:>12.2f}      {roe*100:>8.2f}%")
print(f"{'='*70}")
print(f"Key Insights:")
print(f"  • Company A: High profitability drives ROE")
print(f"  • Company B: High efficiency (asset turnover) drives ROE")
print(f"  • Company C: High leverage (equity multiplier) drives ROE")
print(f"  • Company D: Balanced approach across all components")
print(f"{'='*70}")
print(f"✅ DuPont analysis reveals how companies achieve their ROE")
print(f"✅ Different strategies (profitability, efficiency, leverage) can yield same ROE")
print(f"✅ Understanding components helps identify improvement opportunities")

Return on Invested Capital (ROIC):

ROIC=Net Operating Profit After Tax (NOPAT)Invested Capital\text{ROIC} = \frac{\text{Net Operating Profit After Tax (NOPAT)}}{\text{Invested Capital}}

Where:

  • NOPAT = EBIT × (1 - Tax Rate)
  • Invested Capital = Total Assets - Non-Interest-Bearing Current Liabilities

ROIC measures return on capital invested in the business, regardless of financing structure.

Liquidity Ratios

Current Ratio:

Current Ratio=Current AssetsCurrent Liabilities\text{Current Ratio} = \frac{\text{Current Assets}}{\text{Current Liabilities}}

Measures ability to meet short-term obligations. Ratio > 1 indicates sufficient liquidity.

Quick Ratio (Acid Test):

Quick Ratio=Current Assets−InventoryCurrent Liabilities\text{Quick Ratio} = \frac{\text{Current Assets} - \text{Inventory}}{\text{Current Liabilities}}

More conservative than current ratio (excludes inventory, which may not be liquid).

Leverage Ratios

Debt-to-Equity Ratio:

Debt/Equity=Total DebtShareholders’ Equity\text{Debt/Equity} = \frac{\text{Total Debt}}{\text{Shareholders' Equity}}

Measures financial leverage. Higher ratios indicate more debt financing.

Interest Coverage Ratio:

Interest Coverage=EBITInterest Expense\text{Interest Coverage} = \frac{\text{EBIT}}{\text{Interest Expense}}

Measures ability to service debt. Higher ratios indicate better debt service capacity.

Efficiency Ratios

Asset Turnover:

Asset Turnover=RevenueTotal Assets\text{Asset Turnover} = \frac{\text{Revenue}}{\text{Total Assets}}

Measures efficiency in using assets to generate revenue. Higher turnover indicates better asset utilization.

Inventory Turnover:

Inventory Turnover=COGSAverage Inventory\text{Inventory Turnover} = \frac{\text{COGS}}{\text{Average Inventory}}

Measures how quickly inventory is sold. Higher turnover indicates efficient inventory management.

Qualitative Analysis: Beyond the Numbers

While financial statements provide quantitative data, fundamental analysis requires understanding qualitative factors that affect a company's competitive position and future prospects.

Business Model Analysis

Revenue Model: How does the company generate revenue?

  • Subscription: Recurring revenue (e.g., SaaS companies)
  • Transaction-based: Revenue per transaction (e.g., retailers)
  • Advertising: Revenue from advertising (e.g., social media)
  • Licensing: Revenue from intellectual property (e.g., software)

Cost Structure: What are the company's cost drivers?

  • Fixed vs. Variable Costs: Companies with high fixed costs have operating leverage
  • Economies of Scale: Do costs decrease as volume increases?
  • Cost Advantages: Does the company have lower costs than competitors?

Competitive Analysis

Competitive Moat: What protects the company from competition?

  • Brand: Strong brand loyalty (e.g., Coca-Cola)
  • Network Effects: Value increases with users (e.g., Facebook)
  • Cost Advantages: Lower costs than competitors (e.g., Walmart)
  • Regulatory Barriers: Protected by regulations (e.g., utilities)
  • Switching Costs: High cost to switch products (e.g., enterprise software)

Market Position: What is the company's position in its industry?

  • Market Share: What percentage of the market does it serve?
  • Market Leadership: Is it a leader or follower?
  • Growth vs. Value: Is it growing or mature?

Management Quality

Management Assessment: Are executives capable and aligned with shareholders?

  • Track Record: Historical performance
  • Capital Allocation: How management uses capital
  • Communication: Transparency and clarity
  • Compensation: Alignment with shareholder interests

Corporate Governance: How is the company governed?

  • Board Independence: Independent directors
  • Shareholder Rights: Protection of minority shareholders
  • Ethical Standards: Corporate ethics and responsibility

Industry and Macro Analysis

Industry Analysis: What is the industry's structure and prospects?

  • Industry Lifecycle: Growth, mature, or decline?
  • Competitive Intensity: How competitive is the industry?
  • Regulatory Environment: How do regulations affect the industry?
  • Technology Disruption: Risk of technological disruption

Macroeconomic Factors: How sensitive is the company to economic cycles?

  • Cyclical vs. Defensive: Does performance vary with economic cycles?
  • Interest Rate Sensitivity: How do interest rates affect the business?
  • Inflation Impact: How does inflation affect costs and pricing?

The Fundamental Analysis Process

A systematic approach to fundamental analysis involves several steps that build upon each other to form a comprehensive investment thesis. While experienced analysts may combine or skip steps based on the specific situation, following a structured process ensures that you don't miss critical information and helps you form a well-reasoned investment conclusion.

Step 1: Company Overview

The first step is to understand what the company does and how it operates. This involves understanding the business model - how does the company make money? What products or services does it sell, and to whom? Identifying revenue sources helps you assess the diversity and sustainability of the business. Understanding the competitive position - where the company stands in its industry - provides context for interpreting financial results. This qualitative overview sets the foundation for all subsequent analysis.

Step 2: Financial Statement Analysis

The second step involves a thorough review of the financial statements. You should review the income statement, balance sheet, and cash flow statement to understand the company's profitability, financial position, and cash generation. Calculating key financial ratios transforms raw numbers into comparable metrics. Identifying trends over time - looking at multiple periods rather than just the most recent - helps you understand whether the company is improving, deteriorating, or stable. This quantitative analysis provides the factual foundation for your investment thesis.

Step 3: Competitive Analysis

The third step compares the company to its industry peers. Comparing ratios to industry peers helps you understand whether the company's performance is strong or weak relative to competitors. This analysis might reveal that a company with a 15% ROE is actually excellent if peers average 10%, or poor if peers average 25%. Assessing competitive position involves understanding market share, pricing power, and competitive advantages or disadvantages. This comparative analysis helps you understand whether the company's valuation is justified or whether it might be mispriced relative to peers.

Step 4: Management Assessment

The fourth step evaluates the people running the company. Evaluating management quality involves assessing their track record, capital allocation decisions, and communication with shareholders. Assessing corporate governance examines board independence, shareholder rights, and ethical standards. Reviewing strategic direction helps you understand management's plans for the future and whether those plans are reasonable and achievable. This assessment is crucial because even the best business can be destroyed by poor management, while excellent management can create value in difficult situations.

Step 5: Valuation

The fifth step estimates the company's intrinsic value. This involves estimating future cash flows - projecting how much cash the company will generate in the future. Determining the appropriate discount rate reflects the risk of those cash flows - riskier companies require higher returns. Calculating intrinsic value uses valuation models (DCF, DDM, multiples) to estimate what the company is worth. Comparing to market price determines whether the stock is undervalued (market price < intrinsic value) or overvalued (market price > intrinsic value). This valuation step is the core of fundamental analysis - it's where you determine whether an investment opportunity exists.

Step 6: Investment Decision

The final step synthesizes all the analysis into an investment decision. This involves asking: Is the stock undervalued or overvalued? If it's undervalued, by how much? What is the margin of safety? - how much room for error do you have if your analysis is wrong? What are the risks? - what could go wrong that would make this investment lose money? Does it fit the investment strategy? - does this stock align with your investment objectives, risk tolerance, and portfolio construction? This final step requires judgment - there's no formula that tells you definitively whether to buy or sell, but a thorough fundamental analysis provides the information needed to make an informed decision.

Knowledge Check 6.1

Which of the following is NOT a component of fundamental analysis?

A. Financial statement analysis
B. Ratio analysis
C. Price chart patterns
D. Qualitative business analysis

Click to reveal answer

C. Price chart patterns

Price chart patterns are part of technical analysis, not fundamental analysis. Fundamental analysis focuses on:

  • Financial statement analysis (quantitative)
  • Ratio analysis (quantitative)
  • Qualitative business analysis (qualitative factors like business model, management, competitive position)

Technical analysis, in contrast, focuses on price patterns, trends, and market sentiment rather than underlying business fundamentals.

Practice Problem 6.1: Financial Statement Analysis

Company XYZ has the following financial information for 2023:

Income Statement:

  • Revenue: 80million−OperatingExpenses:80 million - Operating Expenses:50pershare−Earningspershare(EPS):50 per share - Earnings per share (EPS):5billion−Netincome:$250million∗∗Method1:∗∗P/E=$50÷$2.50=∗∗20.0x∗∗∗∗Method2:∗∗P/E=5 billion - Net income: \text{\$}250 million **Method 1:** P/E = \text{\$}50 ÷ \text{\$}2.50 = **20.0x** **Method 2:** P/E =5 billion ÷ $250 million = 20.0x

Both methods yield the same result: investors are paying 20 times the company's annual earnings.

Let's visualize the P/E ratio formula with enhanced examples:

Python exercise

#| label: pe-ratio-formula-enhanced
#| fig-cap: "P/E Ratio Formula: Enhanced Visualization showing P/E = Price / EPS with Multiple Examples and Interpretation"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Example companies
companies = ['Growth Stock\n(High P/E)', 'Value Stock\n(Moderate P/E)', 
             'Cheap Stock\n(Low P/E)', 'Company DEF\n(Example)']
prices = [60, 30, 16, 50]
eps_values = [2.00, 2.00, 2.00, 2.50]
pe_ratios = [p / e for p, e in zip(prices, eps_values)]

# Market cap basis (for comparison)
market_caps = [6.0, 3.0, 1.6, 5.0]  # Billions
net_incomes = [0.2, 0.2, 0.2, 0.25]  # Billions
pe_ratios_mcap = [mc / ni for mc, ni in zip(market_caps, net_incomes)]

# P/E interpretation
pe_categories = ['Very Low\n(<10x)', 'Low\n(10-15x)', 'Moderate\n(15-20x)', 
                 'High\n(20-30x)', 'Very High\n(>30x)']
pe_ranges = [8, 12.5, 17.5, 25, 35]
pe_colors = ['green', 'lightgreen', 'yellow', 'orange', 'red']

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('P/E Ratio Formula: P/E = Price / EPS - Enhanced Visualization', 
            fontsize=16, fontweight='bold')

# Plot 1: P/E Components
ax1 = axes[0, 0]
x = np.arange(len(companies))
width = 0.35

bars1 = ax1.bar(x - width/2, prices, width, label='Stock Price ($)', color='blue', alpha=0.7, 
                edgecolor='black', linewidth=1.5)
bars2 = ax1.bar(x + width/2, eps_values, width, label='EPS ($)', color='green', alpha=0.7, 
                edgecolor='black', linewidth=1.5)

ax1.set_xlabel('Company', fontsize=12, fontweight='bold')
ax1.set_ylabel('Amount ($)', fontsize=12, fontweight='bold')
ax1.set_title('P/E Ratio Components: Price and Earnings Per Share', fontsize=13, fontweight='bold')
ax1.set_xticks(x)
ax1.set_xticklabels(companies, rotation=15, ha='right')
ax1.legend(loc='best', fontsize=9)
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add P/E values on top
for i, (price, eps, pe) in enumerate(zip(prices, eps_values, pe_ratios)):
    max_val = max(price, eps)
    ax1.text(i, max_val + max_val*0.1, f'P/E = {pe:.1f}x\n({price}/{eps})', 
            ha='center', fontsize=9, fontweight='bold', 
            bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.8))

# Add formula annotation
ax1.text(0.02, 0.98, 'Formula:\nP/E = Price / EPS\n\nExample (Company DEF):\nP/E = $50 / $2.50\n= 20.0x',
        transform=ax1.transAxes, fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.9),
        verticalalignment='top', family='monospace')

# Plot 2: P/E Ratio Comparison
ax2 = axes[0, 1]
bars = ax2.bar(range(len(companies)), pe_ratios,
               color=plt.cm.RdYlGn(np.array(pe_ratios) / max(pe_ratios)), 
               alpha=0.7, edgecolor='black', linewidth=1.5)
ax2.set_xlabel('Company', fontsize=12, fontweight='bold')
ax2.set_ylabel('P/E Ratio (x)', fontsize=12, fontweight='bold')
ax2.set_title('P/E Ratio Comparison Across Companies', fontsize=13, fontweight='bold')
ax2.set_xticks(range(len(companies)))
ax2.set_xticklabels(companies, rotation=15, ha='right')
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, pe in zip(bars, pe_ratios):
    height = bar.get_height()
    ax2.text(bar.get_x() + bar.get_width()/2., height + 1,
            f'{pe:.1f}x', ha='center', va='bottom',
            fontsize=10, fontweight='bold')

# Add interpretation zones
ax2.axhline(y=10, color='green', linestyle='--', linewidth=1.5, alpha=0.5, label='Low (10x)')
ax2.axhline(y=20, color='orange', linestyle='--', linewidth=1.5, alpha=0.5, label='Moderate (20x)')
ax2.axhline(y=30, color='red', linestyle='--', linewidth=1.5, alpha=0.5, label='High (30x)')
ax2.legend(loc='best', fontsize=9)

# Plot 3: P/E Interpretation Zones
ax3 = axes[1, 0]
bars = ax3.barh(range(len(pe_categories)), pe_ranges,
               color=pe_colors, alpha=0.7, edgecolor='black', linewidth=1.5)
ax3.set_xlabel('P/E Ratio (x)', fontsize=12, fontweight='bold')
ax3.set_ylabel('Category', fontsize=12, fontweight='bold')
ax3.set_title('P/E Ratio Interpretation Zones', fontsize=13, fontweight='bold')
ax3.set_yticks(range(len(pe_categories)))
ax3.set_yticklabels(pe_categories)
ax3.grid(True, alpha=0.3, linestyle='--', axis='x')

# Add value labels
for bar, pe_range in zip(bars, pe_ranges):
    width = bar.get_width()
    ax3.text(width + 1, bar.get_y() + bar.get_height()/2,
            f'{pe_range}x', fontsize=10, fontweight='bold', va='center')

# Mark where our examples fall
for i, pe in enumerate(pe_ratios[:3]):
    if 0 <= pe <= 40:
        # Find category
        if pe < 10:
            cat_idx = 0
        elif pe < 15:
            cat_idx = 1
        elif pe < 20:
            cat_idx = 2
        elif pe < 30:
            cat_idx = 3
        else:
            cat_idx = 4
        ax3.plot(pe, cat_idx, 'ro', markersize=12, zorder=5)
        ax3.annotate(f'{companies[i].split()[0]}\n{pe:.1f}x', 
                    xy=(pe, cat_idx), xytext=(pe + 2, cat_idx + 0.3),
                    fontsize=9, fontweight='bold',
                    bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.8),
                    arrowprops=dict(arrowstyle='->', color='red', lw=1.5))

# Plot 4: Market Cap vs Price Basis (Method Comparison)
ax4 = axes[1, 1]
x = np.arange(len(companies))
width = 0.35

bars1 = ax4.bar(x - width/2, pe_ratios, width,
               label='Method 1: Price/EPS', color='blue', alpha=0.7, edgecolor='black', linewidth=1.5)
bars2 = ax4.bar(x + width/2, pe_ratios_mcap, width,
               label='Method 2: Market Cap/Net Income', color='green', alpha=0.7, 
               edgecolor='black', linewidth=1.5)

ax4.set_xlabel('Company', fontsize=12, fontweight='bold')
ax4.set_ylabel('P/E Ratio (x)', fontsize=12, fontweight='bold')
ax4.set_title('P/E Calculation: Two Equivalent Methods', fontsize=13, fontweight='bold')
ax4.set_xticks(x)
ax4.set_xticklabels(companies, rotation=15, ha='right')
ax4.legend(loc='best', fontsize=9)
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bars, pes in [(bars1, pe_ratios), (bars2, pe_ratios_mcap)]:
    for bar, pe in zip(bars, pes):
        height = bar.get_height()
        ax4.text(bar.get_x() + bar.get_width()/2., height + 0.5,
                f'{pe:.1f}x', ha='center', va='bottom',
                fontsize=9, fontweight='bold')

# Add annotation showing equivalence
ax4.text(0.5, 0.98, 'Both methods yield same result:\nP/E = Price/EPS = Market Cap/Net Income',
        transform=ax4.transAxes, ha='center', va='top',
        fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightgreen', alpha=0.9))

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **P/E Ratio Formula Analysis**")
print(f"{'='*70}")
print(f"Formula: P/E = Price / EPS")
print(f"  Alternative: P/E = Market Cap / Net Income")
print(f"  where Price = stock price per share")
print(f"        EPS = earnings per share")
print(f"{'='*70}")
print(f"Example Companies:")
print(f"{'Company':<25} {'Price':<12} {'EPS':<12} {'P/E Ratio':<12}")
print(f"{'-'*70}")
for i, (comp, price, eps, pe) in enumerate(zip(companies, prices, eps_values, pe_ratios)):
    print(f"{comp.replace(chr(10), ' '):<25} ${price:>8.2f}   ${eps:>8.2f}   {pe:>10.1f}x")
print(f"{'='*70}")
print(f"Interpretation:")
print(f"  • P/E = 30x: Paying $30 for $1 of earnings (high expectations)")
print(f"  • P/E = 15x: Paying $15 for $1 of earnings (moderate)")
print(f"  • P/E = 8x:  Paying $8 for $1 of earnings (low expectations)")
print(f"{'='*70}")
print(f"✅ P/E shows how many years of earnings to recover stock price")
print(f"✅ Higher P/E = higher growth expectations or lower risk")
print(f"✅ Lower P/E = lower growth expectations or higher risk")

Python exercise

#| label: fig-pe-ratio-visualization
#| fig-cap: "P/E Ratio: Understanding Price Relative to Earnings"
#| fig-width: 14
#| fig-height: 8

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import matplotlib.pyplot as plt
from IPython.display import display
import numpy as np

# Create figure
fig, axes = plt.subplots(1, 2, figsize=(16, 8))
fig.suptitle('Price-to-Earnings (P/E) Ratio: How Many Years of Earnings to Recover Stock Price', fontsize=16, fontweight='bold')

# Left plot: P/E ratio calculation breakdown
ax1 = axes[0]

# Example companies with different P/E ratios
companies = ['Growth Stock\n(P/E = 30x)', 'Value Stock\n(P/E = 15x)', 'Cheap Stock\n(P/E = 8x)']
prices = [60, 30, 16]
eps_values = [2.00, 2.00, 2.00]
pe_ratios = [p/e for p, e in zip(prices, eps_values)]

# Create grouped bar chart
x = np.arange(len(companies))
width = 0.35

bars1 = ax1.bar(x - width/2, prices, width, label='Stock Price ($)', color='#2E86AB', alpha=0.8)
bars2 = ax1.bar(x + width/2, eps_values, width, label='Earnings Per Share ($)', color='#A23B72', alpha=0.8)

ax1.set_xlabel('Stock', fontsize=12, fontweight='bold')
ax1.set_ylabel('Amount ($)', fontsize=12, fontweight='bold')
ax1.set_title('P/E Ratio Components: Price vs. Earnings', fontsize=13, fontweight='bold')
ax1.set_xticks(x)
ax1.set_xticklabels(companies)
ax1.legend(fontsize=10)
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add P/E ratio labels
for i, (price, eps, pe) in enumerate(zip(prices, eps_values, pe_ratios)):
    ax1.text(i, max(price, eps) + 3, f'P/E = {pe:.0f}x\n({pe:.0f} years)', 
             ha='center', fontsize=9, fontweight='bold',
             bbox=dict(boxstyle='round', facecolor='wheat', alpha=0.7))

# Right plot: P/E ratio categories and interpretation
ax2 = axes[1]

# P/E ratio ranges
pe_categories = ['Very High\n(30x+)', 'High\n(20-30x)', 'Moderate\n(15-20x)', 'Low\n(10-15x)', 'Very Low\n(<10x)']
pe_midpoints = [35, 25, 17.5, 12.5, 8]
colors_pe = ['#FF6B6B', '#FFA07A', '#4ECDC4', '#96CEB4', '#45B7D1']

bars = ax2.barh(pe_categories, pe_midpoints, color=colors_pe, alpha=0.8, edgecolor='black', linewidth=1.5)
ax2.set_xlabel('P/E Ratio (x)', fontsize=12, fontweight='bold')
ax2.set_title('P/E Ratio Categories and Typical Interpretation', fontsize=13, fontweight='bold')
ax2.grid(True, alpha=0.3, linestyle='--', axis='x')
ax2.set_xlim(0, 40)

# Add value labels and interpretations
for bar, val in zip(bars, pe_midpoints):
    width = bar.get_width()
    ax2.text(width + 1, bar.get_y() + bar.get_height()/2,
             f'{val:.1f}x', fontsize=10, fontweight='bold', va='center')

# Add interpretation annotations
interpretations = ['Growth\nExpected', 'Growth\nPremium', 'Fair\nValue', 'Value\nStock', 'Deep\nValue']
for i, (bar, interp) in enumerate(zip(bars, interpretations)):
    ax2.text(-5, bar.get_y() + bar.get_height()/2,
             interp, fontsize=9, fontweight='bold', va='center', ha='right',
             bbox=dict(boxstyle='round', facecolor='white', alpha=0.7))

# Add formula
fig.text(0.5, 0.02, 'P/E Ratio = Stock Price ÷ Earnings Per Share = Market Capitalization ÷ Net Income', 
         ha='center', fontsize=13, fontweight='bold',
         bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.8))

plt.tight_layout()
display(fig)
plt.close(fig)

Types of P/E Ratios

Trailing P/E (Historical P/E)

Trailing P/E uses earnings from the past 12 months (Trailing Twelve Months, or TTM).

Trailing P/E=Current Stock PriceTrailing 12-Month EPS\text{Trailing P/E} = \frac{\text{Current Stock Price}}{\text{Trailing 12-Month EPS}}

Characteristics:

  • Based on actual, reported earnings
  • More reliable (uses realized data)
  • Most commonly cited P/E ratio
  • Also called "P/E TTM"

Advantages:

  • Uses actual earnings (no estimation required)
  • Objective and verifiable
  • Reflects what the company has actually earned

Limitations:

  • Backward-looking (doesn't reflect future prospects)
  • May be distorted by one-time items
  • Doesn't account for future growth

Forward P/E (Leading P/E)

Forward P/E uses estimated earnings for the next 12 months.

Forward P/E=Current Stock PriceEstimated Next 12-Month EPS\text{Forward P/E} = \frac{\text{Current Stock Price}}{\text{Estimated Next 12-Month EPS}}

Characteristics:

  • Based on analyst earnings estimates
  • Forward-looking (reflects future prospects)
  • More relevant for growth companies
  • Also called "P/E LTM" (Leading Twelve Months)

Advantages:

  • Forward-looking (reflects future earnings)
  • More relevant for valuation
  • Better for comparing growth companies

Limitations:

  • Depends on earnings estimates (may be inaccurate)
  • Estimates may be biased or optimistic
  • Different analysts may have different estimates

Example: Trailing vs. Forward P/E

Company GHI has:

  • Current stock price: $75 per share
  • Trailing 12-month EPS: $3.00
  • Estimated next 12-month EPS: $4.00 (analyst consensus)

Trailing P/E:
$75 ÷ $3.00 = 25.0x

Forward P/E:
$75 ÷ $4.00 = 18.75x

The forward P/E is lower because analysts expect earnings to grow from $3.00 to $4.00 (33% growth). The forward P/E better reflects the company's valuation relative to expected future earnings.

Let's visualize the difference between trailing and forward P/E ratios:

Python exercise

#| label: trailing-forward-pe-comparison
#| fig-cap: "Trailing vs. Forward P/E: Comparison showing TTM vs. forward P/E with earnings timeline"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display
from datetime import datetime, timedelta

# Example: Company with growing earnings
stock_price = 75
trailing_eps = 3.00
forward_eps = 4.00
trailing_pe = stock_price / trailing_eps
forward_pe = stock_price / forward_eps
growth_rate = ((forward_eps / trailing_eps) - 1) * 100

# Create earnings timeline (quarters)
quarters = ['Q1\nT-3', 'Q2\nT-2', 'Q3\nT-1', 'Q4\nT-0', 'Q1\nT+1', 'Q2\nT+2', 'Q3\nT+3', 'Q4\nT+4']
# Historical earnings (backward)
historical_eps = [2.5, 2.7, 2.8, 3.0]  # Last 4 quarters
# Future estimated earnings (forward)
future_eps = [4.0, 4.2, 4.4, 4.6]  # Next 4 quarters
all_eps = historical_eps + future_eps

# Timeline dates
today = datetime.now()
dates = [today - timedelta(days=270-i*90) for i in range(7, -1, -1)]

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('Trailing vs. Forward P/E: Comparison with Earnings Timeline', 
            fontsize=16, fontweight='bold')

# Plot 1: Earnings Timeline
ax1 = axes[0, 0]
x_pos = np.arange(len(quarters))
colors_timeline = ['gray'] * 4 + ['blue'] * 4
bars = ax1.bar(x_pos, all_eps, color=colors_timeline, alpha=0.7, edgecolor='black', linewidth=1.5)

# Add divider between trailing and forward
ax1.axvline(x=3.5, color='red', linestyle='--', linewidth=2, alpha=0.7, label='Today (T-0)')
ax1.set_xlabel('Quarter', fontsize=12, fontweight='bold')
ax1.set_ylabel('Earnings Per Share ($)', fontsize=12, fontweight='bold')
ax1.set_title('Earnings Timeline: Trailing vs. Forward', fontsize=13, fontweight='bold')
ax1.set_xticks(x_pos)
ax1.set_xticklabels(quarters)
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')
ax1.legend(loc='best', fontsize=9)

# Add value labels
for i, (bar, eps) in enumerate(zip(bars, all_eps)):
    height = bar.get_height()
    ax1.text(bar.get_x() + bar.get_width()/2., height + 0.1,
            f'${eps:.2f}', ha='center', va='bottom',
            fontsize=9, fontweight='bold')

# Add annotations
ax1.text(1.5, max(all_eps) + 0.3, 'Trailing 12 Months (TTM)', 
        ha='center', fontsize=11, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightgray', alpha=0.8))
ax1.text(5.5, max(all_eps) + 0.3, 'Forward 12 Months', 
        ha='center', fontsize=11, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.8))

# Add average lines
ttm_avg = trailing_eps
forward_avg = forward_eps
ax1.axhline(y=ttm_avg, color='red', linestyle=':', linewidth=2, alpha=0.7, 
           label=f'TTM Avg: ${ttm_avg:.2f}')
ax1.axhline(y=forward_avg, color='blue', linestyle=':', linewidth=2, alpha=0.7, 
           label=f'Forward Avg: ${forward_avg:.2f}')

# Plot 2: P/E Ratio Comparison
ax2 = axes[0, 1]
pe_types = ['Trailing P/E\n(TTM)', 'Forward P/E\n(Estimated)']
pe_values = [trailing_pe, forward_pe]
colors_pe = ['red', 'blue']
bars = ax2.bar(range(len(pe_types)), pe_values,
               color=colors_pe, alpha=0.7, edgecolor='black', linewidth=1.5)
ax2.set_xlabel('P/E Type', fontsize=12, fontweight='bold')
ax2.set_ylabel('P/E Ratio (x)', fontsize=12, fontweight='bold')
ax2.set_title('P/E Ratio Comparison: Trailing vs. Forward', fontsize=13, fontweight='bold')
ax2.set_xticks(range(len(pe_types)))
ax2.set_xticklabels(pe_types)
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, pe, label in zip(bars, pe_values, ['Trailing', 'Forward']):
    height = bar.get_height()
    ax2.text(bar.get_x() + bar.get_width()/2., height + 0.5,
            f'{pe:.2f}x', ha='center', va='bottom',
            fontsize=11, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add formula annotations
ax2.text(0.02, 0.98, f'Trailing P/E:\n= ${stock_price:.0f} / ${trailing_eps:.2f}\n= {trailing_pe:.2f}x\n\nForward P/E:\n= ${stock_price:.0f} / ${forward_eps:.2f}\n= {forward_pe:.2f}x',
        transform=ax2.transAxes, fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightyellow', alpha=0.9),
        verticalalignment='top', family='monospace')

# Add difference arrow
diff = trailing_pe - forward_pe
ax2.annotate(f'Difference: {diff:.2f}x\n({(diff/trailing_pe)*100:.1f}% lower)',
            xy=(1, forward_pe), xytext=(0.5, forward_pe + 3),
            fontsize=10, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='lightgreen', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='green', lw=2))

# Plot 3: Earnings Growth Impact
ax3 = axes[1, 0]
# Simulate different growth scenarios
growth_scenarios = [0, 10, 20, 33, 50, 75]  # Percentage growth
forward_eps_scenarios = [trailing_eps * (1 + g/100) for g in growth_scenarios]
forward_pe_scenarios = [stock_price / eps for eps in forward_eps_scenarios]

# Create array of trailing_pe values (constant line)
trailing_pe_array = [trailing_pe] * len(growth_scenarios)

ax3.plot(growth_scenarios, trailing_pe_array, 'r--', linewidth=2.5, alpha=0.7, 
        label=f'Trailing P/E = {trailing_pe:.2f}x (constant)', marker='o', markersize=10)
ax3.plot(growth_scenarios, forward_pe_scenarios, 'b-', linewidth=3, alpha=0.8, 
        label='Forward P/E (varies with growth)', marker='s', markersize=10)

# Mark current scenario
current_idx = growth_scenarios.index(33)
ax3.plot(33, forward_pe, 'go', markersize=15, markeredgewidth=2, markeredgecolor='white', 
        zorder=5, label=f'Current: {growth_rate:.0f}% growth')
ax3.annotate(f'Current Scenario\nGrowth: {growth_rate:.0f}%\nForward P/E: {forward_pe:.2f}x',
            xy=(33, forward_pe), xytext=(33 + 10, forward_pe + 2),
            fontsize=10, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='green', lw=2))

ax3.set_xlabel('Expected Earnings Growth (%)', fontsize=12, fontweight='bold')
ax3.set_ylabel('P/E Ratio (x)', fontsize=12, fontweight='bold')
ax3.set_title('Forward P/E vs. Earnings Growth Rate', fontsize=13, fontweight='bold')
ax3.grid(True, alpha=0.3, linestyle='--')
ax3.legend(loc='best', fontsize=9)

# Add interpretation zones
ax3.axhspan(0, trailing_pe * 0.8, alpha=0.1, color='green', label='Lower P/E (Better Value)')
ax3.axhspan(trailing_pe * 1.2, 50, alpha=0.1, color='red', label='Higher P/E (Premium)')

# Plot 4: When to Use Each Metric
ax4 = axes[1, 1]
# Create comparison table visualization
comparison_categories = ['Data Source', 'Time Horizon', 'Reliability', 'Best For']
trailing_characteristics = ['Historical\nEarnings', 'Past 12\nMonths', 'High\n(Actual)', 'Mature\nCompanies']
forward_characteristics = ['Estimated\nEarnings', 'Next 12\nMonths', 'Medium\n(Estimated)', 'Growth\nCompanies']

x_pos_comparison = np.arange(len(comparison_categories))
width_comparison = 0.35

bars1 = ax4.bar(x_pos_comparison - width_comparison/2, [1, 1, 1, 1], width_comparison,
               label='Trailing P/E', color='red', alpha=0.7, edgecolor='black', linewidth=1.5)
bars2 = ax4.bar(x_pos_comparison + width_comparison/2, [1, 1, 1, 1], width_comparison,
               label='Forward P/E', color='blue', alpha=0.7, edgecolor='black', linewidth=1.5)

ax4.set_xlabel('Comparison Category', fontsize=12, fontweight='bold')
ax4.set_ylabel('Characteristic', fontsize=12, fontweight='bold')
ax4.set_title('Trailing vs. Forward P/E: When to Use Each', fontsize=13, fontweight='bold')
ax4.set_xticks(x_pos_comparison)
ax4.set_xticklabels(comparison_categories, rotation=15, ha='right')
ax4.set_yticks([])
ax4.legend(loc='upper left', fontsize=9)
ax4.grid(True, alpha=0.3, linestyle='--', axis='x')

# Add text annotations
for i, (trail, forward) in enumerate(zip(trailing_characteristics, forward_characteristics)):
    ax4.text(i - width_comparison/2, 0.5, trail, ha='center', va='center',
            fontsize=9, fontweight='bold', color='white')
    ax4.text(i + width_comparison/2, 0.5, forward, ha='center', va='center',
            fontsize=9, fontweight='bold', color='white')

# Add summary text box
ax4.text(0.5, 0.02, 'Key Insight: Forward P/E is more relevant for valuation\nbut depends on earnings estimates accuracy',
        transform=ax4.transAxes, ha='center', va='bottom',
        fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightgreen', alpha=0.9))

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **Trailing vs. Forward P/E Analysis**")
print(f"{'='*70}")
print(f"Trailing P/E = Current Price / Trailing 12-Month EPS")
print(f"Forward P/E = Current Price / Estimated Next 12-Month EPS")
print(f"{'='*70}")
print(f"Example: Stock Price = ${stock_price:.2f}")
print(f"  Trailing EPS: ${trailing_eps:.2f}")
print(f"  Forward EPS:  ${forward_eps:.2f} (estimated)")
print(f"  Expected Growth: {growth_rate:.1f}%")
print(f"{'='*70}")
print(f"Trailing P/E:  {trailing_pe:.2f}x = ${stock_price:.2f} / ${trailing_eps:.2f}")
print(f"Forward P/E:   {forward_pe:.2f}x = ${stock_price:.2f} / ${forward_eps:.2f}")
print(f"Difference:    {diff:.2f}x ({((diff/trailing_pe)*100):.1f}% lower)")
print(f"{'='*70}")
print(f"✅ Trailing P/E uses actual earnings (more reliable)")
print(f"✅ Forward P/E reflects future prospects (more relevant)")
print(f"✅ Forward P/E typically lower when earnings growing")
print(f"✅ Forward P/E better for growth company valuation")

Interpreting P/E Ratios

What Does a P/E Ratio Mean?

High P/E Ratio (e.g., 30x or higher):

  • Investors are paying a premium for earnings
  • May indicate:
    • High growth expectations
    • Strong competitive position
    • Overvaluation (if growth doesn't materialize)
  • Often associated with growth stocks

Low P/E Ratio (e.g., 10x or lower):

  • Investors are paying less for earnings
  • May indicate:
    • Low growth expectations
    • Company in decline
    • Undervaluation (if company is actually healthy)
  • Often associated with value stocks

Moderate P/E Ratio (e.g., 15-20x):

  • Reasonable valuation relative to earnings
  • May indicate:
    • Stable, mature company
    • Moderate growth expectations
    • Fair valuation

P/E Ratio Interpretation Framework

Interpreting P/E ratios requires context - a P/E of 20 might be expensive for one company and cheap for another, depending on growth, risk, and profitability. A systematic framework for interpreting P/E ratios helps you avoid common mistakes and identify when a stock might be mispriced.

1. Compare to Historical P/E

The first step is to compare the current P/E to the company's own historical average. Is the current P/E higher or lower than the company's historical average? This tells you whether the stock is trading at a premium or discount to its own historical valuation. If a company typically trades at a P/E of 15x but is currently trading at 25x, that's a significant premium that might indicate overvaluation - unless something fundamental has changed (new growth prospects, improved profitability, reduced risk). High relative to history may indicate overvaluation - investors might be overly optimistic. Low relative to history may indicate undervaluation - investors might be overly pessimistic, or the company might have fundamental problems.

2. Compare to Industry Peers

The second step is to compare the P/E to similar companies in the same industry. Is the P/E higher or lower than similar companies? This helps you understand whether the stock is valued appropriately relative to its peers. Higher P/E may indicate superior growth prospects or competitive position - the market might be willing to pay more because it expects this company to outperform peers. Lower P/E may indicate inferior prospects or undervaluation - the company might have weaker fundamentals than peers, or it might be undervalued if its fundamentals are actually strong.

3. Compare to Market Average

The third step is to compare the P/E to the overall market average. S&P 500 average P/E is typically 15-20x, though this varies with market conditions. Higher than market may indicate premium company - the stock might deserve a premium due to superior growth, profitability, or quality. Lower than market may indicate value opportunity - the stock might be undervalued, or it might simply be a lower-quality company that deserves a discount.

4. Consider Growth Rate

The fourth and perhaps most important step is to evaluate the P/E relative to the company's growth rate. P/E should be evaluated relative to earnings growth - a high P/E ratio is justified if the company has high growth prospects, but not if growth is low or negative. This is captured in the PEG ratio (P/E to Growth), which adjusts P/E for growth. High P/E justified by high growth (PEG ratio) - a P/E of 30 might be reasonable if the company is growing earnings at 30% per year (PEG = 1.0). High P/E without growth may indicate overvaluation - a P/E of 30 with 5% growth (PEG = 6.0) suggests the stock is expensive relative to its growth prospects.

Drivers of P/E Ratios

Understanding what drives P/E ratios is crucial for valuation analysis. The P/E ratio is determined by several factors that interact in complex ways. Two companies with identical earnings might have very different P/E ratios because investors have different expectations about their future prospects. Understanding these drivers helps you interpret P/E ratios correctly and identify when a high or low P/E ratio is justified versus when it might indicate mispricing.

The P/E ratio reflects the market's collective assessment of a company's future prospects, discounted to the present. When investors see a high P/E ratio, they're essentially saying: "We're willing to pay more for this company's earnings because we expect them to grow, or because we view the company as less risky, or because we believe it has superior profitability." Similarly, a low P/E ratio might indicate pessimism about growth, concerns about risk, or perception of inferior profitability.

Let's visualize how the key drivers - growth, risk, and profitability - affect P/E ratios:

Python exercise

#| label: pe-drivers-visualization
#| fig-cap: "P/E Drivers: Interactive visualization showing how growth, risk, and profitability affect P/E ratios"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Base parameters
base_eps = 2.00
base_price = 30
base_pe = base_price / base_eps

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('P/E Drivers: How Growth, Risk, and Profitability Affect P/E Ratios', 
            fontsize=16, fontweight='bold')

# Plot 1: Growth Rate Impact
ax1 = axes[0, 0]
growth_rates = np.linspace(0, 30, 100)  # 0% to 30% growth
# Simplified P/E model: P/E ≈ (1 - g/r) / (r - g) where r = required return
# Simplified: Higher growth → Higher P/E (assuming constant discount rate)
required_return = 0.12  # 12% required return
pe_by_growth = [15 + (g/100) * 50 for g in growth_rates]  # Simplified relationship

ax1.plot(growth_rates, pe_by_growth, 'b-', linewidth=3, alpha=0.8, label='P/E vs Growth')
ax1.axvline(x=3, color='red', linestyle='--', linewidth=2, alpha=0.7, label='Low Growth (3%)')
ax1.axvline(x=15, color='green', linestyle='--', linewidth=2, alpha=0.7, label='High Growth (15%)')
ax1.plot(3, pe_by_growth[3], 'ro', markersize=12, markeredgewidth=2, markeredgecolor='white', zorder=5)
ax1.plot(15, pe_by_growth[50], 'go', markersize=12, markeredgewidth=2, markeredgecolor='white', zorder=5)

ax1.set_xlabel('Expected Earnings Growth Rate (%)', fontsize=12, fontweight='bold')
ax1.set_ylabel('P/E Ratio (x)', fontsize=12, fontweight='bold')
ax1.set_title('Driver 1: Growth Rate → Higher Growth = Higher P/E', fontsize=13, fontweight='bold')
ax1.grid(True, alpha=0.3, linestyle='--')
ax1.legend(loc='upper left', fontsize=9)

# Add annotations
ax1.annotate(f'Company A\n(Low Growth)\nP/E ≈ {pe_by_growth[3]:.1f}x',
            xy=(3, pe_by_growth[3]), xytext=(3 + 5, pe_by_growth[3] + 5),
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='lightcoral', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='red', lw=2))
ax1.annotate(f'Company B\n(High Growth)\nP/E ≈ {pe_by_growth[50]:.1f}x',
            xy=(15, pe_by_growth[50]), xytext=(15 + 5, pe_by_growth[50] + 5),
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='lightgreen', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='green', lw=2))

# Plot 2: Risk (Required Return) Impact
ax2 = axes[0, 1]
risk_levels = np.linspace(8, 20, 100)  # 8% to 20% required return
# Higher risk → Higher discount rate → Lower P/E
# Simplified: P/E ≈ 1 / (r - g) where g = 5% constant
constant_growth = 5
pe_by_risk = [1 / ((r/100 - constant_growth/100) + 0.01) * 15 for r in risk_levels]
pe_by_risk = np.clip(pe_by_risk, 5, 50)  # Clamp to reasonable range

ax2.plot(risk_levels, pe_by_risk, 'r-', linewidth=3, alpha=0.8, label='P/E vs Risk')
ax2.axvline(x=10, color='green', linestyle='--', linewidth=2, alpha=0.7, label='Low Risk (10% req return)')
ax2.axvline(x=16, color='red', linestyle='--', linewidth=2, alpha=0.7, label='High Risk (16% req return)')

# Find indices
low_risk_idx = int((10 - 8) / (20 - 8) * 100)
high_risk_idx = int((16 - 8) / (20 - 8) * 100)
ax2.plot(10, pe_by_risk[low_risk_idx], 'go', markersize=12, markeredgewidth=2, 
        markeredgecolor='white', zorder=5)
ax2.plot(16, pe_by_risk[high_risk_idx], 'ro', markersize=12, markeredgewidth=2, 
        markeredgecolor='white', zorder=5)

ax2.set_xlabel('Required Rate of Return (%)', fontsize=12, fontweight='bold')
ax2.set_ylabel('P/E Ratio (x)', fontsize=12, fontweight='bold')
ax2.set_title('Driver 2: Risk → Higher Risk = Lower P/E', fontsize=13, fontweight='bold')
ax2.grid(True, alpha=0.3, linestyle='--')
ax2.legend(loc='upper right', fontsize=9)

# Add annotations
ax2.annotate(f'Low Risk Company\nP/E ≈ {pe_by_risk[low_risk_idx]:.1f}x',
            xy=(10, pe_by_risk[low_risk_idx]), xytext=(10 - 2, pe_by_risk[low_risk_idx] + 3),
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='lightgreen', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='green', lw=2))
ax2.annotate(f'High Risk Company\nP/E ≈ {pe_by_risk[high_risk_idx]:.1f}x',
            xy=(16, pe_by_risk[high_risk_idx]), xytext=(16 + 1, pe_by_risk[high_risk_idx] + 3),
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='lightcoral', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='red', lw=2))

# Plot 3: ROE (Profitability) Impact
ax3 = axes[1, 0]
roe_levels = np.linspace(5, 25, 100)  # 5% to 25% ROE
# Higher ROE → Higher P/E (via P/E = P/B / ROE relationship)
# For constant P/B, higher ROE → lower P/E, but in practice higher ROE → higher P/B → higher P/E
# Simplified: Higher ROE allows for higher P/E
pb_ratio = 2.0  # Constant P/B for illustration
pe_by_roe_via_pb = [pb_ratio / (roe/100) for roe in roe_levels]  # Direct relationship
# But in practice, higher ROE → higher P/B, so:
pe_by_roe_practical = [10 + (roe - 5) * 1.2 for roe in roe_levels]  # Practical relationship

ax3.plot(roe_levels, pe_by_roe_practical, 'g-', linewidth=3, alpha=0.8, 
        label='P/E vs ROE (Practical)')
ax3.axvline(x=10, color='red', linestyle='--', linewidth=2, alpha=0.7, label='Low ROE (10%)')
ax3.axvline(x=20, color='green', linestyle='--', linewidth=2, alpha=0.7, label='High ROE (20%)')

low_roe_idx = int((10 - 5) / (25 - 5) * 100)
high_roe_idx = int((20 - 5) / (25 - 5) * 100)
ax3.plot(10, pe_by_roe_practical[low_roe_idx], 'ro', markersize=12, markeredgewidth=2, 
        markeredgecolor='white', zorder=5)
ax3.plot(20, pe_by_roe_practical[high_roe_idx], 'go', markersize=12, markeredgewidth=2, 
        markeredgecolor='white', zorder=5)

ax3.set_xlabel('Return on Equity (ROE) (%)', fontsize=12, fontweight='bold')
ax3.set_ylabel('P/E Ratio (x)', fontsize=12, fontweight='bold')
ax3.set_title('Driver 3: Profitability (ROE) → Higher ROE = Higher P/E', fontsize=13, fontweight='bold')
ax3.grid(True, alpha=0.3, linestyle='--')
ax3.legend(loc='upper left', fontsize=9)

# Add annotations
ax3.annotate(f'Low ROE Company\nP/E ≈ {pe_by_roe_practical[low_roe_idx]:.1f}x',
            xy=(10, pe_by_roe_practical[low_roe_idx]), xytext=(10 - 3, pe_by_roe_practical[low_roe_idx] + 2),
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='lightcoral', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='red', lw=2))
ax3.annotate(f'High ROE Company\nP/E ≈ {pe_by_roe_practical[high_roe_idx]:.1f}x',
            xy=(20, pe_by_roe_practical[high_roe_idx]), xytext=(20 + 2, pe_by_roe_practical[high_roe_idx] + 2),
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='lightgreen', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='green', lw=2))

# Plot 4: Combined Effect (3D Surface Projection)
ax4 = axes[1, 1]
# Create example companies with different combinations
companies = ['Low Growth\nLow ROE\nHigh Risk', 'Moderate\nAll Factors', 
            'High Growth\nHigh ROE\nLow Risk', 'Low Growth\nHigh ROE\nLow Risk']
pe_values_example = [8, 15, 30, 18]
growth_values = [3, 8, 15, 5]
roe_values = [8, 12, 20, 18]
risk_values = [16, 12, 10, 11]

colors_example = ['red', 'orange', 'green', 'lightgreen']
bars = ax4.bar(range(len(companies)), pe_values_example,
               color=colors_example, alpha=0.7, edgecolor='black', linewidth=1.5)
ax4.set_xlabel('Company Profile', fontsize=12, fontweight='bold')
ax4.set_ylabel('P/E Ratio (x)', fontsize=12, fontweight='bold')
ax4.set_title('Combined Effect: Multiple Drivers Interact', fontsize=13, fontweight='bold')
ax4.set_xticks(range(len(companies)))
ax4.set_xticklabels(companies, rotation=15, ha='right')
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels with drivers
for i, (bar, pe, g, roe, risk) in enumerate(zip(bars, pe_values_example, growth_values, roe_values, risk_values)):
    height = bar.get_height()
    ax4.text(bar.get_x() + bar.get_width()/2., height + 1,
            f'P/E: {pe:.0f}x\nG: {g}% | ROE: {roe}% | R: {risk}%',
            ha='center', va='bottom',
            fontsize=8, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add formula annotation
ax4.text(0.02, 0.98, 'Key Drivers:\n• Growth Rate (↑ → P/E ↑)\n• Risk (↑ → P/E ↓)\n• ROE/Profitability (↑ → P/E ↑)\n\nAll factors interact\nsimultaneously',
        transform=ax4.transAxes, fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightyellow', alpha=0.9),
        verticalalignment='top', family='monospace')

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **P/E Drivers Analysis**")
print(f"{'='*70}")
print(f"P/E Ratio is driven by multiple factors:")
print(f"  1. Growth Rate: Higher growth → Higher P/E")
print(f"  2. Risk (Required Return): Higher risk → Lower P/E")
print(f"  3. Profitability (ROE): Higher ROE → Higher P/E")
print(f"{'='*70}")
print(f"Example Companies:")
print(f"{'Company':<30} {'Growth':<10} {'ROE':<10} {'Risk':<10} {'P/E':<10}")
print(f"{'-'*70}")
for i, (comp, pe, g, roe, risk) in enumerate(zip(companies, pe_values_example, 
                                                  growth_values, roe_values, risk_values)):
    print(f"{comp.replace(chr(10), ' '):<30} {g:>8.0f}%   {roe:>8.0f}%   {risk:>8.0f}%   {pe:>8.0f}x")
print(f"{'='*70}")
print(f"✅ All drivers interact simultaneously")
print(f"✅ High growth + Low risk + High ROE = High P/E")
print(f"✅ Low growth + High risk + Low ROE = Low P/E")
print(f"✅ Understanding drivers helps interpret P/E ratios")

1. Earnings Growth Rate

Higher growth → Higher P/E

Companies with higher expected earnings growth typically command higher P/E ratios. This makes intuitive sense: if you expect a company's earnings to double in five years, you'd be willing to pay more today for those future earnings than if you expected earnings to remain flat. Investors are essentially paying a premium today for earnings that will grow rapidly in the future.

The relationship between growth and P/E is fundamental to valuation. A company with strong growth prospects can justify a high P/E ratio because the future earnings will be much larger than current earnings. Conversely, a company with no growth prospects should trade at a lower P/E ratio because there's no expectation of future earnings expansion.

Mathematical Relationship:

The P/E ratio can be related to growth through the Gordon Growth Model (simplified):

P/E≈1−g/rr−g\text{P/E} \approx \frac{1 - g/r}{r - g}

Where:

  • g$=Expectedearningsgrowthrateg\text{\$} = Expected earnings growth rater$=Requiredrateofreturn(discountrate)r\text{\$} = Required rate of return (discount rate)g$)increases,P/Eincreases(assumingg\text{\$}) increases, P/E increases (assumingg<rg < r2.00−Expectedgrowth:3−Stockprice:2.00 - Expected growth: 3% per year - Stock price:1 of equity, while a company with a 10% ROE generates only $0.10. Investors are willing to pay more (higher P/E) for companies that generate higher returns on their equity investment.

The relationship between P/E and ROE is mathematically captured through the P/B ratio. Since P/E = P/B ÷ ROE, a company with a higher ROE can justify a higher P/E ratio, all else equal. This relationship is fundamental to valuation: two companies with the same P/B ratio will have different P/E ratios if they have different ROEs. The company with higher ROE will have the higher P/E ratio because it generates more earnings per dollar of book value.

Relationship:

P/E=P/B RatioROE\text{P/E} = \frac{\text{P/B Ratio}}{\text{ROE}}

This formula shows that P/E is inversely related to ROE when holding P/B constant. However, in practice, companies with higher ROE often have higher P/B ratios as well, so the relationship is more complex. Higher ROE allows for higher P/E, but it also typically leads to higher P/B, creating a virtuous cycle for high-quality companies.

4. Dividend Policy

Higher dividends → May affect P/E

Companies that pay higher dividends may have different P/E ratios, though the relationship is complex and depends on investor preferences and market conditions. High dividend payouts may reduce growth because less money is retained in the business for reinvestment. A company that pays out 80% of earnings as dividends has only 20% left to reinvest for growth, which might limit future earnings expansion. However, dividends provide current income, which is valued by income-focused investors who prefer cash today over uncertain growth tomorrow.

The dividend preference varies by investor type and market conditions. In low-interest-rate environments, dividend-paying stocks become more attractive relative to bonds, potentially supporting higher P/E ratios. Growth investors might prefer companies that reinvest earnings rather than pay dividends, while income investors might prefer high dividend payers. The net effect on P/E ratios depends on the balance of these preferences in the market.

5. Market Sentiment and Psychology

Bull markets → Higher P/E ratios
Bear markets → Lower P/E ratios

Market-wide sentiment affects P/E ratios significantly, sometimes more than fundamentals. During bull markets, investors are optimistic about the future, confident that earnings will grow, and willing to pay higher multiples for current earnings. This optimism can push P/E ratios above levels justified by fundamentals. During bear markets, fear and pessimism dominate. Investors worry about future earnings, demand higher returns to compensate for perceived risks, and push P/E ratios below levels justified by fundamentals.

This sentiment-driven variation in P/E ratios creates opportunities for value investors. When market sentiment is extremely negative, high-quality companies might trade at P/E ratios that are unjustifiably low based on their fundamentals. Conversely, when sentiment is extremely positive, average companies might trade at P/E ratios that are unjustifiably high. Understanding market sentiment helps you interpret P/E ratios in context and identify when market psychology is driving prices away from fundamental value.

6. Industry and Sector Characteristics

Different industries have different typical P/E ratios due to their inherent characteristics - growth prospects, risk profiles, capital intensity, and regulatory environments all vary by industry. Comparing a company's P/E ratio to its industry average is often more meaningful than comparing it to the overall market average.

High P/E Industries typically include industries with strong growth potential, even if current earnings are modest. Technology companies often trade at high P/E ratios because investors expect rapid earnings growth as new technologies are adopted. Biotechnology companies trade at high P/E ratios because of speculative growth potential - investors are betting on future drug approvals and market expansion. Consumer discretionary companies often have high P/E ratios during economic expansions when cyclical growth is expected.

Low P/E Industries typically include industries with slower growth, higher risk, or regulatory constraints. Utilities trade at lower P/E ratios because they have slow, predictable growth and are heavily regulated, limiting their ability to expand. Financials often have lower P/E ratios due to regulatory capital requirements and the cyclical nature of the business. Energy companies trade at lower P/E ratios because they're commodity-driven, with earnings that fluctuate with commodity prices rather than company-specific factors.

The PEG Ratio: Adjusting P/E for Growth

The PEG ratio (Price/Earnings to Growth) adjusts the P/E ratio for expected earnings growth, providing a more nuanced valuation metric.

PEG Ratio=P/E RatioAnnual Earnings Growth Rate\text{PEG Ratio} = \frac{\text{P/E Ratio}}{\text{Annual Earnings Growth Rate}}

Where the growth rate is typically expressed as a percentage (e.g., 15% = 0.15 in the formula, or 15 in the denominator if using percentage directly).

Interpretation:

  • PEG < 1: Potentially undervalued - growth rate exceeds P/E ratio
  • PEG = 1: Fairly valued - growth rate matches P/E ratio
  • PEG > 1: Potentially overvalued - P/E ratio exceeds growth rate

The PEG ratio helps adjust for growth expectations, making P/E ratios more comparable across companies with different growth rates. Let's visualize the PEG ratio:

Python exercise

#| label: peg-ratio-formula-enhanced
#| fig-cap: "PEG Ratio Formula: Enhanced Visualization showing PEG = P/E / Growth Rate with Interpretation"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Example companies
companies = ['Growth Stock A\n(High Growth)', 'Growth Stock B\n(Moderate Growth)', 
             'Value Stock\n(Low Growth)', 'Overvalued Stock\n(High P/E, Low Growth)']
pe_ratios = [30, 20, 15, 40]
growth_rates = [30, 15, 5, 10]  # Percentage
peg_ratios = [pe / g for pe, g in zip(pe_ratios, growth_rates)]

# PEG interpretation zones
peg_categories = ['Undervalued\n(PEG < 0.75)', 'Fair Value\n(PEG 0.75-1.5)', 
                  'Expensive\n(PEG 1.5-2.5)', 'Very Expensive\n(PEG > 2.5)']
peg_colors = ['green', 'lightgreen', 'orange', 'red']
peg_zones = [0.5, 1.0, 2.0, 3.5]

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('PEG Ratio Formula: PEG = P/E / Growth Rate - Enhanced Visualization', 
            fontsize=16, fontweight='bold')

# Plot 1: PEG Components
ax1 = axes[0, 0]
x = np.arange(len(companies))
width = 0.25

bars1 = ax1.bar(x - 1.5*width, pe_ratios, width,
               label='P/E Ratio (x)', color='blue', alpha=0.7, edgecolor='black', linewidth=1.5)
bars2 = ax1.bar(x - 0.5*width, growth_rates, width,
               label='Growth Rate (%)', color='green', alpha=0.7, edgecolor='black', linewidth=1.5)
bars3 = ax1.bar(x + 0.5*width, peg_ratios, width,
               label='PEG Ratio', color='purple', alpha=0.7, edgecolor='black', linewidth=1.5)

ax1.set_xlabel('Company', fontsize=12, fontweight='bold')
ax1.set_ylabel('Value', fontsize=12, fontweight='bold')
ax1.set_title('PEG Ratio Components: P/E, Growth Rate, and PEG', fontsize=13, fontweight='bold')
ax1.set_xticks(x)
ax1.set_xticklabels(companies, rotation=15, ha='right')
ax1.legend(loc='best', fontsize=9)
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bars, values, label_prefix in [(bars1, pe_ratios, ''), (bars2, growth_rates, ''), 
                                    (bars3, peg_ratios, '')]:
    for bar, val in zip(bars, values):
        height = bar.get_height()
        if bars == bars3:
            label = f'{val:.2f}'
        elif bars == bars2:
            label = f'{val:.0f}%'
        else:
            label = f'{val:.0f}x'
        ax1.text(bar.get_x() + bar.get_width()/2., height + height*0.02,
                label, ha='center', va='bottom',
                fontsize=9, fontweight='bold')

# Add formula annotation
ax1.text(0.02, 0.98, 'Formula:\nPEG = P/E / Growth Rate\n\nExample:\nPEG = 30 / 30%\n= 1.0 (Fair)',
        transform=ax1.transAxes, fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.9),
        verticalalignment='top', family='monospace')

# Plot 2: PEG Ratio Comparison
ax2 = axes[0, 1]
colors_peg = ['green' if peg < 0.75 else 'lightgreen' if peg < 1.5 else 'orange' if peg < 2.5 else 'red' 
              for peg in peg_ratios]
bars = ax2.bar(range(len(companies)), peg_ratios,
               color=colors_peg, alpha=0.7, edgecolor='black', linewidth=1.5)
ax2.axhline(y=1.0, color='black', linestyle='--', linewidth=2, alpha=0.7, label='PEG = 1.0 (Fair Value)')
ax2.set_xlabel('Company', fontsize=12, fontweight='bold')
ax2.set_ylabel('PEG Ratio', fontsize=12, fontweight='bold')
ax2.set_title('PEG Ratio Comparison Across Companies', fontsize=13, fontweight='bold')
ax2.set_xticks(range(len(companies)))
ax2.set_xticklabels(companies, rotation=15, ha='right')
ax2.legend(loc='best', fontsize=9)
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels with interpretation
interpretations = ['Undervalued', 'Fair', 'Moderate', 'Expensive']
for bar, peg, interp in zip(bars, peg_ratios, interpretations):
    height = bar.get_height()
    ax2.text(bar.get_x() + bar.get_width()/2., height + 0.1,
            f'{peg:.2f}\n({interp})', ha='center', va='bottom',
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.8))

# Plot 3: P/E vs Growth Rate (PEG Contours)
ax3 = axes[1, 0]
# Create scatter plot with PEG contours
growth_range = np.linspace(5, 35, 100)
pe_range = np.linspace(10, 50, 100)

# Plot PEG = 1 line
peg_1_line = growth_range  # When PEG = 1, P/E = Growth
ax3.plot(growth_range, peg_1_line, 'k--', linewidth=2, alpha=0.7, label='PEG = 1.0')

# Plot PEG = 0.75 and 1.5 lines
peg_075_line = growth_range * 0.75
peg_15_line = growth_range * 1.5
ax3.plot(growth_range, peg_075_line, 'g--', linewidth=1.5, alpha=0.5, label='PEG = 0.75')
ax3.plot(growth_range, peg_15_line, 'orange', linestyle='--', linewidth=1.5, alpha=0.5, label='PEG = 1.5')

# Plot companies
colors_scatter = colors_peg
for i, (pe, g, peg_val) in enumerate(zip(pe_ratios, growth_rates, peg_ratios)):
    ax3.scatter(g, pe, s=200, c=colors_scatter[i], alpha=0.7, 
               edgecolor='black', linewidth=2, zorder=5)
    ax3.annotate(f'{companies[i].split()[0]}\nP/E={pe}x, G={g}%\nPEG={peg_val:.2f}',
                xy=(g, pe), xytext=(g + 2, pe + 2),
                fontsize=9, fontweight='bold',
                bbox=dict(boxstyle='round', facecolor='white', alpha=0.9),
                arrowprops=dict(arrowstyle='->', color='black', lw=1.5))

ax3.fill_between(growth_range, 0, peg_075_line, alpha=0.2, color='green', label='Undervalued Zone')
ax3.fill_between(growth_range, peg_075_line, peg_15_line, alpha=0.2, color='lightgreen', 
                label='Fair Value Zone')
ax3.fill_between(growth_range, peg_15_line, 50, alpha=0.2, color='orange', label='Expensive Zone')

ax3.set_xlabel('Growth Rate (%)', fontsize=12, fontweight='bold')
ax3.set_ylabel('P/E Ratio (x)', fontsize=12, fontweight='bold')
ax3.set_title('P/E vs Growth Rate: PEG Ratio Analysis', fontsize=13, fontweight='bold')
ax3.legend(loc='upper left', fontsize=9)
ax3.grid(True, alpha=0.3, linestyle='--')

# Plot 4: PEG Interpretation Zones
ax4 = axes[1, 1]
bars = ax4.barh(range(len(peg_categories)), peg_zones,
               color=peg_colors, alpha=0.7, edgecolor='black', linewidth=1.5)
ax4.axvline(x=1.0, color='black', linestyle='--', linewidth=2, alpha=0.7, 
           label='PEG = 1.0 (Fair Value)')
ax4.set_xlabel('PEG Ratio', fontsize=12, fontweight='bold')
ax4.set_ylabel('Category', fontsize=12, fontweight='bold')
ax4.set_title('PEG Ratio Interpretation Zones', fontsize=13, fontweight='bold')
ax4.set_yticks(range(len(peg_categories)))
ax4.set_yticklabels(peg_categories)
ax4.grid(True, alpha=0.3, linestyle='--', axis='x')
ax4.legend(loc='best', fontsize=9)

# Add value labels
for bar, peg_zone in zip(bars, peg_zones):
    width = bar.get_width()
    ax4.text(width + 0.1, bar.get_y() + bar.get_height()/2,
            f'{peg_zone:.1f}', fontsize=10, fontweight='bold', va='center')

# Mark where our examples fall
for i, peg in enumerate(peg_ratios):
    if peg < 0.75:
        cat_idx = 0
    elif peg < 1.5:
        cat_idx = 1
    elif peg < 2.5:
        cat_idx = 2
    else:
        cat_idx = 3
    ax4.plot(peg, cat_idx, 'ro', markersize=12, zorder=5)
    ax4.annotate(f'{companies[i].split()[0]}\n{peg:.2f}',
                xy=(peg, cat_idx), xytext=(peg + 0.3, cat_idx + 0.3),
                fontsize=9, fontweight='bold',
                bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.8),
                arrowprops=dict(arrowstyle='->', color='red', lw=1.5))

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **PEG Ratio Formula Analysis**")
print(f"{'='*70}")
print(f"Formula: PEG = P/E / Growth Rate")
print(f"  where P/E = price-to-earnings ratio")
print(f"        Growth Rate = annual earnings growth rate (%)")
print(f"{'='*70}")
print(f"Example Companies:")
print(f"{'Company':<25} {'P/E':<10} {'Growth':<12} {'PEG':<12} {'Interpretation':<20}")
print(f"{'-'*70}")
for i, (comp, pe, g, peg) in enumerate(zip(companies, pe_ratios, growth_rates, peg_ratios)):
    if peg < 0.75:
        interp = 'Undervalued'
    elif peg < 1.5:
        interp = 'Fair Value'
    elif peg < 2.5:
        interp = 'Expensive'
    else:
        interp = 'Very Expensive'
    print(f"{comp.replace(chr(10), ' '):<25} {pe:>8.0f}x   {g:>9.0f}%   {peg:>10.2f}   {interp:<20}")
print(f"{'='*70}")
print(f"Interpretation:")
print(f"  • PEG < 0.75: Growth rate much higher than P/E - potentially undervalued")
print(f"  • PEG = 1.0:  Growth rate matches P/E - fair value")
print(f"  • PEG > 1.5:  P/E much higher than growth - potentially overvalued")
print(f"{'='*70}")
print(f"✅ PEG adjusts P/E for growth expectations")
print(f"✅ Lower PEG = better value relative to growth")
print(f"✅ PEG helps compare companies with different growth rates")

Python exercise

#| label: fig-peg-ratio-visualization
#| fig-cap: "PEG Ratio: Adjusting P/E for Growth to Identify Value"
#| fig-width: 14
#| fig-height: 8

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import matplotlib.pyplot as plt
from IPython.display import display
import numpy as np

# Create figure
fig, axes = plt.subplots(1, 2, figsize=(16, 8))
fig.suptitle('PEG Ratio: P/E Adjusted for Growth - Identifying Value Relative to Growth Prospects', fontsize=16, fontweight='bold')

# Left plot: PEG calculation examples
ax1 = axes[0]

# Example companies
companies = ['Company A\n(High Growth)', 'Company B\n(Moderate Growth)', 'Company C\n(Low Growth)']
pe_ratios = [30, 20, 15]
growth_rates = [30, 15, 5]  # Percentage
peg_ratios = [pe / g for pe, g in zip(pe_ratios, growth_rates)]

# Create grouped bar chart
x = np.arange(len(companies))
width = 0.25

bars1 = ax1.bar(x - width, pe_ratios, width, label='P/E Ratio (x)', color='#2E86AB', alpha=0.8, edgecolor='black', linewidth=1.5)
bars2 = ax1.bar(x, growth_rates, width, label='Growth Rate (%)', color='#4ECDC4', alpha=0.8, edgecolor='black', linewidth=1.5)
bars3 = ax1.bar(x + width, peg_ratios, width, label='PEG Ratio', color='#A23B72', alpha=0.8, edgecolor='black', linewidth=1.5)

ax1.set_xlabel('Company', fontsize=12, fontweight='bold')
ax1.set_ylabel('Value', fontsize=12, fontweight='bold')
ax1.set_title('PEG Ratio Components: P/E, Growth, and PEG', fontsize=13, fontweight='bold')
ax1.set_xticks(x)
ax1.set_xticklabels(companies)
ax1.legend(fontsize=10)
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add PEG labels with interpretation
interpretations = ['PEG = 1.0\n(Fair)', 'PEG = 1.33\n(Moderate)', 'PEG = 3.0\n(Expensive)']
colors_peg = ['green', 'orange', 'red']
for i, (peg, interp, color) in enumerate(zip(peg_ratios, interpretations, colors_peg)):
    ax1.text(i, max(pe_ratios[i], growth_rates[i], peg_ratios[i]) + 3, 
             f'PEG = {peg:.2f}\n{interp}', 
             ha='center', fontsize=9, fontweight='bold',
             bbox=dict(boxstyle='round', facecolor=color, alpha=0.3))

# Right plot: PEG interpretation zones
ax2 = axes[1]

# PEG ratio ranges
peg_categories = ['Undervalued\n(PEG < 0.75)', 'Fair Value\n(PEG 0.75-1.5)', 'Expensive\n(PEG 1.5-2.5)', 'Very Expensive\n(PEG > 2.5)']
peg_midpoints = [0.5, 1.0, 2.0, 3.5]
colors_peg_cat = ['#96CEB4', '#4ECDC4', '#FFA07A', '#FF6B6B']

bars = ax2.barh(peg_categories, peg_midpoints, color=colors_peg_cat, alpha=0.8, edgecolor='black', linewidth=1.5)
ax2.set_xlabel('PEG Ratio', fontsize=12, fontweight='bold')
ax2.set_title('PEG Ratio Interpretation Zones', fontsize=13, fontweight='bold')
ax2.grid(True, alpha=0.3, linestyle='--', axis='x')
ax2.set_xlim(0, 4)
ax2.axvline(x=1.0, color='black', linestyle='--', linewidth=2, alpha=0.5, label='PEG = 1.0 (Fair Value)')

# Add value labels
for bar, val in zip(bars, peg_midpoints):
    width = bar.get_width()
    ax2.text(width + 0.1, bar.get_y() + bar.get_height()/2,
             f'{val:.1f}', fontsize=10, fontweight='bold', va='center')

# Add interpretation annotations
interpretations_peg = ['Growth > P/E\nGood Value', 'Growth ≈ P/E\nFair Value', 'P/E > Growth\nPremium Price', 'P/E >> Growth\nOvervalued']
for i, (bar, interp) in enumerate(zip(bars, interpretations_peg)):
    ax2.text(-0.3, bar.get_y() + bar.get_height()/2,
             interp, fontsize=9, fontweight='bold', va='center', ha='right',
             bbox=dict(boxstyle='round', facecolor='white', alpha=0.7))

ax2.legend(fontsize=9)

# Add formula
fig.text(0.5, 0.02, 'PEG Ratio = P/E Ratio ÷ Annual Earnings Growth Rate  |  PEG < 1.0 suggests good value relative to growth', 
         ha='center', fontsize=13, fontweight='bold',
         bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.8))

plt.tight_layout()
display(fig)
plt.close(fig)

Interpretation:

  • PEG < 1: Potentially undervalued (growth exceeds P/E)
  • PEG = 1: Fairly valued (growth matches P/E)
  • PEG > 1: Potentially overvalued (P/E exceeds growth)

Advantages:

  • Accounts for growth in valuation
  • Allows comparison across companies with different growth rates
  • Popularized by Peter Lynch

Limitations:

  • Growth rate is an estimate (may be inaccurate)
  • Assumes linear growth (may not hold)
  • Doesn't account for risk differences

Example: PEG Ratio Analysis

Company JKL:

  • P/E ratio: 30x
  • Expected earnings growth: 25% per year
  • PEG = 30 ÷ 25 = 1.2

Company MNO:

  • P/E ratio: 20x
  • Expected earnings growth: 10% per year
  • PEG = 20 ÷ 10 = 2.0

Company PQR:

  • P/E ratio: 15x
  • Expected earnings growth: 20% per year
  • PEG = 15 ÷ 20 = 0.75

Analysis:

  • Company PQR has the lowest PEG (0.75), suggesting it may be undervalued relative to its growth
  • Company MNO has the highest PEG (2.0), suggesting it may be overvalued
  • Company JKL's PEG (1.2) is moderate

The PEG ratio helps identify which company offers the best value relative to growth expectations.

P/E Ratio Variations and Adjustments

Normalized P/E (Cyclical Earnings Adjustment)

For cyclical companies, earnings vary significantly with economic cycles. Normalized P/E uses average earnings over a full business cycle rather than current earnings.

Normalized P/E=Stock PriceNormalized EPS\text{Normalized P/E} = \frac{\text{Stock Price}}{\text{Normalized EPS}}

Where Normalized EPS = Average EPS over a business cycle (typically 5-7 years).

Use Case: Cyclical industries (automobiles, steel, construction) where earnings fluctuate with economic conditions.

Earnings Yield (E/P Ratio)

Earnings yield is the inverse of the P/E ratio:

Earnings Yield=1P/E Ratio=EPSStock Price\text{Earnings Yield} = \frac{1}{\text{P/E Ratio}} = \frac{\text{EPS}}{\text{Stock Price}}

Interpretation:

  • Represents the earnings return as a percentage of stock price
  • Comparable to bond yields (can compare stocks to bonds)
  • Higher earnings yield = lower P/E = potentially better value

Example: If P/E = 20x, then Earnings Yield = 1/20 = 5%

Shiller P/E (Cyclically Adjusted P/E, CAPE)

Developed by Robert Shiller, the CAPE ratio uses 10-year average inflation-adjusted earnings to smooth out business cycles.

CAPE=Stock Price10-Year Average Real EPS\text{CAPE} = \frac{\text{Stock Price}}{\text{10-Year Average Real EPS}}

Use Case: Market-level analysis (e.g., S&P 500) to assess overall market valuation.

P/E Ratio Analysis: Cross-Sectional and Time-Series

Cross-Sectional Analysis: Comparing Companies

Step 1: Identify Comparable Companies

  • Same industry or sector
  • Similar business model
  • Similar size and growth profile

Step 2: Calculate P/E Ratios

  • Use consistent methodology (trailing vs. forward)
  • Ensure comparable EPS definitions

Step 3: Analyze Differences

  • Why does Company A have a higher P/E than Company B?
  • Growth prospects?
  • Profitability (ROE)?
  • Risk profile?
  • Competitive position?

Step 4: Determine Fair Value

  • If Company A trades at 25x P/E and peers trade at 20x, is Company A overvalued?
  • Or does it deserve a premium due to superior fundamentals?

Example: Cross-Sectional P/E Analysis

Three companies in the software industry:

Company Software A:

  • P/E: 35x
  • Growth rate: 30%
  • ROE: 25%
  • Market leader

Company Software B:

  • P/E: 20x
  • Growth rate: 10%
  • ROE: 15%
  • Market follower

Company Software C:

  • P/E: 15x
  • Growth rate: 5%
  • ROE: 10%
  • Declining market position

Analysis:

  • Company A's high P/E (35x) is justified by high growth (30%) and strong ROE (25%)
  • Company B's moderate P/E (20x) matches moderate growth (10%)
  • Company C's low P/E (15x) reflects low growth (5%) and weak position

Company A may not be overvalued despite the high P/E - its superior fundamentals justify the premium.

Analyzing a company's P/E ratio over time reveals valuation trends:

High P/E Relative to History:

  • May indicate overvaluation
  • May reflect improved fundamentals
  • May indicate market optimism

Low P/E Relative to History:

  • May indicate undervaluation
  • May reflect deteriorating fundamentals
  • May indicate market pessimism

Mean Reversion:

  • P/E ratios tend to revert toward historical averages
  • Extremes (very high or very low) often correct over time

Limitations of P/E Ratios

While P/E ratios are valuable, they have important limitations:

1. Earnings Quality Issues

Accounting Manipulation:

  • Earnings can be manipulated through accounting choices
  • Aggressive revenue recognition
  • Expense deferral
  • One-time charges/exclusions

Solution: Examine cash flows, not just earnings. Free cash flow is harder to manipulate.

2. Negative Earnings

Problem: P/E ratio cannot be calculated for companies with negative earnings (losses).

Solutions:

  • Use forward P/E (if earnings expected to turn positive)
  • Use alternative metrics (P/S, P/B, EV/EBITDA)
  • Consider enterprise value multiples

3. Cyclical Companies

Problem: P/E ratios are distorted for cyclical companies whose earnings fluctuate.

Solution: Use normalized P/E or average earnings over a cycle.

4. Growth Assumptions

Problem: P/E doesn't explicitly account for growth rates.

Solution: Use PEG ratio or DCF models that explicitly model growth.

5. Industry Differences

Problem: Different industries have different typical P/E ranges.

Solution: Compare within industry, not across industries.

6. Capital Structure

Problem: P/E is affected by financial leverage (debt).

Solution: Use enterprise value multiples (EV/EBITDA) that are capital-structure neutral.

Advanced P/E Concepts

P/E Decomposition: The DuPont Approach

The P/E ratio can be decomposed to understand its drivers:

P/E=P/BROE=P/BNet Margin×Asset Turnover×Equity Multiplier\text{P/E} = \frac{\text{P/B}}{\text{ROE}} = \frac{\text{P/B}}{\text{Net Margin} \times \text{Asset Turnover} \times \text{Equity Multiplier}}

This shows that P/E depends on:

  • P/B ratio (market valuation of book value)
  • ROE (profitability)
  • Which itself depends on margins, efficiency, and leverage

Forward P/E and Growth Expectations

The relationship between forward P/E and growth can be expressed as:

Forward P/E=1−g/rr−g×(1+g)\text{Forward P/E} = \frac{1 - g/r}{r - g} \times (1 + g)

Where:

  • g$=Expectedearningsgrowthrateg\text{\$} = Expected earnings growth rate=RequiredrateofreturnThisshowshowgrowthexpectationsaffectforwardP/Eratios.<divclass="knowledge−check">∗∗KnowledgeCheck6.2∗∗AcompanyhasaP/Eratioof25xandexpectedearningsgrowthof20A.PEG=1.25,potentiallyovervaluedB.PEG=0.8,potentiallyundervaluedC.PEG=5.0,definitelyovervaluedD.PEG=1.0,fairlyvalued<details><summary>Clicktorevealanswer</summary>∗∗A.PEG=1.25,potentiallyovervalued∗∗∗∗Calculation:∗∗PEG=P/E÷GrowthRate=25÷20=∗∗1.25∗∗∗∗Interpretation:∗∗−PEG>1suggeststheP/Eratioexceedsthegrowthrate−Thecompanymaybeovervaluedrelativetoitsgrowthprospects−InvestorsarepayingmorethanthegrowthratewouldjustifyAPEGratioof1.25meansinvestorsarepaying25</details></div><divclass="practice−problem">∗∗PracticeProblem6.2:ComprehensiveP/EAnalysis∗∗Youareanalyzingthreecompaniesintheretailindustry:∗∗CompanyRetailA:∗∗−Stockprice:= Required rate of return This shows how growth expectations affect forward P/E ratios. <div class="knowledge-check"> **Knowledge Check 6.2** A company has a P/E ratio of 25x and expected earnings growth of 20% per year. What is its PEG ratio, and what does this suggest about its valuation? A. PEG = 1.25, potentially overvalued B. PEG = 0.8, potentially undervalued C. PEG = 5.0, definitely overvalued D. PEG = 1.0, fairly valued <details> <summary>Click to reveal answer</summary> **A. PEG = 1.25, potentially overvalued** **Calculation:** PEG = P/E ÷ Growth Rate = 25 ÷ 20 = **1.25** **Interpretation:** - PEG > 1 suggests the P/E ratio exceeds the growth rate - The company may be overvalued relative to its growth prospects - Investors are paying more than the growth rate would justify A PEG ratio of 1.25 means investors are paying 25% more (relative to growth) than they would for a company with PEG = 1.0. </details> </div> <div class="practice-problem"> **Practice Problem 6.2: Comprehensive P/E Analysis** You are analyzing three companies in the retail industry: **Company Retail A:** - Stock price:8billion−Shareholders′equity:8 billion - Shareholders' equity:4billion∗∗Method1:∗∗P/B=$80÷$40=∗∗2.0x∗∗∗∗Method2:∗∗P/B=4 billion **Method 1:** P/B = \text{\$}80 ÷ \text{\$}40 = **2.0x** **Method 2:** P/B =8 billion ÷ $4 billion = 2.0x

Both methods yield the same result: investors are paying 2 times the company's book value.

Let's visualize the P/B ratio calculation with enhanced detail:

Python exercise

#| label: pb-ratio-formula-enhanced
#| fig-cap: "P/B Ratio Formula: Enhanced Visualization showing P/B = Price / Book Value with Multiple Examples"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Example companies
companies = ['Premium Stock\n(High P/B)', 'Fair Value\n(P/B = 1.0)', 
             'Value Stock\n(Low P/B)', 'Company STU\n(Example)']
prices = [60, 20, 10, 80]
book_values = [20, 20, 20, 40]
pb_ratios = [p / b for p, b in zip(prices, book_values)]

# Market cap basis (for comparison)
market_caps = [6.0, 2.0, 1.0, 8.0]  # Billions
shareholders_equity = [2.0, 2.0, 2.0, 4.0]  # Billions
pb_ratios_mcap = [mc / se for mc, se in zip(market_caps, shareholders_equity)]

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('P/B Ratio Formula: P/B = Price / Book Value - Enhanced Visualization',
            fontsize=16, fontweight='bold')

# Plot 1: P/B Components
ax1 = axes[0, 0]
x = np.arange(len(companies))
width = 0.35

bars1 = ax1.bar(x - width/2, prices, width,
               label='Stock Price ($)', color='blue', alpha=0.7, edgecolor='black', linewidth=1.5)
bars2 = ax1.bar(x + width/2, book_values, width,
               label='Book Value ($)', color='green', alpha=0.7, edgecolor='black', linewidth=1.5)

ax1.set_xlabel('Company', fontsize=12, fontweight='bold')
ax1.set_ylabel('Amount ($)', fontsize=12, fontweight='bold')
ax1.set_title('P/B Ratio Components: Price and Book Value', fontsize=13, fontweight='bold')
ax1.set_xticks(x)
ax1.set_xticklabels(companies, rotation=15, ha='right')
ax1.legend(loc='best', fontsize=9)
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add P/B values on top
for i, (price, bv, pb) in enumerate(zip(prices, book_values, pb_ratios)):
    max_val = max(price, bv)
    ax1.text(i, max_val + max_val*0.1, f'P/B = {pb:.1f}x\n({price}/{bv})',
            ha='center', fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.8))

# Add formula annotation
ax1.text(0.02, 0.98, 'Formula:\nP/B = Price / Book Value\n\nExample (Company STU):\nP/B = $80 / $40\n= 2.0x',
        transform=ax1.transAxes, fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.9),
        verticalalignment='top', family='monospace')

# Plot 2: P/B Ratio Comparison
ax2 = axes[0, 1]
colors_pb = ['red' if pb < 0.75 else 'orange' if pb < 1.0 else 'green' if pb < 2.0 else 'blue' 
             for pb in pb_ratios]
bars = ax2.bar(range(len(companies)), pb_ratios,
               color=colors_pb, alpha=0.7, edgecolor='black', linewidth=1.5)
ax2.axhline(y=1.0, color='black', linestyle='--', linewidth=2, alpha=0.7, label='P/B = 1.0 (Book Value)')
ax2.set_xlabel('Company', fontsize=12, fontweight='bold')
ax2.set_ylabel('P/B Ratio (x)', fontsize=12, fontweight='bold')
ax2.set_title('P/B Ratio Comparison Across Companies', fontsize=13, fontweight='bold')
ax2.set_xticks(range(len(companies)))
ax2.set_xticklabels(companies, rotation=15, ha='right')
ax2.legend(loc='best', fontsize=9)
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, pb in zip(bars, pb_ratios):
    height = bar.get_height()
    ax2.text(bar.get_x() + bar.get_width()/2., height + 0.05,
            f'{pb:.1f}x', ha='center', va='bottom',
            fontsize=10, fontweight='bold')

# Plot 3: Market Value vs Book Value
ax3 = axes[1, 0]
# Show market value vs book value relationship
market_value_premium = [(p - b) / b * 100 for p, b in zip(prices, book_values)]

bars = ax3.bar(range(len(companies)), market_value_premium,
               color=colors_pb, alpha=0.7, edgecolor='black', linewidth=1.5)
ax3.axhline(y=0, color='black', linestyle='-', linewidth=1.5)
ax3.axhline(y=100, color='green', linestyle='--', linewidth=1.5, alpha=0.5, label='100% Premium')
ax3.axhline(y=-50, color='red', linestyle='--', linewidth=1.5, alpha=0.5, label='50% Discount')
ax3.set_xlabel('Company', fontsize=12, fontweight='bold')
ax3.set_ylabel('Market Value Premium/Discount (%)', fontsize=12, fontweight='bold')
ax3.set_title('Market Value vs. Book Value: Premium/Discount', fontsize=13, fontweight='bold')
ax3.set_xticks(range(len(companies)))
ax3.set_xticklabels(companies, rotation=15, ha='right')
ax3.legend(loc='best', fontsize=9)
ax3.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, premium in zip(bars, market_value_premium):
    height = bar.get_height()
    ax3.text(bar.get_x() + bar.get_width()/2., height + (5 if height > 0 else -5),
            f'{premium:+.0f}%', ha='center', va='bottom' if height > 0 else 'top',
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.8))

# Plot 4: Method Comparison (Price/EPS vs Market Cap/Equity)
ax4 = axes[1, 1]
x = np.arange(len(companies))
width = 0.35

bars1 = ax4.bar(x - width/2, pb_ratios, width,
               label='Method 1: Price/Book Value', color='blue', alpha=0.7, edgecolor='black', linewidth=1.5)
bars2 = ax4.bar(x + width/2, pb_ratios_mcap, width,
               label='Method 2: Market Cap/Equity', color='green', alpha=0.7,
               edgecolor='black', linewidth=1.5)

ax4.set_xlabel('Company', fontsize=12, fontweight='bold')
ax4.set_ylabel('P/B Ratio (x)', fontsize=12, fontweight='bold')
ax4.set_title('P/B Calculation: Two Equivalent Methods', fontsize=13, fontweight='bold')
ax4.set_xticks(x)
ax4.set_xticklabels(companies, rotation=15, ha='right')
ax4.legend(loc='best', fontsize=9)
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bars, pbs in [(bars1, pb_ratios), (bars2, pb_ratios_mcap)]:
    for bar, pb in zip(bars, pbs):
        height = bar.get_height()
        ax4.text(bar.get_x() + bar.get_width()/2., height + 0.05,
                f'{pb:.1f}x', ha='center', va='bottom',
                fontsize=9, fontweight='bold')

# Add annotation showing equivalence
ax4.text(0.5, 0.98, 'Both methods yield same result:\nP/B = Price/Book Value = Market Cap/Equity',
        transform=ax4.transAxes, ha='center', va='top',
        fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightgreen', alpha=0.9))

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **P/B Ratio Formula Analysis**")
print(f"{'='*70}")
print(f"Formula: P/B = Price / Book Value")
print(f"  Alternative: P/B = Market Cap / Shareholders' Equity")
print(f"  where Price = stock price per share")
print(f"        Book Value = shareholders' equity per share")
print(f"{'='*70}")
print(f"Example Companies:")
print(f"{'Company':<25} {'Price':<12} {'Book Value':<15} {'P/B Ratio':<12}")
print(f"{'-'*70}")
for i, (comp, price, bv, pb) in enumerate(zip(companies, prices, book_values, pb_ratios)):
    print(f"{comp.replace(chr(10), ' '):<25} ${price:>8.2f}   ${bv:>11.2f}   {pb:>10.1f}x")
print(f"{'='*70}")
print(f"Interpretation:")
print(f"  • P/B = 3.0x: Paying $3 for $1 of book value (premium)")
print(f"  • P/B = 1.0x: Paying $1 for $1 of book value (fair)")
print(f"  • P/B = 0.5x: Paying $0.50 for $1 of book value (discount)")
print(f"{'='*70}")
print(f"✅ P/B shows market value relative to accounting value")
print(f"✅ P/B > 1.0 = premium to book (growth/intangibles)")
print(f"✅ P/B < 1.0 = discount to book (value opportunity)")

Python exercise

#| label: fig-pb-ratio-visualization
#| fig-cap: "P/B Ratio: Understanding Market Price Relative to Book Value"
#| fig-width: 14
#| fig-height: 8

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import matplotlib.pyplot as plt
from IPython.display import display
import numpy as np

# Create figure
fig, axes = plt.subplots(1, 2, figsize=(16, 8))
fig.suptitle('Price-to-Book (P/B) Ratio: Market Value vs. Book Value', fontsize=16, fontweight='bold')

# Left plot: P/B ratio calculation breakdown
ax1 = axes[0]

# Example companies with different P/B ratios
companies = ['Premium Stock\n(P/B = 3.0x)', 'Fair Value\n(P/B = 1.0x)', 'Value Stock\n(P/B = 0.5x)']
prices = [60, 20, 10]
book_values = [20, 20, 20]
pb_ratios = [p/b for p, b in zip(prices, book_values)]

# Create grouped bar chart
x = np.arange(len(companies))
width = 0.35

bars1 = ax1.bar(x - width/2, prices, width, label='Market Price ($)', color='#2E86AB', alpha=0.8)
bars2 = ax1.bar(x + width/2, book_values, width, label='Book Value ($)', color='#A23B72', alpha=0.8)

ax1.set_xlabel('Stock', fontsize=12, fontweight='bold')
ax1.set_ylabel('Value ($)', fontsize=12, fontweight='bold')
ax1.set_title('P/B Ratio Components: Market Price vs. Book Value', fontsize=13, fontweight='bold')
ax1.set_xticks(x)
ax1.set_xticklabels(companies)
ax1.legend(fontsize=10)
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add P/B ratio labels
for i, (price, bv, pb) in enumerate(zip(prices, book_values, pb_ratios)):
    ax1.text(i, max(price, bv) + 3, f'P/B = {pb:.1f}x', 
             ha='center', fontsize=9, fontweight='bold',
             bbox=dict(boxstyle='round', facecolor='wheat', alpha=0.7))
    # Add line showing difference
    if price > bv:
        ax1.plot([i, i], [bv, price], 'g--', linewidth=2, alpha=0.5)
        ax1.text(i, (price + bv)/2, f'+${price-bv}', ha='center', fontsize=8, color='green', fontweight='bold')
    elif price < bv:
        ax1.plot([i, i], [price, bv], 'r--', linewidth=2, alpha=0.5)
        ax1.text(i, (price + bv)/2, f'-${bv-price}', ha='center', fontsize=8, color='red', fontweight='bold')

# Right plot: P/B ratio categories
ax2 = axes[1]

# P/B ratio ranges
pb_categories = ['Very High\n(3x+)', 'High\n(2-3x)', 'Moderate\n(1-2x)', 'At Book\n(1.0x)', 'Below Book\n(<1.0x)']
pb_midpoints = [4.0, 2.5, 1.5, 1.0, 0.5]
colors_pb = ['#FF6B6B', '#FFA07A', '#4ECDC4', '#45B7D1', '#96CEB4']

bars = ax2.barh(pb_categories, pb_midpoints, color=colors_pb, alpha=0.8, edgecolor='black', linewidth=1.5)
ax2.set_xlabel('P/B Ratio (x)', fontsize=12, fontweight='bold')
ax2.set_title('P/B Ratio Categories and Interpretation', fontsize=13, fontweight='bold')
ax2.grid(True, alpha=0.3, linestyle='--', axis='x')
ax2.set_xlim(0, 4.5)
ax2.axvline(x=1.0, color='black', linestyle='--', linewidth=2, alpha=0.5, label='Book Value')

# Add value labels
for bar, val in zip(bars, pb_midpoints):
    width = bar.get_width()
    ax2.text(width + 0.1, bar.get_y() + bar.get_height()/2,
             f'{val:.1f}x', fontsize=10, fontweight='bold', va='center')

# Add interpretation annotations
interpretations = ['Premium\nValuation', 'Growth\nExpected', 'Fair\nValue', 'At Book\nValue', 'Value\nOpportunity']
for i, (bar, interp) in enumerate(zip(bars, interpretations)):
    ax2.text(-0.3, bar.get_y() + bar.get_height()/2,
             interp, fontsize=9, fontweight='bold', va='center', ha='right',
             bbox=dict(boxstyle='round', facecolor='white', alpha=0.7))

ax2.legend(fontsize=9)

# Add formula
fig.text(0.5, 0.02, 'P/B Ratio = Stock Price ÷ Book Value Per Share = Market Capitalization ÷ Shareholders\' Equity', 
         ha='center', fontsize=13, fontweight='bold',
         bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.8))

plt.tight_layout()
display(fig)
plt.close(fig)

Understanding Book Value

What is Book Value?

Book value (also called shareholders' equity or net asset value) represents the accounting value of a company's equity. It's calculated as:

Book Value=Total Assets−Total Liabilities=Shareholders’ Equity\text{Book Value} = \text{Total Assets} - \text{Total Liabilities} = \text{Shareholders' Equity}

Components of Book Value:

  • Common Stock: Par value of issued shares
  • Additional Paid-In Capital: Amount paid above par value
  • Retained Earnings: Cumulative profits not paid as dividends
  • Treasury Stock: Shares repurchased (reduces book value)
  • Accumulated Other Comprehensive Income: Unrealized gains/losses

Book Value vs. Market Value

Book Value (Accounting Value):

  • Based on historical cost accounting
  • Reflects assets at purchase price (less depreciation)
  • May not reflect current market values
  • Conservative measure of asset values

Market Value (Market Capitalization):

  • Based on current stock price
  • Reflects market's assessment of company value
  • Includes expectations about future prospects
  • Can be significantly different from book value

Key Insight: The difference between market value and book value reflects:

  • Intangible value: Brand, reputation, intellectual property
  • Growth expectations: Future earnings potential
  • Market sentiment: Optimism or pessimism
  • Asset appreciation: Assets worth more than book value

Interpreting P/B Ratios

What Does a P/B Ratio Mean?

P/B = 1.0x:

  • Stock trades at exactly book value
  • Market value equals accounting value
  • May indicate fair valuation or undervaluation

P/B > 1.0x (Premium to Book):

  • Market values company above book value
  • May indicate:
    • Strong intangible assets (brand, IP)
    • High growth expectations
    • Superior profitability (ROE)
    • Overvaluation (if fundamentals don't justify)

P/B < 1.0x (Discount to Book):

  • Market values company below book value
  • May indicate:
    • Assets overstated on balance sheet
    • Poor profitability
    • Declining business
    • Undervaluation opportunity (if company is healthy)

Typical P/B Ratio Ranges

High P/B (2.0x - 5.0x+):

  • Growth companies with strong intangibles
  • Technology companies (software, biotech)
  • Companies with strong brands
  • High-ROE companies

Moderate P/B (1.0x - 2.0x):

  • Mature, stable companies
  • Asset-heavy companies (manufacturing, utilities)
  • Companies with moderate growth

Low P/B (< 1.0x):

  • Value stocks
  • Companies in decline
  • Financial companies (banks, insurance)
  • Asset-heavy companies with low ROE

The Relationship Between P/B and ROE

One of the most important insights in equity valuation is the relationship between P/B ratio and Return on Equity (ROE). This relationship is fundamental to understanding why some companies trade at premiums to book value while others trade at discounts.

The Fundamental Relationship

P/B Ratio=P/E RatioROE\text{P/B Ratio} = \frac{\text{P/E Ratio}}{\text{ROE}}

This can be rearranged to show:

P/B Ratio=ROE−gr−g×(1+g)ROE\text{P/B Ratio} = \frac{\text{ROE} - g}{r - g} \times \frac{(1 + g)}{ROE}

Where:

  • g$=Expectedgrowthrateg\text{\$} = Expected growth raterrequired=Required rate of returnr_{required} = \text{Required rate of return}8−P/B:0.4x(8 - P/B: 0.4x (8÷$20)8 ÷ \text{\$}20)8 ÷ $1.00)

Analysis:

  • Higher ROE → Higher P/B ratio
  • Company High ROE (25% ROE) trades at 3.0x book value
  • Company Low ROE (5% ROE) trades at 0.4x book value
  • The market rewards profitability with valuation premiums

Let's visualize the P/B vs. ROE relationship in detail:

Python exercise

#| label: pb-roe-relationship-enhanced
#| fig-cap: "P/B vs. ROE: Enhanced visualization showing relationship between P/B and ROE with formula"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Example companies from the text
companies = ['High ROE\n(25%)', 'Moderate ROE\n(15%)', 'Low ROE\n(5%)']
book_values = [20, 20, 20]
roes = [0.25, 0.15, 0.05]
eps_values = [bv * roe for bv, roe in zip(book_values, roes)]
prices = [60, 30, 8]
pb_ratios = [p / bv for p, bv in zip(prices, book_values)]
pe_ratios = [p / eps for p, eps in zip(prices, eps_values)]

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('P/B vs. ROE Relationship: How Profitability Drives Valuation Premium',
            fontsize=16, fontweight='bold')

# Plot 1: P/B vs. ROE Scatter
ax1 = axes[0, 0]
# Create smooth curve showing relationship
roe_range = np.linspace(0.05, 0.30, 100)
# Simplified: P/B ≈ ROE × multiplier (for constant P/E)
# Using P/B = P/E / ROE relationship, with P/E ≈ 12 for simplicity
constant_pe = 12
pb_by_roe = constant_pe / roe_range

ax1.plot(roe_range * 100, pb_by_roe, 'b-', linewidth=3, alpha=0.7, 
        label=f'P/B = P/E / ROE\n(assuming P/E ≈ {constant_pe}x)')
ax1.scatter([r * 100 for r in roes], pb_ratios, s=200, c=['green', 'orange', 'red'],
           alpha=0.8, edgecolor='black', linewidth=2, zorder=5)

# Add annotations for companies
for i, (comp, roe, pb, pe) in enumerate(zip(companies, roes, pb_ratios, pe_ratios)):
    ax1.annotate(f'{comp}\nROE: {roe*100:.0f}%\nP/B: {pb:.1f}x\nP/E: {pe:.0f}x',
                xy=(roe * 100, pb), xytext=(roe * 100 + 2, pb + 0.3),
                fontsize=9, fontweight='bold',
                bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.9),
                arrowprops=dict(arrowstyle='->', color='black', lw=1.5))

ax1.set_xlabel('Return on Equity (ROE) (%)', fontsize=12, fontweight='bold')
ax1.set_ylabel('P/B Ratio (x)', fontsize=12, fontweight='bold')
ax1.set_title('P/B Ratio vs. ROE: Higher ROE → Higher P/B', fontsize=13, fontweight='bold')
ax1.grid(True, alpha=0.3, linestyle='--')
ax1.legend(loc='upper right', fontsize=9)

# Add formula annotation
ax1.text(0.02, 0.98, 'Formula:\nP/B = P/E / ROE\n\nRearranged:\nP/E = P/B × ROE',
        transform=ax1.transAxes, fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.9),
        verticalalignment='top', family='monospace')

# Plot 2: ROE Impact on P/B (Bar Chart)
ax2 = axes[0, 1]
colors_roe = ['green' if roe > 0.20 else 'orange' if roe > 0.10 else 'red' 
              for roe in roes]
bars = ax2.bar(range(len(companies)), pb_ratios,
               color=colors_roe, alpha=0.7, edgecolor='black', linewidth=1.5)
ax2.axhline(y=1.0, color='black', linestyle='--', linewidth=2, alpha=0.7, 
           label='P/B = 1.0 (Book Value)')
ax2.set_xlabel('Company', fontsize=12, fontweight='bold')
ax2.set_ylabel('P/B Ratio (x)', fontsize=12, fontweight='bold')
ax2.set_title('P/B Ratio by ROE Level', fontsize=13, fontweight='bold')
ax2.set_xticks(range(len(companies)))
ax2.set_xticklabels(companies)
ax2.legend(loc='best', fontsize=9)
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels with ROE
for bar, pb, roe in zip(bars, pb_ratios, roes):
    height = bar.get_height()
    ax2.text(bar.get_x() + bar.get_width()/2., height + 0.1,
            f'P/B: {pb:.1f}x\nROE: {roe*100:.0f}%', ha='center', va='bottom',
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Plot 3: P/E, P/B, ROE Relationship
ax3 = axes[1, 0]
# Show the three-way relationship
x = np.arange(len(companies))
width = 0.25

bars1 = ax3.bar(x - width, pe_ratios, width,
               label='P/E Ratio (x)', color='blue', alpha=0.7, edgecolor='black', linewidth=1.5)
bars2 = ax3.bar(x, pb_ratios, width,
               label='P/B Ratio (x)', color='green', alpha=0.7, edgecolor='black', linewidth=1.5)
bars3 = ax3.bar(x + width, [r * 100 for r in roes], width,
               label='ROE (%)', color='purple', alpha=0.7, edgecolor='black', linewidth=1.5)

ax3.set_xlabel('Company', fontsize=12, fontweight='bold')
ax3.set_ylabel('Value', fontsize=12, fontweight='bold')
ax3.set_title('P/E, P/B, and ROE: The Three-Way Relationship', fontsize=13, fontweight='bold')
ax3.set_xticks(x)
ax3.set_xticklabels(companies)
ax3.legend(loc='upper left', fontsize=9)
ax3.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add verification labels showing P/E = P/B × ROE
for i, (pe, pb, roe) in enumerate(zip(pe_ratios, pb_ratios, roes)):
    calculated_pe = pb * roe * 100  # Convert ROE to percentage for calculation
    ax3.text(i, max(pe, pb, roe * 100) + 5,
            f'P/E = P/B × ROE\n{pe:.1f} ≈ {pb:.1f} × {roe*100:.0f}%',
            ha='center', fontsize=8, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.8))

# Plot 4: ROE Zones and P/B Interpretation
ax4 = axes[1, 1]
# Create ROE zones
roe_zones = np.linspace(5, 30, 100)
# Simplified P/B calculation based on ROE
# Using practical relationship: P/B tends to be higher for higher ROE
pb_by_roe_zones = [5 + (roe - 5) * 0.15 for roe in roe_zones]  # Simplified relationship

ax4.plot(roe_zones, pb_by_roe_zones, 'g-', linewidth=3, alpha=0.7, 
        label='Typical P/B for ROE Level')
ax4.fill_between(roe_zones, 0, pb_by_roe_zones, alpha=0.2, color='green')

# Mark zones
ax4.axvspan(20, 30, alpha=0.2, color='green', label='High ROE Zone (20-30%)')
ax4.axvspan(10, 20, alpha=0.2, color='orange', label='Moderate ROE Zone (10-20%)')
ax4.axvspan(5, 10, alpha=0.2, color='red', label='Low ROE Zone (5-10%)')

# Plot our example companies
ax4.scatter([r * 100 for r in roes], pb_ratios, s=200, c=['green', 'orange', 'red'],
           alpha=0.8, edgecolor='black', linewidth=2, zorder=5, label='Example Companies')

ax4.set_xlabel('Return on Equity (ROE) (%)', fontsize=12, fontweight='bold')
ax4.set_ylabel('P/B Ratio (x)', fontsize=12, fontweight='bold')
ax4.set_title('ROE Zones and Expected P/B Ratios', fontsize=13, fontweight='bold')
ax4.grid(True, alpha=0.3, linestyle='--')
ax4.legend(loc='upper left', fontsize=9)

# Add interpretation text
ax4.text(0.02, 0.98, 'Key Insight:\n• High ROE (20%+) → High P/B (2-5x)\n• Moderate ROE (10-20%) → Moderate P/B (1-2x)\n• Low ROE (<10%) → Low P/B (<1x)\n\nMarket rewards efficiency!',
        transform=ax4.transAxes, fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightyellow', alpha=0.9),
        verticalalignment='top', family='monospace')

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **P/B vs. ROE Relationship Analysis**")
print(f"{'='*70}")
print(f"Fundamental Relationship: P/B = P/E / ROE")
print(f"  Rearranged: P/E = P/B × ROE")
print(f"{'='*70}")
print(f"Example Companies (same book value, different ROE):")
print(f"{'Company':<25} {'ROE':<10} {'EPS':<12} {'Price':<12} {'P/B':<10} {'P/E':<10}")
print(f"{'-'*70}")
for i, (comp, roe, eps, price, pb, pe) in enumerate(zip(companies, roes, eps_values, prices, pb_ratios, pe_ratios)):
    print(f"{comp.replace(chr(10), ' '):<25} {roe*100:>8.0f}%   ${eps:>8.2f}   ${price:>8.2f}   {pb:>8.1f}x   {pe:>8.0f}x")
print(f"{'='*70}")
print(f"Key Insights:")
print(f"  • Higher ROE → Higher P/B ratio")
print(f"  • Company with 25% ROE trades at 3.0x book value")
print(f"  • Company with 5% ROE trades at 0.4x book value")
print(f"  • Market rewards profitability with valuation premiums")
print(f"{'='*70}")
print(f"✅ P/B = P/E / ROE (fundamental relationship)")
print(f"✅ High ROE companies justify premium P/B ratios")
print(f"✅ Low ROE companies trade at discount to book value")
print(f"✅ Understanding ROE helps interpret P/B ratios")

Python exercise

#| label: fig-pb-roe-relationship
#| fig-cap: "P/B vs. ROE Relationship: How Profitability Drives Valuation Premium"
#| fig-width: 14
#| fig-height: 8

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import matplotlib.pyplot as plt
from IPython.display import display
import numpy as np

# Create figure
fig, axes = plt.subplots(1, 2, figsize=(16, 8))
fig.suptitle('P/B Ratio and ROE Relationship: How Profitability Drives Market Valuation', fontsize=16, fontweight='bold')

# Left plot: P/B vs ROE scatter with trend
ax1 = axes[0]

# Example companies with same book value but different ROE
roe_values = [5, 15, 25]
pe_ratios = [8, 10, 12]  # Assumed P/E ratios
pb_ratios = [pe/roe*100 for pe, roe in zip(pe_ratios, roe_values)]  # P/B = P/E / ROE

# Create scatter plot
ax1.scatter(roe_values, pb_ratios, s=400, c=['#45B7D1', '#4ECDC4', '#FF6B6B'], 
            alpha=0.8, edgecolors='black', linewidth=2, zorder=3)

# Add trend line
x_trend = np.linspace(5, 30, 100)
pe_avg = np.mean(pe_ratios)
y_trend = pe_avg / x_trend * 100
ax1.plot(x_trend, y_trend, 'b--', linewidth=2, alpha=0.5, label='P/B = P/E ÷ ROE', zorder=1)

# Add labels
labels = ['Low ROE\n(5%)', 'Moderate ROE\n(15%)', 'High ROE\n(25%)']
for i, (roe, pb, label) in enumerate(zip(roe_values, pb_ratios, labels)):
    ax1.annotate(label, (roe, pb), xytext=(8, 8), textcoords='offset points',
                fontsize=9, fontweight='bold',
                bbox=dict(boxstyle='round', facecolor='white', alpha=0.8))

ax1.set_xlabel('Return on Equity (ROE, %)', fontsize=12, fontweight='bold')
ax1.set_ylabel('P/B Ratio (x)', fontsize=12, fontweight='bold')
ax1.set_title('P/B Ratio vs. ROE: Higher ROE → Higher P/B', fontsize=13, fontweight='bold')
ax1.grid(True, alpha=0.3, linestyle='--', zorder=0)
ax1.legend(fontsize=10)
ax1.set_xlim(0, 30)
ax1.set_ylim(0, 3)

# Right plot: Component breakdown showing the relationship
ax2 = axes[1]

# Create grouped bar chart showing components
companies = ['Low ROE\n(5%)', 'Moderate ROE\n(15%)', 'High ROE\n(25%)']
x = np.arange(len(companies))
width = 0.25

bars1 = ax2.bar(x - width, roe_values, width, label='ROE (%)', color='#4ECDC4', alpha=0.8, edgecolor='black', linewidth=1.5)
bars2 = ax2.bar(x, pe_ratios, width, label='P/E Ratio (x)', color='#2E86AB', alpha=0.8, edgecolor='black', linewidth=1.5)
bars3 = ax2.bar(x + width, pb_ratios, width, label='P/B Ratio (x)', color='#A23B72', alpha=0.8, edgecolor='black', linewidth=1.5)

ax2.set_xlabel('Company', fontsize=12, fontweight='bold')
ax2.set_ylabel('Value', fontsize=12, fontweight='bold')
ax2.set_title('P/B = P/E ÷ ROE Relationship', fontsize=13, fontweight='bold')
ax2.set_xticks(x)
ax2.set_xticklabels(companies)
ax2.legend(fontsize=10)
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add formula annotations
for i, (roe, pe, pb) in enumerate(zip(roe_values, pe_ratios, pb_ratios)):
    ax2.text(i, max(roe, pe, pb) + 2, f'P/B = {pe:.0f} ÷ {roe:.0f}%\n= {pb:.1f}x', 
             ha='center', fontsize=9, fontweight='bold',
             bbox=dict(boxstyle='round', facecolor='wheat', alpha=0.7))

# Add formula
fig.text(0.5, 0.02, 'P/B Ratio = P/E Ratio ÷ ROE  |  Higher ROE allows higher P/B ratio for same P/E', 
         ha='center', fontsize=13, fontweight='bold',
         bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.8))

plt.tight_layout()
display(fig)
plt.close(fig)

Drivers of P/B Ratios

Understanding what drives P/B ratios helps analysts assess whether a P/B ratio is justified or indicates misvaluation.

1. Return on Equity (ROE)

Higher ROE → Higher P/B

This is the most important driver. Companies that generate high returns on equity can justify premium P/B ratios.

Mathematical Relationship:

  • If ROE = 20% and P/E = 15x, then P/B = 15 ÷ 20 = 0.75x
  • If ROE = 20% and P/E = 20x, then P/B = 20 ÷ 20 = 1.0x
  • If ROE = 20% and P/E = 30x, then P/B = 30 ÷ 20 = 1.5x

Key Insight: For a given P/E ratio, higher ROE leads to higher P/B.

2. Growth Rate

Higher growth → Higher P/B

Companies with higher expected growth rates typically command higher P/B ratios, as investors value future earnings growth.

3. Risk Profile

Higher risk → Lower P/B

Riskier companies require higher returns, which reduces present value and lowers P/B ratios.

4. Asset Intensity

Asset-heavy companies → Lower P/B
Asset-light companies → Higher P/B

Companies with many tangible assets (manufacturing, utilities) often trade closer to book value. Companies with few tangible assets but valuable intangibles (technology, services) often trade at significant premiums to book value.

5. Industry Characteristics

Different industries have different typical P/B ratios:

High P/B Industries:

  • Technology (intangible assets, high growth)
  • Consumer discretionary (brands, growth)
  • Healthcare (intellectual property)

Low P/B Industries:

  • Financials (regulatory capital requirements)
  • Utilities (asset-heavy, regulated)
  • Energy (commodity-driven, asset-heavy)

P/B Ratio Analysis Methods

Cross-Sectional Analysis: Comparing Companies

Step 1: Identify Comparable Companies

  • Same industry
  • Similar asset structure
  • Similar business model

Step 2: Calculate P/B Ratios

  • Use consistent methodology
  • Ensure comparable book value definitions

Step 3: Analyze ROE Differences

  • Compare ROE across companies
  • Higher ROE should justify higher P/B
  • If P/B is high but ROE is low, investigate why

Step 4: Assess Fair Value

  • Is the P/B ratio justified by ROE and growth?
  • Does the company deserve a premium or discount?

Example: Cross-Sectional P/B Analysis

Three companies in the banking industry:

Bank A:

  • P/B: 2.0x
  • ROE: 18%
  • Growth: 8%

Bank B:

  • P/B: 1.2x
  • ROE: 12%
  • Growth: 5%

Bank C:

  • P/B: 0.8x
  • ROE: 8%
  • Growth: 2%

Analysis:

  • Bank A's high P/B (2.0x) is justified by high ROE (18%)
  • Bank B's moderate P/B (1.2x) matches moderate ROE (12%)
  • Bank C's low P/B (0.8x) reflects low ROE (8%)

P/E Calculation (using P/B = P/E ÷ ROE):

  • Bank A: P/E = 2.0 × 18 = 36x
  • Bank B: P/E = 1.2 × 12 = 14.4x
  • Bank C: P/E = 0.8 × 8 = 6.4x

Bank A commands a premium because of its superior profitability.

Analyzing a company's P/B ratio over time reveals valuation trends:

High P/B Relative to History:

  • May indicate overvaluation
  • May reflect improved profitability (higher ROE)
  • May indicate market optimism

Low P/B Relative to History:

  • May indicate undervaluation
  • May reflect deteriorating profitability (lower ROE)
  • May indicate market pessimism

P/B Ratio for Different Company Types

Financial Companies (Banks, Insurance)

Characteristics:

  • Asset-heavy (loans, investments)
  • Regulatory capital requirements
  • Book value is more relevant (assets are marked-to-market)
  • Typically trade closer to book value (P/B 0.8x - 1.5x)

Why P/B Matters:

  • Book value reflects regulatory capital
  • Asset values are more accurately measured
  • ROE is crucial driver

Technology Companies

Characteristics:

  • Asset-light (few tangible assets)
  • High intangible value (IP, software, brands)
  • High growth potential
  • Typically trade at high P/B ratios (2.0x - 10x+)

Why P/B Less Relevant:

  • Book value understates true value
  • Intangible assets not fully reflected
  • Growth and earnings matter more

Asset-Heavy Companies (Manufacturing, Utilities)

Characteristics:

  • Many tangible assets (PP&E)
  • Asset values reflected in book value
  • Lower growth rates
  • Typically trade closer to book value (P/B 1.0x - 2.0x)

Why P/B Relevant:

  • Assets are tangible and measurable
  • Book value reflects asset base
  • Useful for liquidation analysis

Adjusted Book Value and Tangible Book Value

Tangible Book Value

For companies with significant intangible assets (goodwill, patents), tangible book value may be more relevant:

Tangible Book Value=Book Value−Intangible Assets\text{Tangible Book Value} = \text{Book Value} - \text{Intangible Assets}

Price-to-Tangible Book=Stock PriceTangible Book Value Per Share\text{Price-to-Tangible Book} = \frac{\text{Stock Price}}{\text{Tangible Book Value Per Share}}

Use Case: Companies with large acquisitions (goodwill) or asset write-downs.

Adjusted Book Value

Adjusted book value modifies book value to reflect current market values:

Adjusted Book Value=Book Value+Adjustments\text{Adjusted Book Value} = \text{Book Value} + \text{Adjustments}

Common adjustments:

  • Mark assets to market value
  • Remove overstated assets
  • Add off-balance-sheet assets
  • Adjust for hidden liabilities

Limitations of P/B Ratios

P/B ratios have significant limitations that can make them misleading if not used carefully. Understanding these limitations is crucial for effective valuation analysis, as blindly applying P/B ratios without considering their weaknesses can lead to incorrect investment decisions.

1. Accounting Distortions

Historical Cost Accounting creates the most fundamental limitation of P/B ratios. Assets are recorded at purchase price on the balance sheet, not at current market value. This means that a company that bought land 20 years ago for 1million(orless,afterdepreciation),eventhoughit′snowworth1 million (or less, after depreciation), even though it's now worthV0V_0=Intrinsicvaluetoday−= Intrinsic value today -CFtCF_t=Cashflowinperiod= Cash flow in periodt$t\text{\$}r$=Discountrate(requiredrateofreturn)r\text{\$} = Discount rate (required rate of return)n$=Numberofperiodsinexplicitforecastn\text{\$} = Number of periods in explicit forecastTVnTV_n=Terminalvalueatperiod= Terminal value at periodn$

For a going concern (company that continues indefinitely), this becomes:

V0=∑t=1∞CFt(1+r)tV_0 = \sum_{t=1}^{\infty} \frac{CF_t}{(1 + r)^t}

This infinite series can be solved using various terminal value methods, which we'll explore in detail.

Let's visualize the DCF formula with a comprehensive example:

Python exercise

#| label: dcf-formula-enhanced
#| fig-cap: "DCF Formula: Enhanced visualization showing V_0 = Σ[CF_t/(1+r)^t] + TV_n/(1+r)^n"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Example DCF calculation
wacc = 0.10  # 10% WACC
years = [1, 2, 3, 4, 5]
fcff_values = [100, 110, 121, 133, 146]  # Growing cash flows (10% growth)
terminal_growth = 0.03  # 3% perpetual growth

# Calculate PV of explicit period cash flows
pv_fcff = [cf / ((1 + wacc) ** t) for t, cf in zip(years, fcff_values)]
sum_pv_fcff = sum(pv_fcff)

# Calculate terminal value (using perpetuity growth model)
terminal_value = (fcff_values[-1] * (1 + terminal_growth)) / (wacc - terminal_growth)
pv_terminal = terminal_value / ((1 + wacc) ** len(years))

# Enterprise value
enterprise_value = sum_pv_fcff + pv_terminal

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('DCF Formula: V₀ = Σ[CF_t/(1+r)^t] + TV_n/(1+r)^n - Enhanced Visualization',
            fontsize=16, fontweight='bold')

# Plot 1: Cash Flow Timeline
ax1 = axes[0, 0]
x_pos = np.arange(len(years) + 1)
all_cf = fcff_values + [terminal_value]
colors_timeline = ['#4ECDC4'] * len(years) + ['#FF6B6B']
bars = ax1.bar(x_pos, [cf/10 for cf in all_cf], color=colors_timeline, alpha=0.7,
               edgecolor='black', linewidth=1.5)

# Add PV annotations
for i, (year, cf, pv) in enumerate(zip(years, fcff_values, pv_fcff)):
    height = bars[i].get_height() * 10
    ax1.text(i, height/10 + 5, f'CF_{year}: ${cf}M\nPV: ${pv:.1f}M',
            ha='center', fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Terminal value annotation
ax1.text(len(years), terminal_value/10 + 10, f'TV: ${terminal_value:.0f}M\nPV: ${pv_terminal:.0f}M',
        ha='center', fontsize=9, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightyellow', alpha=0.9))

ax1.set_xlabel('Period', fontsize=12, fontweight='bold')
ax1.set_ylabel('Cash Flow ($ Millions)', fontsize=12, fontweight='bold')
ax1.set_title('DCF Cash Flow Timeline: Explicit Period + Terminal Value', fontsize=13, fontweight='bold')
ax1.set_xticks(x_pos)
ax1.set_xticklabels(['Y1', 'Y2', 'Y3', 'Y4', 'Y5', 'TV'])
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add divider
ax1.axvline(x=4.5, color='red', linestyle='--', linewidth=2, alpha=0.7, label='End of Explicit Period')
ax1.legend(loc='upper left', fontsize=9)

# Plot 2: Present Value Components
ax2 = axes[0, 1]
components = ['PV(Explicit\nPeriod)', 'PV(Terminal\nValue)', 'Enterprise\nValue']
values = [sum_pv_fcff, pv_terminal, enterprise_value]
colors_comp = ['#4ECDC4', '#FF6B6B', '#45B7D1']
bars = ax2.bar(components, values, color=colors_comp, alpha=0.7, edgecolor='black', linewidth=1.5)
ax2.set_ylabel('Present Value ($ Millions)', fontsize=12, fontweight='bold')
ax2.set_title('DCF Value Breakdown', fontsize=13, fontweight='bold')
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, val in zip(bars, values):
    height = bar.get_height()
    pct = (val / enterprise_value) * 100
    ax2.text(bar.get_x() + bar.get_width()/2., height + 10,
            f'${val:.0f}M\n({pct:.1f}%)', ha='center', va='bottom',
            fontsize=10, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add formula annotation
ax2.text(0.5, 0.98, f'Formula:\nV₀ = Σ[CF_t/(1+r)^t] + TV_n/(1+r)^n\n\n= ${sum_pv_fcff:.0f}M + ${pv_terminal:.0f}M\n= ${enterprise_value:.0f}M',
        transform=ax2.transAxes, ha='center', va='top',
        fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.9),
        family='monospace')

# Plot 3: Discount Factor Over Time
ax3 = axes[1, 0]
discount_factors = [1 / ((1 + wacc) ** t) for t in years]
ax3.plot(years, discount_factors, 'b-o', linewidth=3, markersize=10, alpha=0.8,
        label=f'Discount Factor = 1/(1+r)^t\n(r = {wacc*100:.0f}%)')
ax3.fill_between(years, 0, discount_factors, alpha=0.3, color='blue')

# Add value labels
for year, df in zip(years, discount_factors):
    ax3.annotate(f'{df:.3f}', xy=(year, df), xytext=(year, df + 0.02),
                fontsize=9, fontweight='bold',
                bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.8),
                ha='center')

ax3.set_xlabel('Year (t)', fontsize=12, fontweight='bold')
ax3.set_ylabel('Discount Factor', fontsize=12, fontweight='bold')
ax3.set_title('Discount Factor: How Time Affects Present Value', fontsize=13, fontweight='bold')
ax3.grid(True, alpha=0.3, linestyle='--')
ax3.legend(loc='upper right', fontsize=9)
ax3.set_ylim(0, 1.1)

# Plot 4: Individual PV Contributions
ax4 = axes[1, 1]
bars = ax4.bar(range(len(years)), pv_fcff,
                    color=plt.cm.viridis(np.linspace(0.2, 0.8, len(years))),
                    alpha=0.7, edgecolor='black', linewidth=1.5)
ax4.axhline(y=sum_pv_fcff, color='red', linestyle='--', linewidth=2, alpha=0.7,
           label=f'Sum: ${sum_pv_fcff:.0f}M')

# Add value labels
for i, (bar, cf, pv) in enumerate(zip(bars, fcff_values, pv_fcff)):
    height = bar.get_height()
    ax4.text(bar.get_x() + bar.get_width()/2., height + 5,
            f'CF_{years[i]}: ${cf}M\nPV: ${pv:.1f}M',
            ha='center', va='bottom',
            fontsize=8, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

ax4.set_xlabel('Year', fontsize=12, fontweight='bold')
ax4.set_ylabel('Present Value ($ Millions)', fontsize=12, fontweight='bold')
ax4.set_title('Individual Present Value Contributions', fontsize=13, fontweight='bold')
ax4.set_xticks(range(len(years)))
ax4.set_xticklabels([f'Year {y}' for y in years])
ax4.legend(loc='upper right', fontsize=9)
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **DCF Formula Analysis**")
print(f"{'='*70}")
print(f"Formula: V₀ = Σ[CF_t/(1+r)^t] + TV_n/(1+r)^n")
print(f"  where V₀ = intrinsic value today")
print(f"        CF_t = cash flow in period t")
print(f"        r = discount rate (WACC)")
print(f"        TV_n = terminal value at period n")
print(f"{'='*70}")
print(f"Example DCF Calculation:")
print(f"  WACC (discount rate): {wacc*100:.0f}%")
print(f"  Terminal growth rate: {terminal_growth*100:.0f}%")
print(f"{'='*70}")
print(f"Explicit Period Cash Flows:")
print(f"{'Year':<10} {'Cash Flow':<15} {'Discount Factor':<20} {'Present Value':<15}")
print(f"{'-'*70}")
discount_factors = [1 / ((1 + wacc) ** t) for t in years]
for year, cf, df, pv in zip(years, fcff_values, discount_factors, pv_fcff):
    print(f"{year:<10} ${cf:>10.0f}M   {df:>15.3f}   ${pv:>10.1f}M")
print(f"{'='*70}")
print(f"Terminal Value:")
print(f"  TV = CF_5 × (1+g) / (r - g)")
print(f"  TV = ${fcff_values[-1]:.0f}M × (1+{terminal_growth:.2f}) / ({wacc:.2f} - {terminal_growth:.2f})")
print(f"  TV = ${terminal_value:.0f}M")
print(f"  PV(TV) = ${terminal_value:.0f}M / (1+{wacc:.2f})^{len(years)} = ${pv_terminal:.0f}M")
print(f"{'='*70}")
print(f"Enterprise Value:")
print(f"  V₀ = PV(Explicit) + PV(Terminal)")
print(f"  V₀ = ${sum_pv_fcff:.0f}M + ${pv_terminal:.0f}M")
print(f"  V₀ = ${enterprise_value:.0f}M")
print(f"{'='*70}")
print(f"✅ DCF estimates intrinsic value from cash flows")
print(f"✅ Higher discount rate → Lower present value")
print(f"✅ Terminal value often dominates (70-80% of value)")
print(f"✅ DCF is most theoretically sound valuation method")

Types of Cash Flows in DCF Models

DCF models can use different definitions of cash flows, each with specific applications and advantages. The choice between Free Cash Flow to Firm (FCFF) and Free Cash Flow to Equity (FCFE) depends on your analysis objectives and the company's capital structure. Understanding the difference is crucial for building accurate DCF models.

1. Free Cash Flow to Firm (FCFF)

Free Cash Flow to Firm represents cash flow available to all providers of capital (both debt and equity holders). Think of it as the cash that the business generates from operations, before considering how that cash is distributed between debt holders and equity holders. FCFF is independent of the company's capital structure - it doesn't matter whether the company is financed with debt or equity; FCFF measures the cash generated by the business itself.

The calculation starts with operating income (EBIT), applies the tax rate to get after-tax operating income, adds back non-cash expenses like depreciation, and then subtracts capital expenditures and changes in working capital. This yields the cash that the business generates, which is available to pay both debt holders (interest and principal) and equity holders (dividends and share repurchases).

FCFF=EBIT×(1−Tax Rate)+Depreciation−Capital Expenditures−ΔWorking Capital\text{FCFF} = \text{EBIT} \times (1 - \text{Tax Rate}) + \text{Depreciation} - \text{Capital Expenditures} - \Delta \text{Working Capital}

Characteristics:

FCFF has several important characteristics. It measures cash available to all capital providers - both debt and equity holders. It's independent of capital structure - the same business will generate the same FCFF regardless of how it's financed. This makes FCFF useful for comparing companies with different debt levels. FCFF is used with Weighted Average Cost of Capital (WACC) as the discount rate, because WACC reflects the cost of all capital (both debt and equity). Discounting FCFF at WACC results in Enterprise Value - the value of the entire firm, which you then adjust for debt and cash to get equity value.

2. Free Cash Flow to Equity (FCFE)

Free Cash Flow to Equity represents cash flow available to equity holders after all obligations to debt holders have been met. Unlike FCFF, which measures cash generated by the business, FCFE measures cash that actually flows to equity holders. This means FCFE depends on the company's capital structure - companies with more debt will have different FCFE than companies with less debt, even if they generate the same FCFF.

The calculation starts with net income (which is after interest expense), adds back non-cash expenses, subtracts capital expenditures and working capital changes, and then adjusts for net borrowing (debt repayments minus new debt issuance). This yields the cash that's actually available to equity holders for dividends and share repurchases.

FCFE=Net Income+Depreciation−Capital Expenditures−ΔWorking Capital−Debt Repayments+New Debt Issuance\text{FCFE} = \text{Net Income} + \text{Depreciation} - \text{Capital Expenditures} - \Delta \text{Working Capital} - \text{Debt Repayments} + \text{New Debt Issuance}

Characteristics:

FCFE has different characteristics than FCFF. It measures cash available to equity holders specifically - what shareholders can actually receive. It depends on capital structure - debt affects FCFE because interest expense reduces net income and debt repayments reduce available cash. FCFE is used with Cost of Equity as the discount rate, because it measures cash flows to equity holders. Discounting FCFE at the cost of equity results in Equity Value directly - no need to adjust for debt, because debt's impact is already incorporated in the FCFE calculation.

Calculating Free Cash Flow

Free Cash Flow to Firm (FCFF) - Detailed Calculation

Step 1: Start with Operating Income (EBIT)

EBIT (Earnings Before Interest and Taxes) represents operating profitability.

Step 2: Apply Tax Rate

NOPAT=EBIT×(1−Tax Rate)\text{NOPAT} = \text{EBIT} \times (1 - \text{Tax Rate})

NOPAT (Net Operating Profit After Tax) represents after-tax operating income.

Step 3: Add Back Non-Cash Items

Depreciation and amortization are non-cash expenses that reduce earnings but don't consume cash:

Operating Cash Flow=NOPAT+Depreciation+Amortization\text{Operating Cash Flow} = \text{NOPAT} + \text{Depreciation} + \text{Amortization}

Step 4: Subtract Capital Expenditures

Capital expenditures (CapEx) represent investments in long-term assets:

Operating Cash Flow After CapEx=Operating Cash Flow−Capital Expenditures\text{Operating Cash Flow After CapEx} = \text{Operating Cash Flow} - \text{Capital Expenditures}

Step 5: Subtract Changes in Working Capital

Working capital changes affect cash flow:

  • Increase in working capital = cash outflow
  • Decrease in working capital = cash inflow

ΔWorking Capital=ΔCurrent Assets−ΔCurrent Liabilities\Delta \text{Working Capital} = \Delta \text{Current Assets} - \Delta \text{Current Liabilities}

Final FCFF Formula:

FCFF=EBIT×(1−T)+Depreciation−CapEx−ΔWorking Capital\text{FCFF} = \text{EBIT} \times (1 - T) + \text{Depreciation} - \text{CapEx} - \Delta \text{Working Capital}

Where $T$ = Tax rate.

Example: Calculating FCFF

Company VWX has the following financial information:

Income Statement:

  • Revenue: $500 million
  • COGS: $200 million
  • Operating Expenses: $150 million
  • EBIT: $150 million
  • Interest Expense: $20 million
  • Tax Rate: 25%
  • Net Income: $97.5 million

Cash Flow Statement:

  • Depreciation: $30 million
  • Capital Expenditures: $40 million
  • Change in Working Capital: +$10 million (increase)

FCFF Calculation:

  1. NOPAT:
    NOPAT = EBIT × (1 - T) = $150M × (1 - 0.25) = $112.5 million

  2. Add Depreciation:
    $112.5M + $30M = $142.5 million

  3. Subtract CapEx:
    $142.5M - $40M = $102.5 million

  4. Subtract Δ Working Capital:
    $102.5M - $10M = $92.5 million

FCFF = $92.5 million

This represents cash flow available to all capital providers (debt and equity).

Let's visualize the Free Cash Flow calculation with all components:

Python exercise

#| label: free-cash-flow-enhanced
#| fig-cap: "Free Cash Flow: Enhanced visualization showing FCFF = EBIT×(1-T) + Depreciation - CapEx - ΔWorking Capital"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Example from text
ebit = 150  # Million
tax_rate = 0.25
depreciation = 30
capex = 40
delta_wc = 10

# Calculate FCFF step by step
nopat = ebit * (1 - tax_rate)
operating_cf = nopat + depreciation
operating_cf_after_capex = operating_cf - capex
fcff = operating_cf_after_capex - delta_wc

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('Free Cash Flow to Firm (FCFF): Calculation Breakdown',
            fontsize=16, fontweight='bold')

# Plot 1: FCFF Calculation Steps
ax1 = axes[0, 0]
steps = ['EBIT', 'NOPAT\nEBIT×(1-T)', 'Operating CF\n+Depreciation', 
         'After CapEx\n-CapEx', 'FCFF\n-ΔWC']
values = [ebit, nopat, operating_cf, operating_cf_after_capex, fcff]
colors_steps = ['#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4', '#FFA07A']
bars = ax1.bar(range(len(steps)), values, color=colors_steps, alpha=0.7,
               edgecolor='black', linewidth=1.5)

# Add value labels
for i, (bar, val, step) in enumerate(zip(bars, values, steps)):
    height = bar.get_height()
    if i > 0:
        change = val - values[i-1]
        change_str = f'{change:+.1f}M' if change != 0 else ''
    else:
        change_str = ''
    ax1.text(bar.get_x() + bar.get_width()/2., height + 3,
            f'${val:.1f}M\n{change_str}',
            ha='center', va='bottom',
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

ax1.set_xlabel('Calculation Step', fontsize=12, fontweight='bold')
ax1.set_ylabel('Value ($ Millions)', fontsize=12, fontweight='bold')
ax1.set_title('FCFF Calculation: Step-by-Step Breakdown', fontsize=13, fontweight='bold')
ax1.set_xticks(range(len(steps)))
ax1.set_xticklabels(steps, rotation=15, ha='right')
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add formula annotation
ax1.text(0.02, 0.98, 'Formula:\nFCFF = EBIT×(1-T) + Dep - CapEx - ΔWC\n\n= $150M×(1-0.25) + $30M - $40M - $10M\n= $112.5M + $30M - $40M - $10M\n= $92.5M',
        transform=ax1.transAxes, fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.9),
        verticalalignment='top', family='monospace')

# Plot 2: Component Breakdown
ax2 = axes[0, 1]
components = ['NOPAT', 'Depreciation', 'CapEx', 'ΔWorking\nCapital']
component_values = [nopat, depreciation, -capex, -delta_wc]
colors_comp = ['#4ECDC4', '#45B7D1', '#FF6B6B', '#FFA07A']
bars = ax2.bar(range(len(components)), component_values,
               color=colors_comp, alpha=0.7, edgecolor='black', linewidth=1.5)
ax2.axhline(y=0, color='black', linestyle='-', linewidth=1.5)
ax2.set_xlabel('Component', fontsize=12, fontweight='bold')
ax2.set_ylabel('Value ($ Millions)', fontsize=12, fontweight='bold')
ax2.set_title('FCFF Components: Additions and Subtractions', fontsize=13, fontweight='bold')
ax2.set_xticks(range(len(components)))
ax2.set_xticklabels(components)
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, val in zip(bars, component_values):
    height = bar.get_height()
    ax2.text(bar.get_x() + bar.get_width()/2., height + (2 if height > 0 else -3),
            f'${val:+.1f}M', ha='center', va='bottom' if height > 0 else 'top',
            fontsize=10, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add sum line
ax2.axhline(y=fcff, color='green', linestyle='--', linewidth=2, alpha=0.7,
           label=f'FCFF = ${fcff:.1f}M')
ax2.legend(loc='best', fontsize=9)

# Plot 3: FCFF vs. Net Income Comparison
ax3 = axes[1, 0]
net_income = 97.5  # From example
metrics = ['Net Income', 'FCFF']
metric_values = [net_income, fcff]
colors_metrics = ['#FF6B6B', '#4ECDC4']
bars = ax3.bar(metrics, metric_values, color=colors_metrics, alpha=0.7,
               edgecolor='black', linewidth=1.5)
ax3.set_ylabel('Value ($ Millions)', fontsize=12, fontweight='bold')
ax3.set_title('FCFF vs. Net Income: Why They Differ', fontsize=13, fontweight='bold')
ax3.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, val in zip(bars, metric_values):
    height = bar.get_height()
    ax3.text(bar.get_x() + bar.get_width()/2., height + 2,
            f'${val:.1f}M', ha='center', va='bottom',
            fontsize=11, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add difference annotation
diff = fcff - net_income
ax3.annotate(f'Difference: ${diff:.1f}M\nFCFF includes:\n• Non-cash items\n• Investment activity\n• Working capital changes',
            xy=(1, fcff), xytext=(0.5, fcff + 10),
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='black', lw=2))

# Plot 4: FCFF Uses (What It Represents)
ax4 = axes[1, 1]
uses = ['Pay Debt\nHolders', 'Pay Equity\nHolders', 'Reinvest in\nBusiness']
# Simplified: FCFF can be used for all three
use_values = [30, 40, 22.5]  # Example allocation
total_uses = sum(use_values)
use_pct = [v / total_uses * 100 for v in use_values]

colors_uses = ['#FF6B6B', '#4ECDC4', '#45B7D1']
bars = ax4.bar(range(len(uses)), use_values, color=colors_uses, alpha=0.7,
               edgecolor='black', linewidth=1.5)
ax4.set_xlabel('Use of FCFF', fontsize=12, fontweight='bold')
ax4.set_ylabel('Amount ($ Millions)', fontsize=12, fontweight='bold')
ax4.set_title('FCFF: Available to All Capital Providers', fontsize=13, fontweight='bold')
ax4.set_xticks(range(len(uses)))
ax4.set_xticklabels(uses)
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, val, pct in zip(bars, use_values, use_pct):
    height = bar.get_height()
    ax4.text(bar.get_x() + bar.get_width()/2., height + 1,
            f'${val:.1f}M\n({pct:.0f}%)', ha='center', va='bottom',
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add total annotation
ax4.axhline(y=total_uses, color='green', linestyle='--', linewidth=2, alpha=0.7,
           label=f'Total FCFF = ${fcff:.1f}M')
ax4.text(0.5, 0.98, 'FCFF represents cash available to\nall capital providers (debt + equity)',
        transform=ax4.transAxes, ha='center', va='top',
        fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightyellow', alpha=0.9))
ax4.legend(loc='upper right', fontsize=9)

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **Free Cash Flow to Firm (FCFF) Analysis**")
print(f"{'='*70}")
print(f"Formula: FCFF = EBIT×(1-T) + Depreciation - CapEx - ΔWorking Capital")
print(f"{'='*70}")
print(f"Calculation Steps:")
print(f"  1. EBIT:                    ${ebit:.1f}M")
print(f"  2. NOPAT = EBIT×(1-T):      ${ebit:.1f}M × (1-{tax_rate:.2f}) = ${nopat:.1f}M")
print(f"  3. Operating CF = NOPAT+Dep: ${nopat:.1f}M + ${depreciation:.1f}M = ${operating_cf:.1f}M")
print(f"  4. After CapEx:             ${operating_cf:.1f}M - ${capex:.1f}M = ${operating_cf_after_capex:.1f}M")
print(f"  5. FCFF = After CapEx-ΔWC:  ${operating_cf_after_capex:.1f}M - ${delta_wc:.1f}M = ${fcff:.1f}M")
print(f"{'='*70}")
print(f"Component Breakdown:")
print(f"  • NOPAT:            ${nopat:+.1f}M (add)")
print(f"  • Depreciation:     ${depreciation:+.1f}M (add)")
print(f"  • CapEx:            ${-capex:+.1f}M (subtract)")
print(f"  • ΔWorking Capital: ${-delta_wc:+.1f}M (subtract)")
print(f"  • FCFF:             ${fcff:.1f}M")
print(f"{'='*70}")
print(f"Key Insights:")
print(f"  • FCFF measures cash available to all capital providers")
print(f"  • Independent of capital structure (debt vs. equity)")
print(f"  • Used with WACC to calculate Enterprise Value")
print(f"  • Differs from Net Income (non-cash items, investments)")
print(f"{'='*70}")
print(f"✅ FCFF = true cash generating ability of business")
print(f"✅ FCFF > Net Income when Depreciation > CapEx")
print(f"✅ FCFF < Net Income when CapEx > Depreciation")

Free Cash Flow to Equity (FCFE) - Detailed Calculation

Method 1: From FCFF

FCFE=FCFF−Interest Expense×(1−Tax Rate)+Net Borrowing\text{FCFE} = \text{FCFF} - \text{Interest Expense} \times (1 - \text{Tax Rate}) + \text{Net Borrowing}

Method 2: From Net Income

FCFE=Net Income+Depreciation−CapEx−ΔWorking Capital+Net Borrowing\text{FCFE} = \text{Net Income} + \text{Depreciation} - \text{CapEx} - \Delta \text{Working Capital} + \text{Net Borrowing}

Where Net Borrowing = New Debt Issued - Debt Repaid.

Example: Calculating FCFE

Using the same Company VWX:

  • FCFF: 92.5million(frompreviousexample)92.5 million (from previous example)92.5M−92.5M -wew_e=Weightofequity(Equity÷TotalCapital)−= Weight of equity (Equity ÷ Total Capital) -rer_e=Costofequity−= Cost of equity -wdw_d=Weightofdebt(Debt÷TotalCapital)−= Weight of debt (Debt ÷ Total Capital) -rdr_d=Costofdebt(beforetax)−= Cost of debt (before tax) -T$=TaxrateT\text{\$} = Tax ratewpw_p=Weightofpreferredstock(ifapplicable)−= Weight of preferred stock (if applicable) -rpr_p=Costofpreferredstock∗∗Note:∗∗The= Cost of preferred stock **Note:** The(1−T)(1 - T)termreflectsthetaxshieldbenefitofdebtinterestpayments.The∗∗CapitalAssetPricingModel(CAPM)∗∗isthemostcommonmethodforestimatingcostofequity:MATH:math−82Where:−term reflects the tax shield benefit of debt interest payments. The **Capital Asset Pricing Model (CAPM)** is the most common method for estimating cost of equity: {{MATH:math-82}} Where: -rer_e=Costofequity−= Cost of equity -rfr_f=Risk−freerate(typically10−yearTreasuryyield)−= Risk-free rate (typically 10-year Treasury yield) -β\beta=Beta(systematicriskmeasure)−= Beta (systematic risk measure) -rmr_m=Expectedmarketreturn−= Expected market return -(rm−rf)(r_m - r_f)=Marketriskpremium∗∗Beta(= Market risk premium **Beta (β\beta):∗∗−Measuresstock′ssensitivitytomarketmovements−):** - Measures stock's sensitivity to market movements -β=1.0\beta = 1.0:Stockmoveswithmarket−: Stock moves with market -β>1.0\beta > 1.0:Stockmorevolatilethanmarket−: Stock more volatile than market -β<1.0\beta < 1.0Stocklessvolatilethanmarket∗∗MarketRiskPremiumStock less volatile than market **Market Risk Premiumrdr_d600million−Marketvalueofdebt:600 million - Market value of debt:wew_e=$600M÷$1,000M=0.60(60= \text{\$}600M ÷ \text{\$}1,000M = 0.60 (60%)wdw_d=$400M÷$1,000M=0.40(40= \text{\$}400M ÷ \text{\$}1,000M = 0.40 (40%)we×re+wd×rd×(1−T)w_e \times r_e + w_d \times r_d \times (1 - T)
    WACC = 0.60 × 12% + 0.40 × 6% × (1 - 0.25)
    WACC = 7.2% + 0.40 × 6% × 0.75
    WACC = 7.2% + 1.8% = 9.0%

This means the company's average cost of capital is 9%. Cash flows should be discounted at 9% when using FCFF.

Python exercise

#| label: fig-wacc-visualization
#| fig-cap: "WACC Calculation: Understanding Weighted Average Cost of Capital Components"
#| fig-width: 14
#| fig-height: 8

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import matplotlib.pyplot as plt
from IPython.display import display
import numpy as np

# Create figure
fig, axes = plt.subplots(1, 2, figsize=(16, 8))
fig.suptitle('Weighted Average Cost of Capital (WACC): Components and Calculation', fontsize=16, fontweight='bold')

# Left plot: WACC components breakdown
ax1 = axes[0]

# Example company capital structure
capital_components = ['Equity\n(60%)', 'Debt\n(40%)']
weights = [0.60, 0.40]
costs = [0.12, 0.045]  # 12% equity, 6% debt × (1-0.25) = 4.5% after tax
contributions = [w * c for w, c in zip(weights, costs)]
wacc = sum(contributions)

# Create pie chart for weights
colors_wacc = ['#4ECDC4', '#FF6B6B']
wedges, texts, autotexts = ax1.pie(weights, labels=capital_components, autopct='%1.1f%%',
                                    colors=colors_wacc, startangle=90, textprops={'fontsize': 10, 'fontweight': 'bold'})
ax1.set_title('Capital Structure: Equity vs. Debt Weights', fontsize=13, fontweight='bold')

# Right plot: WACC calculation breakdown
ax2 = axes[1]

# Create stacked bar showing contribution
x = np.arange(1)
width = 0.6

bars1 = ax2.bar(x, [contributions[0]], width, label=f'Equity: {weights[0]*100:.0f}% × {costs[0]*100:.0f}% = {contributions[0]*100:.2f}%', 
                color='#4ECDC4', alpha=0.8, edgecolor='black', linewidth=1.5)
bars2 = ax2.bar(x, [contributions[1]], width, bottom=[contributions[0]], 
                label=f'Debt (after tax): {weights[1]*100:.0f}% × {costs[1]*100:.2f}% = {contributions[1]*100:.2f}%',
                color='#FF6B6B', alpha=0.8, edgecolor='black', linewidth=1.5)

ax2.set_ylabel('Cost Contribution (%)', fontsize=12, fontweight='bold')
ax2.set_title('WACC Components: Weighted Cost Contributions', fontsize=13, fontweight='bold')
ax2.set_xticks([])
ax2.legend(fontsize=10, loc='upper right')
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')
ax2.set_ylim(0, 0.12)

# Add WACC total
ax2.text(0, wacc + 0.01, f'WACC = {wacc*100:.1f}%', 
         ha='center', fontsize=14, fontweight='bold',
         bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.8))

# Add component values in bars
ax2.text(0, contributions[0]/2, f'{contributions[0]*100:.2f}%', 
         ha='center', fontsize=11, fontweight='bold', color='white')
ax2.text(0, contributions[0] + contributions[1]/2, f'{contributions[1]*100:.2f}%', 
         ha='center', fontsize=11, fontweight='bold', color='white')

# Add formula
fig.text(0.5, 0.02, 'WACC = w_e × r_e + w_d × r_d × (1 - T)  |  Example: 0.60 × 12% + 0.40 × 6% × 0.75 = 9.0%', 
         ha='center', fontsize=12, fontweight='bold',
         bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.8))

plt.tight_layout()
display(fig)
plt.close(fig)

The DCF Model Structure

A complete DCF model consists of three components:

1. Explicit Forecast Period

The explicit forecast period (typically 5-10 years) is where detailed cash flow forecasts are made. During this period:

  • Revenue growth rates are estimated
  • Margins are projected
  • Capital expenditures are planned
  • Working capital changes are modeled

Typical Forecast Period:

  • 5 years: Common for stable companies
  • 10 years: For companies with longer business cycles
  • Shorter periods: For rapidly changing industries

2. Terminal Value

The terminal value represents the value of all cash flows beyond the explicit forecast period. Since companies are assumed to continue indefinitely, terminal value is a critical component of DCF models.

Terminal Value Methods:

  1. Perpetuity Growth Model (Gordon Growth Model)
  2. Exit Multiple Method (EBITDA or Earnings multiple)

3. Present Value Calculation

All future cash flows (explicit period + terminal value) are discounted to present value using the appropriate discount rate.

Python exercise

#| label: fig-dcf-structure-visualization
#| fig-cap: "DCF Model Structure: Explicit Forecast Period, Terminal Value, and Present Value"
#| fig-width: 14
#| fig-height: 8

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import matplotlib.pyplot as plt
from IPython.display import display
import numpy as np

# Create figure
fig, axes = plt.subplots(1, 2, figsize=(16, 8))
fig.suptitle('DCF Model Structure: Explicit Forecast Period + Terminal Value = Enterprise Value', fontsize=16, fontweight='bold')

# Left plot: DCF timeline
ax1 = axes[0]

# Example DCF model
years = [1, 2, 3, 4, 5]
fcff_values = [50, 55, 60, 65, 70]  # Growing FCFF
wacc = 0.10
pv_fcff = [cf / ((1 + wacc) ** y) for y, cf in zip(years, fcff_values)]
terminal_value = 70 * 1.03 / (0.10 - 0.03)  # $1,030M
pv_terminal = terminal_value / ((1 + wacc) ** 5)
enterprise_value = sum(pv_fcff) + pv_terminal

# Create timeline
for i, (year, fcff, pv) in enumerate(zip(years, fcff_values, pv_fcff)):
    # FCFF bars
    bars = ax1.bar(year, fcff, width=0.6, color='#4ECDC4', alpha=0.8, edgecolor='black', linewidth=1.5)
    ax1.text(year, fcff + 2, f'FCFF Y{year}\n${fcff}M', ha='center', fontsize=9, fontweight='bold')
    # PV annotation
    ax1.plot([year, year], [fcff, fcff + 10], 'r--', linewidth=1, alpha=0.5)
    ax1.text(year, fcff + 12, f'PV: ${pv:.1f}M', ha='center', fontsize=8, color='red', fontweight='bold')

# Terminal value
ax1.bar(6, terminal_value/10, width=0.6, color='#FF6B6B', alpha=0.8, edgecolor='black', linewidth=1.5)
ax1.text(6, terminal_value/10 + 5, f'Terminal\nValue\n${terminal_value:.0f}M', ha='center', fontsize=9, fontweight='bold')
ax1.text(6, terminal_value/10 - 5, f'PV: ${pv_terminal:.0f}M', ha='center', fontsize=8, color='red', fontweight='bold')

ax1.set_xlabel('Year', fontsize=12, fontweight='bold')
ax1.set_ylabel('Cash Flow ($ Millions)', fontsize=12, fontweight='bold')
ax1.set_title('DCF Model Timeline: Explicit Period (Years 1-5) + Terminal Value', fontsize=13, fontweight='bold')
ax1.set_xticks([1, 2, 3, 4, 5, 6])
ax1.set_xticklabels(['Year 1', 'Year 2', 'Year 3', 'Year 4', 'Year 5', 'Terminal'])
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')
ax1.set_ylim(0, max(fcff_values) + 20)

# Add enterprise value annotation
ax1.text(3.5, max(fcff_values) + 15, f'Enterprise Value = PV(Explicit) + PV(Terminal)\n= ${sum(pv_fcff):.0f}M + ${pv_terminal:.0f}M = ${enterprise_value:.0f}M',
         ha='center', fontsize=10, fontweight='bold',
         bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.8))

# Right plot: Value breakdown
ax2 = axes[1]

# Value components
components = ['PV(Explicit\nPeriod)', 'PV(Terminal\nValue)', 'Enterprise\nValue']
values = [sum(pv_fcff), pv_terminal, enterprise_value]
colors_comp = ['#4ECDC4', '#FF6B6B', '#45B7D1']

bars = ax2.bar(components, values, color=colors_comp, alpha=0.8, edgecolor='black', linewidth=2)
ax2.set_ylabel('Value ($ Millions)', fontsize=12, fontweight='bold')
ax2.set_title('DCF Value Breakdown', fontsize=13, fontweight='bold')
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, val in zip(bars, values):
    height = bar.get_height()
    pct = (val / enterprise_value) * 100
    ax2.text(bar.get_x() + bar.get_width()/2., height + 10,
             f'${val:.0f}M\n({pct:.1f}%)', ha='center', fontsize=10, fontweight='bold',
             bbox=dict(boxstyle='round', facecolor='white', alpha=0.8))

# Add formula (simplified to avoid matplotlib math parsing issues)
fig.text(0.5, 0.02, 'Enterprise Value = Sum[FCFF / (1+WACC)^t] + Terminal Value / (1+WACC)^n  |  Terminal Value = FCFF(n+1) / (WACC - g)', 
         ha='center', fontsize=11, fontweight='bold',
         bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.8))

plt.tight_layout()
display(fig)
plt.close(fig)

Terminal Value: Perpetuity Growth Model

The perpetuity growth model (also called Gordon Growth Model) assumes cash flows grow at a constant rate forever:

TVn=CFn+1r−g=CFn×(1+g)r−gTV_n = \frac{CF_{n+1}}{r - g} = \frac{CF_n \times (1 + g)}{r - g}

Where:

  • TVnTV_n=Terminalvalueatendofforecastperiod−= Terminal value at end of forecast period -CFn+1CF_{n+1}=Cashflowinfirstyearafterforecastperiod−= Cash flow in first year after forecast period -CFnCF_n=Cashflowinlastyearofforecastperiod−= Cash flow in last year of forecast period -r$=Discountrate(WACCforFCFF,costofequityforFCFE)r\text{\$} = Discount rate (WACC for FCFF, cost of equity for FCFE)g$=Perpetualgrowthrateg\text{\$} = Perpetual growth rateg$):∗∗g\text{\$}):**g<rg < r)−Typically2−3) - Typically 2-3TV_5 = \frac{$100M \times (1 + 0.03)}{0.10 - 0.03} = \frac{$103M}{0.07} = $1,471.4 million

This represents the value of all cash flows from Year 6 onward, assuming 3% perpetual growth.

Present Value of Terminal Value:
PV(TV) = $1,471.4M ÷ (1.10)^5 = $1,471.4M ÷ 1.6105 = $913.3 million

Let's visualize the Terminal Value calculation with both methods:

Python exercise

#| label: terminal-value-enhanced
#| fig-cap: "Terminal Value: Enhanced visualization showing TV = CF_{n+1}/(r-g) with perpetuity growth and exit multiple methods"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Example from text
cf_n = 100  # Year 5 FCFF (millions)
wacc = 0.10
g = 0.03
n = 5  # Forecast period

# Perpetuity Growth Method
cf_n1 = cf_n * (1 + g)
tv_perpetuity = cf_n1 / (wacc - g)
pv_tv_perpetuity = tv_perpetuity / ((1 + wacc) ** n)

# Exit Multiple Method
ebitda_n = 150  # Year 5 EBITDA
multiple = 8.0
tv_exit = ebitda_n * multiple
pv_tv_exit = tv_exit / ((1 + wacc) ** n)

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('Terminal Value: Two Methods - Perpetuity Growth vs. Exit Multiple',
            fontsize=16, fontweight='bold')

# Plot 1: Perpetuity Growth Method
ax1 = axes[0, 0]
# Show cash flow timeline extending to infinity
years_explicit = np.arange(1, n + 1)
years_terminal = np.arange(n + 1, n + 21)
cf_explicit = [100 * (1.05) ** (t-1) for t in years_explicit]  # Growing in explicit period
cf_terminal = [cf_n1 * (1 + g) ** (t - n - 1) for t in years_terminal]

# Plot explicit period
ax1.bar(years_explicit, cf_explicit, color='#4ECDC4', alpha=0.7, edgecolor='black', linewidth=1.5,
       label='Explicit Period')
# Plot terminal period (first 20 years shown)
ax1.bar(years_terminal, cf_terminal, color='#FF6B6B', alpha=0.7, edgecolor='black', linewidth=1.5,
       label='Terminal Period (Perpetuity)')

# Add divider
ax1.axvline(x=n + 0.5, color='red', linestyle='--', linewidth=2, alpha=0.7, label='End of Forecast')

# Add TV annotation
ax1.text(n + 10, max(cf_terminal) * 0.7, f'TV = CF_{n+1} / (r - g)\n= ${cf_n1:.1f}M / ({wacc*100:.0f}% - {g*100:.0f}%)\n= ${tv_perpetuity:.1f}M',
        fontsize=9, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.9))

ax1.set_xlabel('Year', fontsize=12, fontweight='bold')
ax1.set_ylabel('Cash Flow ($ Millions)', fontsize=12, fontweight='bold')
ax1.set_title('Perpetuity Growth Method: TV = CF_{n+1} / (r - g)', fontsize=13, fontweight='bold')
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')
ax1.legend(loc='upper left', fontsize=9)

# Add formula annotation
ax1.text(0.02, 0.98, f'Formula:\nTV = CF_{n+1} / (r - g)\n\nWhere:\nCF_{n+1} = ${cf_n1:.1f}M\nr = {wacc*100:.0f}%\ng = {g*100:.0f}%\n\nTV = ${tv_perpetuity:.0f}M',
        transform=ax1.transAxes, fontsize=9, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.9),
        verticalalignment='top', family='monospace')

# Plot 2: Exit Multiple Method
ax2 = axes[0, 1]
# Show multiple application
metrics = ['EBITDA\nYear 5', 'Exit\nMultiple', 'Terminal\nValue']
values_exit = [ebitda_n, multiple, tv_exit]
colors_exit = ['#4ECDC4', '#45B7D1', '#FF6B6B']
bars = ax2.bar(range(len(metrics)), values_exit, color=colors_exit, alpha=0.7,
               edgecolor='black', linewidth=1.5)

# Add value labels
for i, (bar, val, metric) in enumerate(zip(bars, values_exit, metrics)):
    height = bar.get_height()
    if i == 1:  # Multiple
        label = f'{val:.1f}x'
    else:
        label = f'${val:.0f}M'
    ax2.text(bar.get_x() + bar.get_width()/2., height + height*0.05,
            label, ha='center', va='bottom',
            fontsize=10, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add calculation annotation
ax2.text(0.5, 0.98, f'Formula:\nTV = Multiple × Metric\n\nExample:\nTV = {multiple:.1f}x × ${ebitda_n:.0f}M\nTV = ${tv_exit:.0f}M',
        transform=ax2.transAxes, ha='center', va='top',
        fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightyellow', alpha=0.9),
        family='monospace')

ax2.set_xlabel('Component', fontsize=12, fontweight='bold')
ax2.set_ylabel('Value', fontsize=12, fontweight='bold')
ax2.set_title('Exit Multiple Method: TV = Multiple × Financial Metric', fontsize=13, fontweight='bold')
ax2.set_xticks(range(len(metrics)))
ax2.set_xticklabels(metrics)
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Plot 3: Growth Rate Sensitivity
ax3 = axes[1, 0]
growth_rates = np.linspace(0.01, wacc - 0.01, 50)  # g must be < r
tv_by_growth = [cf_n1 / (wacc - g_val) for g_val in growth_rates]

ax3.plot(growth_rates * 100, tv_by_growth, 'b-', linewidth=3, alpha=0.8,
        label='Terminal Value vs. Growth Rate')
ax3.axvline(x=g * 100, color='red', linestyle='--', linewidth=2, alpha=0.7,
           label=f'Base Growth: {g*100:.0f}%')
ax3.plot(g * 100, tv_perpetuity, 'ro', markersize=12, markeredgewidth=2,
        markeredgecolor='white', zorder=5)

ax3.set_xlabel('Perpetual Growth Rate (%)', fontsize=12, fontweight='bold')
ax3.set_ylabel('Terminal Value ($ Millions)', fontsize=12, fontweight='bold')
ax3.set_title('Terminal Value Sensitivity to Growth Rate', fontsize=13, fontweight='bold')
ax3.grid(True, alpha=0.3, linestyle='--')
ax3.legend(loc='upper left', fontsize=9)

# Add annotation
ax3.annotate(f'At {g*100:.0f}% growth:\nTV = ${tv_perpetuity:.0f}M',
            xy=(g * 100, tv_perpetuity), xytext=(g * 100 + 0.5, tv_perpetuity + 200),
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='red', lw=2))

# Add warning zone
ax3.axvspan((wacc - 0.01) * 100, wacc * 100, alpha=0.2, color='red',
           label='Warning: g → r (TV → ∞)')

# Plot 4: Method Comparison
ax4 = axes[1, 1]
methods = ['Perpetuity\nGrowth', 'Exit\nMultiple']
tv_values = [tv_perpetuity, tv_exit]
pv_values = [pv_tv_perpetuity, pv_tv_exit]
colors_methods = ['#FF6B6B', '#4ECDC4']

x = np.arange(len(methods))
width = 0.35

bars1 = ax4.bar(x - width/2, tv_values, width,
               label='Terminal Value', color=colors_methods, alpha=0.7,
               edgecolor='black', linewidth=1.5)
bars2 = ax4.bar(x + width/2, pv_values, width,
               label='Present Value (PV)', color=[c.replace('0.7', '0.5') for c in colors_methods],
               alpha=0.7, edgecolor='black', linewidth=1.5)

ax4.set_xlabel('Method', fontsize=12, fontweight='bold')
ax4.set_ylabel('Value ($ Millions)', fontsize=12, fontweight='bold')
ax4.set_title('Terminal Value: Method Comparison', fontsize=13, fontweight='bold')
ax4.set_xticks(x)
ax4.set_xticklabels(methods)
ax4.legend(loc='upper left', fontsize=9)
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bars, values in [(bars1, tv_values), (bars2, pv_values)]:
    for bar, val in zip(bars, values):
        height = bar.get_height()
        ax4.text(bar.get_x() + bar.get_width()/2., height + 20,
                f'${val:.0f}M', ha='center', va='bottom',
                fontsize=9, fontweight='bold',
                bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **Terminal Value Analysis**")
print(f"{'='*70}")
print(f"Method 1: Perpetuity Growth Model")
print(f"  Formula: TV = CF_{n+1} / (r - g)")
print(f"  where CF_{n+1} = cash flow in first year after forecast")
print(f"        r = discount rate (WACC)")
print(f"        g = perpetual growth rate (must be < r)")
print(f"{'='*70}")
print(f"Example (Perpetuity Growth):")
print(f"  CF_5: ${cf_n:.0f}M")
print(f"  Growth rate (g): {g*100:.0f}%")
print(f"  CF_6 = CF_5 × (1+g) = ${cf_n:.0f}M × 1.{int(g*100):02d} = ${cf_n1:.1f}M")
print(f"  WACC (r): {wacc*100:.0f}%")
print(f"  TV = ${cf_n1:.1f}M / ({wacc*100:.0f}% - {g*100:.0f}%) = ${cf_n1:.1f}M / {(wacc-g)*100:.1f}%")
print(f"  TV = ${tv_perpetuity:.1f}M")
print(f"  PV(TV) = ${tv_perpetuity:.1f}M / (1+{wacc:.2f})^{n} = ${pv_tv_perpetuity:.1f}M")
print(f"{'='*70}")
print(f"Method 2: Exit Multiple Method")
print(f"  Formula: TV = Multiple × Financial Metric")
print(f"{'='*70}")
print(f"Example (Exit Multiple):")
print(f"  EBITDA_5: ${ebitda_n:.0f}M")
print(f"  Multiple: {multiple:.1f}x")
print(f"  TV = ${ebitda_n:.0f}M × {multiple:.1f} = ${tv_exit:.0f}M")
print(f"  PV(TV) = ${tv_exit:.0f}M / (1+{wacc:.2f})^{n} = ${pv_tv_exit:.1f}M")
print(f"{'='*70}")
print(f"Key Insights:")
print(f"  • Terminal value often represents 70-80% of total DCF value")
print(f"  • Perpetuity method: Assumes constant growth forever")
print(f"  • Exit multiple: Uses market-based valuation")
print(f"  • Growth rate must be < discount rate (g < r)")
print(f"  • Typical growth: 2-3% (inflation + real GDP growth)")
print(f"{'='*70}")
print(f"✅ TV captures value beyond explicit forecast period")
print(f"✅ Both methods should yield similar results")
print(f"✅ Sensitivity analysis helps assess valuation risk")

Terminal Value: Exit Multiple Method

The exit multiple method values the company at the end of the forecast period using a market multiple:

TVn=Multiple×Financial MetricnTV_n = \text{Multiple} \times \text{Financial Metric}_n

Common Multiples:

Multiple Selection:

Example: Terminal Value Using Exit Multiple

At the end of Year 5, Company DEF has:

  • EBITDA in Year 5: $150 million
  • Comparable companies trade at 8.0x EBITDA
  • Terminal value: $150M × 8.0 = $1,200 million

Present Value of Terminal Value (assuming WACC = 10%):
PV(TV) = $1,200M ÷ (1.10)^5 = $744.7 million

Building a Complete DCF Model: Step-by-Step

Step 1: Forecast Financial Statements

Revenue Forecast:

Expense Forecast:

Balance Sheet Forecast:

Step 2: Calculate Free Cash Flows

For each year in forecast period:

  1. Calculate EBIT
  2. Calculate NOPAT (EBIT × (1 - Tax Rate))
  3. Add depreciation
  4. Subtract capital expenditures
  5. Subtract change in working capital
  6. Result: FCFF for each year

Step 3: Estimate Terminal Value

Choose method:

Step 4: Calculate Present Values

Discount each cash flow to present value:

PV(CFt)=CFt(1+WACC)tPV(CF_t) = \frac{CF_t}{(1 + WACC)^t}

PV(TV)=TVn(1+WACC)nPV(TV) = \frac{TV_n}{(1 + WACC)^n}

Step 5: Sum Present Values

Enterprise Value:
EV=∑t=1nPV(CFt)+PV(TV)EV = \sum_{t=1}^{n} PV(CF_t) + PV(TV)

Equity Value:
Equity Value=EV−Net Debt\text{Equity Value} = EV - \text{Net Debt}

Where Net Debt = Total Debt - Cash and Cash Equivalents.

Equity Value Per Share:
Price Per Share=Equity ValueShares Outstanding\text{Price Per Share} = \frac{\text{Equity Value}}{\text{Shares Outstanding}}

Example: Complete DCF Valuation

Company GHI - 5-Year DCF Model:

Assumptions:

  • WACC: 10%
  • Perpetual growth: 3%
  • Shares outstanding: 10 million
  • Net debt: $50 million

Forecasted FCFF:

  • Year 1: $80 million
  • Year 2: $90 million
  • Year 3: $100 million
  • Year 4: $110 million
  • Year 5: $120 million

Step 1: Present Value of Explicit Cash Flows

PV(Year 1) = $80M ÷ (1.10)^1 = $72.7M
PV(Year 2) = $90M ÷ (1.10)^2 = $74.4M
PV(Year 3) = $100M ÷ (1.10)^3 = $75.1M
PV(Year 4) = $110M ÷ (1.10)^4 = $75.1M
PV(Year 5) = $120M ÷ (1.10)^5 = $74.5M

Sum of PV(Explicit) = $371.8 million

Step 2: Terminal Value

TV = $120M × (1.03) ÷ (0.10 - 0.03) = $123.6M ÷ 0.07 = $1,765.7 million

PV(TV) = $1,765.7M ÷ (1.10)^5 = $1,095.9 million

Step 3: Enterprise Value

EV = $371.8M + $1,095.9M = $1,467.7 million

Step 4: Equity Value

Equity Value = $1,467.7M - $50M = $1,417.7 million

Step 5: Price Per Share

Price = $1,417.7M ÷ 10M shares = $141.77 per share

If current stock price is $120, the stock is undervalued by 18%.

Sensitivity Analysis

DCF models are sensitive to assumptions, particularly:

Sensitivity Analysis tests how valuation changes with different assumptions:

Sensitivity Table Example:

WACC Perpetual Growth Equity Value Price Per Share
9% 2.5% $1,600M $160.00
9% 3.0% $1,700M $170.00
10% 2.5% $1,400M $140.00
10% 3.0% $1,500M $150.00
11% 2.5% $1,200M $120.00
11% 3.0% $1,300M $130.00

This helps assess valuation range and identify key assumptions. Let's visualize the sensitivity analysis with a tornado chart:

Python exercise

#| label: dcf-sensitivity-enhanced
#| fig-cap: "DCF Sensitivity Analysis: Tornado chart showing how assumptions affect valuation"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Base case parameters
base_wacc = 0.10
base_growth = 0.03
base_cf_n = 120  # Year 5 FCFF (millions)
n = 5

# Calculate base case
base_cf_n1 = base_cf_n * (1 + base_growth)
base_tv = base_cf_n1 / (base_wacc - base_growth)
base_pv_tv = base_tv / ((1 + base_wacc) ** n)
base_pv_explicit = 371.8  # From example
base_ev = base_pv_explicit + base_pv_tv
base_equity = base_ev - 50  # Assume $50M net debt
base_price = base_equity / 10  # 10M shares

# Sensitivity scenarios
wacc_scenarios = [0.09, 0.095, 0.10, 0.105, 0.11]
growth_scenarios = [0.025, 0.0275, 0.03, 0.0325, 0.035]

# Calculate sensitivity to WACC (holding growth constant)
wacc_equity_values = []
wacc_prices = []
for wacc in wacc_scenarios:
    cf_n1 = base_cf_n * (1 + base_growth)
    tv = cf_n1 / (wacc - base_growth)
    pv_tv = tv / ((1 + wacc) ** n)
    ev = base_pv_explicit + pv_tv
    equity = ev - 50
    price = equity / 10
    wacc_equity_values.append(equity)
    wacc_prices.append(price)

# Calculate sensitivity to growth (holding WACC constant)
growth_equity_values = []
growth_prices = []
for growth in growth_scenarios:
    cf_n1 = base_cf_n * (1 + growth)
    tv = cf_n1 / (base_wacc - growth)
    pv_tv = tv / ((1 + base_wacc) ** n)
    ev = base_pv_explicit + pv_tv
    equity = ev - 50
    price = equity / 10
    growth_equity_values.append(equity)
    growth_prices.append(price)

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('DCF Sensitivity Analysis: How Assumptions Affect Valuation',
            fontsize=16, fontweight='bold')

# Plot 1: WACC Sensitivity (Tornado Chart)
ax1 = axes[0, 0]
# Calculate deviations from base
wacc_deviations = [(val - base_equity) / base_equity * 100 for val in wacc_equity_values]
wacc_labels = [f'{w*100:.0f}%' for w in wacc_scenarios]

# Sort by absolute deviation for tornado effect
sorted_indices = sorted(range(len(wacc_deviations)), key=lambda i: abs(wacc_deviations[i]), reverse=True)
sorted_deviations = [wacc_deviations[i] for i in sorted_indices]
sorted_labels = [wacc_labels[i] for i in sorted_indices]
colors_wacc = ['red' if d < 0 else 'green' for d in sorted_deviations]

bars = ax1.barh(range(len(sorted_labels)), sorted_deviations,
               color=colors_wacc, alpha=0.7, edgecolor='black', linewidth=1.5)
ax1.axvline(x=0, color='black', linestyle='-', linewidth=2)
ax1.set_xlabel('Change in Equity Value (%)', fontsize=12, fontweight='bold')
ax1.set_ylabel('WACC Scenario', fontsize=12, fontweight='bold')
ax1.set_title('WACC Sensitivity: Impact on Valuation (Tornado Chart)', fontsize=13, fontweight='bold')
ax1.set_yticks(range(len(sorted_labels)))
ax1.set_yticklabels(sorted_labels)
ax1.grid(True, alpha=0.3, linestyle='--', axis='x')

# Add value labels
for i, (bar, dev, val) in enumerate(zip(bars, sorted_deviations, [wacc_equity_values[j] for j in sorted_indices])):
    width = bar.get_width()
    ax1.text(width + (1 if width > 0 else -1), bar.get_y() + bar.get_height()/2,
            f'{dev:+.1f}%\n${val:.0f}M', ha='left' if width > 0 else 'right', va='center',
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Plot 2: Growth Rate Sensitivity (Tornado Chart)
ax2 = axes[0, 1]
growth_deviations = [(val - base_equity) / base_equity * 100 for val in growth_equity_values]
growth_labels = [f'{g*100:.2f}%' for g in growth_scenarios]

sorted_indices_g = sorted(range(len(growth_deviations)), key=lambda i: abs(growth_deviations[i]), reverse=True)
sorted_deviations_g = [growth_deviations[i] for i in sorted_indices_g]
sorted_labels_g = [growth_labels[i] for i in sorted_indices_g]
colors_growth = ['red' if d < 0 else 'green' for d in sorted_deviations_g]

bars = ax2.barh(range(len(sorted_labels_g)), sorted_deviations_g,
               color=colors_growth, alpha=0.7, edgecolor='black', linewidth=1.5)
ax2.axvline(x=0, color='black', linestyle='-', linewidth=2)
ax2.set_xlabel('Change in Equity Value (%)', fontsize=12, fontweight='bold')
ax2.set_ylabel('Growth Rate Scenario', fontsize=12, fontweight='bold')
ax2.set_title('Growth Rate Sensitivity: Impact on Valuation (Tornado Chart)', fontsize=13, fontweight='bold')
ax2.set_yticks(range(len(sorted_labels_g)))
ax2.set_yticklabels(sorted_labels_g)
ax2.grid(True, alpha=0.3, linestyle='--', axis='x')

# Add value labels
for i, (bar, dev, val) in enumerate(zip(bars, sorted_deviations_g, [growth_equity_values[j] for j in sorted_indices_g])):
    width = bar.get_width()
    ax2.text(width + (1 if width > 0 else -1), bar.get_y() + bar.get_height()/2,
            f'{dev:+.1f}%\n${val:.0f}M', ha='left' if width > 0 else 'right', va='center',
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Plot 3: Two-Way Sensitivity (Heatmap)
ax3 = axes[1, 0]
# Create sensitivity matrix
wacc_range = np.linspace(0.085, 0.115, 7)
growth_range = np.linspace(0.02, 0.04, 7)
sensitivity_matrix = np.zeros((len(growth_range), len(wacc_range)))

for i, growth in enumerate(growth_range):
    for j, wacc in enumerate(wacc_range):
        if wacc > growth:  # Valid only when wacc > growth
            cf_n1 = base_cf_n * (1 + growth)
            tv = cf_n1 / (wacc - growth)
            pv_tv = tv / ((1 + wacc) ** n)
            ev = base_pv_explicit + pv_tv
            equity = ev - 50
            price = equity / 10
            sensitivity_matrix[i, j] = price
        else:
            sensitivity_matrix[i, j] = np.nan

# Create heatmap
im = ax3.imshow(sensitivity_matrix, aspect='auto', cmap='RdYlGn', interpolation='nearest')
ax3.set_xlabel('WACC (%)', fontsize=12, fontweight='bold')
ax3.set_ylabel('Growth Rate (%)', fontsize=12, fontweight='bold')
ax3.set_title('Two-Way Sensitivity: Price Per Share Heatmap', fontsize=13, fontweight='bold')
ax3.set_xticks(range(len(wacc_range)))
ax3.set_xticklabels([f'{w*100:.1f}%' for w in wacc_range])
ax3.set_yticks(range(len(growth_range)))
ax3.set_yticklabels([f'{g*100:.2f}%' for g in growth_range])

# Add colorbar
cbar = plt.colorbar(im, ax=ax3)
cbar.set_label('Price Per Share ($)', fontsize=10, fontweight='bold')

# Add value annotations for key cells
for i in [1, 3, 5]:
    for j in [1, 3, 5]:
        if not np.isnan(sensitivity_matrix[i, j]):
            ax3.text(j, i, f'${sensitivity_matrix[i, j]:.0f}', ha='center', va='center',
                    fontsize=8, fontweight='bold', color='white' if sensitivity_matrix[i, j] < 150 else 'black')

# Plot 4: Comparison of Factors
ax4 = axes[1, 1]
factors = ['WACC\n(±1%)', 'Growth\n(±0.5%)', 'Terminal\nValue']
# Calculate impact ranges
wacc_impact = abs(wacc_deviations[0] - wacc_deviations[-1])
growth_impact = abs(growth_deviations[0] - growth_deviations[-1])
# Terminal value impact (simplified: assume 75% of value)
tv_impact = wacc_impact * 0.75  # Terminal value is most sensitive

impact_values = [wacc_impact, growth_impact, tv_impact]
colors_impact = ['#FF6B6B', '#4ECDC4', '#45B7D1']
bars = ax4.bar(range(len(factors)), impact_values,
               color=colors_impact, alpha=0.7, edgecolor='black', linewidth=1.5)
ax4.set_xlabel('Sensitivity Factor', fontsize=12, fontweight='bold')
ax4.set_ylabel('Valuation Impact Range (%)', fontsize=12, fontweight='bold')
ax4.set_title('Relative Sensitivity: Which Factors Matter Most?', fontsize=13, fontweight='bold')
ax4.set_xticks(range(len(factors)))
ax4.set_xticklabels(factors)
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, impact in zip(bars, impact_values):
    height = bar.get_height()
    ax4.text(bar.get_x() + bar.get_width()/2., height + 1,
            f'{impact:.1f}%', ha='center', va='bottom',
            fontsize=10, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **DCF Sensitivity Analysis**")
print(f"{'='*70}")
print(f"Base Case Assumptions:")
print(f"  WACC: {base_wacc*100:.0f}%")
print(f"  Perpetual Growth: {base_growth*100:.0f}%")
print(f"  Base Equity Value: ${base_equity:.0f}M")
print(f"  Base Price Per Share: ${base_price:.2f}")
print(f"{'='*70}")
print(f"WACC Sensitivity (holding growth constant at {base_growth*100:.0f}%):")
print(f"{'WACC':<10} {'Equity Value':<20} {'Price':<15} {'Change':<15}")
print(f"{'-'*70}")
for wacc, val, price in zip(wacc_scenarios, wacc_equity_values, wacc_prices):
    change = (val - base_equity) / base_equity * 100
    print(f"{wacc*100:>6.0f}%   ${val:>15.0f}M   ${price:>10.2f}   {change:>+12.1f}%")
print(f"{'='*70}")
print(f"Growth Rate Sensitivity (holding WACC constant at {base_wacc*100:.0f}%):")
print(f"{'Growth':<10} {'Equity Value':<20} {'Price':<15} {'Change':<15}")
print(f"{'-'*70}")
for growth, val, price in zip(growth_scenarios, growth_equity_values, growth_prices):
    change = (val - base_equity) / base_equity * 100
    print(f"{growth*100:>6.2f}%   ${val:>15.0f}M   ${price:>10.2f}   {change:>+12.1f}%")
print(f"{'='*70}")
print(f"Key Insights:")
print(f"  • WACC changes have larger impact than growth changes")
print(f"  • 1% WACC change → ~{(wacc_impact/2):.1f}% value change")
print(f"  • 0.5% growth change → ~{(growth_impact/2):.1f}% value change")
print(f"  • Terminal value often represents 70-80% of total value")
print(f"{'='*70}")
print(f"✅ Sensitivity analysis identifies key assumptions")
print(f"✅ Helps assess valuation range and risk")
print(f"✅ Guides decision-making under uncertainty")

Common Pitfalls in DCF Modeling

1. Terminal Value Dominance

Problem: Terminal value often represents 70-80% of total value, making model overly sensitive to terminal assumptions.

Solution:

2. Unrealistic Growth Assumptions

Problem: Assuming growth rates exceed sustainable levels.

Solution:

3. WACC Estimation Errors

Problem: Incorrect discount rate leads to valuation errors.

Solution:

4. Inconsistent Cash Flow Definitions

Problem: Mixing FCFF and FCFE or using wrong discount rate.

Solution:

5. Ignoring Working Capital

Problem: Failing to account for working capital changes.

Solution:

Knowledge Check 6.4

In a DCF model using FCFF, what discount rate should be used, and what does the resulting value represent?

A. Cost of equity, Equity value
B. WACC, Enterprise value
C. Cost of debt, Debt value
D. Risk-free rate, Risk-adjusted value

Click to reveal answer

B. WACC, Enterprise value

When using FCFF (Free Cash Flow to Firm):

  • Discount rate: WACC (Weighted Average Cost of Capital)
  • Result: Enterprise Value (value of entire firm)

FCFF represents cash flow available to all capital providers (debt and equity), so it should be discounted at the weighted average cost of all capital sources (WACC), resulting in the value of the entire enterprise.

To get equity value, subtract net debt from enterprise value.

Practice Problem 6.4: DCF Model Construction

You are building a DCF model for Company JKL. Forecast the following:

Financial Projections:

  • Year 1 Revenue: 500M(growing10500M (growing 10% annually)0=$75M(Year0WC=0)0 = \text{\$}75M (Year 0 WC = 0)wew_e=$800M÷$1,000M=0.80= \text{\$}800M ÷ \text{\$}1,000M = 0.80wdw_d=$200M÷$1,000M=0.20= \text{\$}200M ÷ \text{\$}1,000M = 0.20200M∗∗EquityValue:∗∗EquityValue=200M **Equity Value:** Equity Value =V0V_0=Intrinsicvaluetoday−= Intrinsic value today -DtD_t=Expecteddividendinperiod= Expected dividend in periodt$t\text{\$}r$=Requiredrateofreturn(costofequity)r\text{\$} = Required rate of return (cost of equity)g<rg < risRequired:∗∗Therequirementthatis Required:** The requirement thatg<rg < risfundamentaltothemodel′svalidity.Ifdividendsgrowfasterthantherequiredreturn,thepresentvalueoffuturedividendswouldbeinfinite,whichiseconomicallyimpossible.Inpractice,nocompanycangrowfasterthantheeconomyforever,andevenhigh−growthcompanieseventuallymature.Theis fundamental to the model's validity. If dividends grow faster than the required return, the present value of future dividends would be infinite, which is economically impossible. In practice, no company can grow faster than the economy forever, and even high-growth companies eventually mature. Theg<rg < rconstraintensuresthatthemodelproducesreasonablevaluations.Whenyouencounterasituationwhere$g≥rconstraint ensures that the model produces reasonable valuations. When you encounter a situation where \text{\$}g \geq r2.00pershare−Expecteddividendgrowth:5−Requiredrateofreturn:10−Currentstockprice:2.00 per share - Expected dividend growth: 5% per year - Required rate of return: 10% - Current stock price:D1=D0×(1+g)=$2.00×1.05=$2.10D_1 = D_0 \times (1 + g) = \text{\$}2.00 \times 1.05 = \text{\$}2.10$V0=$2.100.10−0.05=$2.100.05=$42.00\text{\$}V_0 = \frac{\text{\$}2.10}{0.10 - 0.05} = \frac{\text{\$}2.10}{0.05} = \text{\$}42.00

Valuation Assessment:

  • Intrinsic value: $42.00
  • Current price: $45.00
  • Stock is overvalued by: ($45 - $42) ÷ $42 = 7.1%

The stock trades at a premium to its DDM-derived intrinsic value.

Let's visualize the Gordon Growth Model with enhanced detail:

Python exercise

#| label: gordon-growth-model-enhanced
#| fig-cap: "Gordon Growth Model: Enhanced visualization showing P_0 = D_1/(r-g) with dividend growth timeline"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Example from text
d0 = 2.00  # Current dividend
g = 0.05  # 5% growth rate
r = 0.10  # 10% required return
current_price = 45

# Calculate D1 and intrinsic value
d1 = d0 * (1 + g)
intrinsic_value = d1 / (r - g)

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('Gordon Growth Model: P₀ = D₁/(r - g) - Enhanced Visualization',
            fontsize=16, fontweight='bold')

# Plot 1: Dividend Growth Timeline
ax1 = axes[0, 0]
years = np.arange(0, 21)
dividends = [d0 * (1 + g) ** t for t in years]
pv_dividends = [d / ((1 + r) ** t) for t, d in zip(years, dividends)]

ax1.plot(years, dividends, 'b-o', linewidth=3, markersize=8, alpha=0.8,
        label=f'Dividends: D(t) = D₀ × (1+g)^t\ng = {g*100:.0f}%', zorder=5)
ax1.plot(years, pv_dividends, 'r--s', linewidth=2, markersize=6, alpha=0.8,
        label=f'Present Value: PV = D/(1+r)^t\nr = {r*100:.0f}%')
ax1.fill_between(years, 0, pv_dividends, alpha=0.3, color='red')

ax1.set_xlabel('Year (t)', fontsize=12, fontweight='bold')
ax1.set_ylabel('Dividend ($)', fontsize=12, fontweight='bold')
ax1.set_title('Dividend Growth Over Time: Growing Perpetuity', fontsize=13, fontweight='bold')
ax1.grid(True, alpha=0.3, linestyle='--')
ax1.legend(loc='upper left', fontsize=9)
ax1.set_xlim(-0.5, 20.5)

# Add formula annotation
ax1.text(0.02, 0.98, f'Gordon Growth Model:\nP₀ = D₁ / (r - g)\n\nWhere:\nD₁ = D₀ × (1+g)\nD₁ = ${d0:.2f} × 1.{int(g*100):02d}\nD₁ = ${d1:.2f}\n\nP₀ = ${d1:.2f} / ({r*100:.0f}% - {g*100:.0f}%)\nP₀ = ${d1:.2f} / {(r-g)*100:.1f}%\nP₀ = ${intrinsic_value:.2f}',
        transform=ax1.transAxes, fontsize=9, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.9),
        verticalalignment='top', family='monospace')

# Add intrinsic value line
ax1.axhline(y=intrinsic_value, color='green', linestyle=':', linewidth=2, alpha=0.7,
           label=f'Intrinsic Value = ${intrinsic_value:.2f}')

# Plot 2: Growth Rate Sensitivity
ax2 = axes[0, 1]
growth_rates = np.linspace(0.01, r - 0.01, 50)  # g must be < r
values_by_growth = [d1 / (r - g_val) for g_val in growth_rates]

ax2.plot(growth_rates * 100, values_by_growth, 'b-', linewidth=3, alpha=0.8,
        label='Intrinsic Value vs. Growth Rate')
ax2.axvline(x=g * 100, color='red', linestyle='--', linewidth=2, alpha=0.7,
           label=f'Base Growth: {g*100:.0f}%')
ax2.plot(g * 100, intrinsic_value, 'ro', markersize=12, markeredgewidth=2,
        markeredgecolor='white', zorder=5)

ax2.set_xlabel('Growth Rate (g) (%)', fontsize=12, fontweight='bold')
ax2.set_ylabel('Intrinsic Value ($)', fontsize=12, fontweight='bold')
ax2.set_title('Growth Rate Sensitivity: P₀ = D₁/(r - g)', fontsize=13, fontweight='bold')
ax2.grid(True, alpha=0.3, linestyle='--')
ax2.legend(loc='upper left', fontsize=9)

# Add annotation
ax2.annotate(f'At {g*100:.0f}% growth:\nP₀ = ${intrinsic_value:.2f}',
            xy=(g * 100, intrinsic_value), xytext=(g * 100 + 1, intrinsic_value + 5),
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='red', lw=2))

# Add warning zone
ax2.axvspan((r - 0.01) * 100, r * 100, alpha=0.2, color='red',
           label='Warning: g → r (P₀ → ∞)')

# Plot 3: Required Return Sensitivity
ax3 = axes[1, 0]
required_returns = np.linspace(g + 0.01, 0.15, 50)  # r must be > g
values_by_return = [d1 / (r_val - g) for r_val in required_returns]

ax3.plot(required_returns * 100, values_by_return, 'g-', linewidth=3, alpha=0.8,
        label='Intrinsic Value vs. Required Return')
ax3.axvline(x=r * 100, color='blue', linestyle='--', linewidth=2, alpha=0.7,
           label=f'Base Required Return: {r*100:.0f}%')
ax3.plot(r * 100, intrinsic_value, 'go', markersize=12, markeredgewidth=2,
        markeredgecolor='white', zorder=5)

ax3.set_xlabel('Required Return (r) (%)', fontsize=12, fontweight='bold')
ax3.set_ylabel('Intrinsic Value ($)', fontsize=12, fontweight='bold')
ax3.set_title('Required Return Sensitivity: P₀ = D₁/(r - g)', fontsize=13, fontweight='bold')
ax3.grid(True, alpha=0.3, linestyle='--')
ax3.legend(loc='upper right', fontsize=9)

# Add annotation
ax3.annotate(f'At {r*100:.0f}% required return:\nP₀ = ${intrinsic_value:.2f}',
            xy=(r * 100, intrinsic_value), xytext=(r * 100 + 1, intrinsic_value + 5),
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.9),
            arrowprops=dict(arrowstyle='->', color='blue', lw=2))

# Plot 4: Valuation Assessment
ax4 = axes[1, 1]
valuation_metrics = ['Current\nPrice', 'Intrinsic\nValue', 'Fair Value\nRange']
price_values = [current_price, intrinsic_value, (intrinsic_value * 0.9 + intrinsic_value * 1.1) / 2]
price_range = [current_price, intrinsic_value, intrinsic_value * 0.1]  # Range for fair value

colors_valuation = ['#FF6B6B', '#4ECDC4', '#45B7D1']
bars = ax4.bar(range(len(valuation_metrics)), price_values,
               color=colors_valuation, alpha=0.7, edgecolor='black', linewidth=1.5)

# Add range for fair value
ax4.errorbar(2, price_values[2], yerr=price_range[2], fmt='none', color='black',
            elinewidth=2, capsize=10, capthick=2)

ax4.set_ylabel('Price ($)', fontsize=12, fontweight='bold')
ax4.set_title('Valuation Assessment: Current Price vs. Intrinsic Value', fontsize=13, fontweight='bold')
ax4.set_xticks(range(len(valuation_metrics)))
ax4.set_xticklabels(valuation_metrics)
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for i, (bar, val) in enumerate(zip(bars, price_values)):
    height = bar.get_height()
    if i == 2:
        label = f'${val:.2f}\n±10%'
    else:
        label = f'${val:.2f}'
    ax4.text(bar.get_x() + bar.get_width()/2., height + 1,
            label, ha='center', va='bottom',
            fontsize=10, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add assessment annotation
premium_discount = ((current_price - intrinsic_value) / intrinsic_value) * 100
if premium_discount > 0:
    assessment = f'Overvalued by {premium_discount:.1f}%'
    color_assessment = 'red'
else:
    assessment = f'Undervalued by {abs(premium_discount):.1f}%'
    color_assessment = 'green'

ax4.text(0.5, 0.98, f'Assessment:\n{assessment}\n\nCurrent: ${current_price:.2f}\nIntrinsic: ${intrinsic_value:.2f}',
        transform=ax4.transAxes, ha='center', va='top',
        fontsize=10, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor=color_assessment, alpha=0.3),
        family='monospace')

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **Gordon Growth Model Analysis**")
print(f"{'='*70}")
print(f"Formula: P₀ = D₁ / (r - g)")
print(f"  where P₀ = intrinsic value today")
print(f"        D₁ = dividend next year = D₀ × (1+g)")
print(f"        r = required rate of return")
print(f"        g = constant growth rate (must be < r)")
print(f"{'='*70}")
print(f"Example Calculation:")
print(f"  D₀ (current dividend): ${d0:.2f}")
print(f"  Growth rate (g): {g*100:.0f}%")
print(f"  D₁ = D₀ × (1+g) = ${d0:.2f} × 1.{int(g*100):02d} = ${d1:.2f}")
print(f"  Required return (r): {r*100:.0f}%")
print(f"  P₀ = ${d1:.2f} / ({r*100:.0f}% - {g*100:.0f}%)")
print(f"  P₀ = ${d1:.2f} / {(r-g)*100:.1f}%")
print(f"  P₀ = ${intrinsic_value:.2f}")
print(f"{'='*70}")
print(f"Valuation Assessment:")
print(f"  Current Price: ${current_price:.2f}")
print(f"  Intrinsic Value: ${intrinsic_value:.2f}")
print(f"  Difference: ${abs(current_price - intrinsic_value):.2f} ({premium_discount:+.1f}%)")
if premium_discount > 0:
    print(f"  → Stock is OVERVALUED")
else:
    print(f"  → Stock is UNDERVALUED")
print(f"{'='*70}")
print(f"Key Insights:")
print(f"  • Higher growth → Higher intrinsic value")
print(f"  • Higher required return → Lower intrinsic value")
print(f"  • Growth must be < required return (g < r)")
print(f"  • Model assumes constant growth forever")
print(f"{'='*70}")
print(f"✅ Gordon Growth Model for stable, mature companies")
print(f"✅ Simple but powerful valuation tool")
print(f"✅ Sensitive to growth and discount rate assumptions")

Python exercise

#| label: fig-gordon-growth-visualization
#| fig-cap: "Gordon Growth Model: Understanding Dividend Discount Model with Constant Growth"
#| fig-width: 14
#| fig-height: 8

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import matplotlib.pyplot as plt
from IPython.display import display
import numpy as np

# Create figure
fig, axes = plt.subplots(1, 2, figsize=(16, 8))
fig.suptitle('Gordon Growth Model: Valuing Stocks with Constant Dividend Growth', fontsize=16, fontweight='bold')

# Left plot: Dividend growth over time
ax1 = axes[0]

# Example: D0 = $2.00, g = 5%, r = 10%
d0 = 2.00
g = 0.05
r = 0.10
years = np.arange(1, 21)
dividends = [d0 * (1 + g) ** t for t in years]
pv_dividends = [d / ((1 + r) ** t) for t, d in zip(years, dividends)]

# Plot dividends
ax1.plot(years, dividends, 'b-', linewidth=2.5, marker='o', markersize=4, label='Dividends', alpha=0.8)
ax1.plot(years, pv_dividends, 'r--', linewidth=2, marker='s', markersize=3, label='Present Value', alpha=0.8)

ax1.set_xlabel('Year', fontsize=12, fontweight='bold')
ax1.set_ylabel('Dividend ($)', fontsize=12, fontweight='bold')
ax1.set_title('Dividend Growth Over Time: D(t) = D(0) × (1+g)^t', fontsize=13, fontweight='bold')
ax1.grid(True, alpha=0.3, linestyle='--')
ax1.legend(fontsize=10)
ax1.set_xlim(0, 21)

# Add formula annotation
intrinsic_value = d0 * (1 + g) / (r - g)
# Simplified annotation to avoid matplotlib math parsing issues
text_content = f'Intrinsic Value = D1 / (r - g) = {intrinsic_value:.2f}'
ax1.text(0.5, 0.95, text_content,
         transform=ax1.transAxes, ha='center', fontsize=10, fontweight='bold',
         bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.8))

# Right plot: Sensitivity to growth rate and discount rate
ax2 = axes[1]

# Sensitivity analysis
growth_rates = np.linspace(0.01, 0.09, 9)  # 1% to 9% growth
discount_rates = [0.08, 0.10, 0.12]  # Different discount rates

for r_val in discount_rates:
    values = [d0 * (1 + g_val) / (r_val - g_val) for g_val in growth_rates if g_val < r_val]
    valid_growth = [g_val for g_val in growth_rates if g_val < r_val]
    ax2.plot([g*100 for g in valid_growth], values, linewidth=2.5, marker='o', markersize=5,
             label=f'r = {r_val*100:.0f}%', alpha=0.8)

ax2.set_xlabel('Growth Rate (g, %)', fontsize=12, fontweight='bold')
ax2.set_ylabel('Intrinsic Value ($)', fontsize=12, fontweight='bold')
ax2.set_title('Sensitivity: Value vs. Growth Rate for Different Discount Rates', fontsize=13, fontweight='bold')
ax2.grid(True, alpha=0.3, linestyle='--')
ax2.legend(fontsize=10)
ax2.axhline(y=0, color='black', linestyle='-', linewidth=1)

# Add critical insight
ax2.text(0.5, 0.95, 'As g approaches r, value → ∞\nMust have g < r for valid valuation',
         transform=ax2.transAxes, ha='center', fontsize=10, fontweight='bold',
         bbox=dict(boxstyle='round', facecolor='lightcoral', alpha=0.8))

# Add formula
fig.text(0.5, 0.02, 'Gordon Growth Model: V₀ = D₁ ÷ (r - g) = D₀ × (1+g) ÷ (r - g)  |  Requires: g < r', 
         ha='center', fontsize=13, fontweight='bold',
         bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.8))

plt.tight_layout()
display(fig)
plt.close(fig)

Deriving the Gordon Growth Model

The constant growth DDM can be derived from the general DDM formula:

General DDM:
V0=D11+r+D2(1+r)2+D3(1+r)3+⋯V_0 = \frac{D_1}{1 + r} + \frac{D_2}{(1 + r)^2} + \frac{D_3}{(1 + r)^3} + \cdots

With constant growth:

Let's visualize the Two-Stage DDM with enhanced detail:

Python exercise

#| label: two-stage-ddm-enhanced
#| fig-cap: "Two-Stage DDM: Enhanced visualization showing high growth period + stable growth period with timeline"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Example from text
d0 = 1.00
g1 = 0.15  # High growth: 15%
g2 = 0.05  # Stable growth: 5%
r = 0.12   # Required return: 12%
n = 5      # High growth period: 5 years

# Calculate dividends for high growth period
years_high = np.arange(1, n + 1)
dividends_high = [d0 * (1 + g1) ** t for t in years_high]
pv_dividends_high = [d / ((1 + r) ** t) for t, d in zip(years_high, dividends_high)]
sum_pv_high = sum(pv_dividends_high)

# Terminal value (constant growth phase)
d_n = dividends_high[-1]
d_n1 = d_n * (1 + g2)
terminal_value = d_n1 / (r - g2)
pv_terminal = terminal_value / ((1 + r) ** n)

# Total intrinsic value
intrinsic_value = sum_pv_high + pv_terminal

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('Two-Stage DDM: High Growth Period + Stable Growth Period',
            fontsize=16, fontweight='bold')

# Plot 1: Dividend Timeline
ax1 = axes[0, 0]
years_extended = np.arange(1, 21)
dividends_extended = []
for t in years_extended:
    if t <= n:
        dividends_extended.append(d0 * (1 + g1) ** t)
    else:
        # After high growth, use stable growth
        dividends_extended.append(dividends_high[-1] * (1 + g2) ** (t - n))

# Plot high growth period
ax1.bar(years_high, dividends_high, color='#4ECDC4', alpha=0.7, edgecolor='black', linewidth=1.5,
       label=f'High Growth Period (g₁ = {g1*100:.0f}%)')
# Plot stable growth period (first 15 years shown)
years_stable = np.arange(n + 1, 21)
dividends_stable = dividends_extended[n:]
ax1.bar(years_stable, dividends_stable, color='#FF6B6B', alpha=0.7, edgecolor='black', linewidth=1.5,
       label=f'Stable Growth Period (g₂ = {g2*100:.0f}%)')

# Add divider
ax1.axvline(x=n + 0.5, color='red', linestyle='--', linewidth=2, alpha=0.7,
           label=f'End of High Growth Period (Year {n})')

ax1.set_xlabel('Year', fontsize=12, fontweight='bold')
ax1.set_ylabel('Dividend ($)', fontsize=12, fontweight='bold')
ax1.set_title('Two-Stage DDM: Dividend Growth Timeline', fontsize=13, fontweight='bold')
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')
ax1.legend(loc='upper left', fontsize=9)

# Add value labels for key years
for t in [1, n, n+1, 10, 15]:
    if t <= len(dividends_extended):
        ax1.text(t, dividends_extended[t-1] + 0.1, f'${dividends_extended[t-1]:.2f}',
                ha='center', fontsize=8, fontweight='bold',
                bbox=dict(boxstyle='round', facecolor='white', alpha=0.8))

# Plot 2: Present Value Breakdown
ax2 = axes[0, 1]
components = ['PV(High\nGrowth)', 'PV(Terminal\nValue)', 'Intrinsic\nValue']
values = [sum_pv_high, pv_terminal, intrinsic_value]
colors_comp = ['#4ECDC4', '#FF6B6B', '#45B7D1']
bars = ax2.bar(components, values, color=colors_comp, alpha=0.7, edgecolor='black', linewidth=1.5)
ax2.set_ylabel('Present Value ($)', fontsize=12, fontweight='bold')
ax2.set_title('Two-Stage DDM: Value Breakdown', fontsize=13, fontweight='bold')
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, val in zip(bars, values):
    height = bar.get_height()
    pct = (val / intrinsic_value) * 100 if bar != bars[-1] else 100
    label = f'${val:.2f}' if bar != bars[-1] else f'${val:.2f}\n(Total)'
    ax2.text(bar.get_x() + bar.get_width()/2., height + 0.5,
            label, ha='center', va='bottom',
            fontsize=10, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add formula annotation
ax2.text(0.5, 0.98, f'Formula:\nV₀ = Σ[D₀(1+g₁)^t/(1+r)^t] + TV/(1+r)^n\n\nHigh Growth: {n} years @ {g1*100:.0f}%\nStable Growth: Forever @ {g2*100:.0f}%\n\nV₀ = ${sum_pv_high:.2f} + ${pv_terminal:.2f}\nV₀ = ${intrinsic_value:.2f}',
        transform=ax2.transAxes, ha='center', va='top',
        fontsize=9, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.9),
        family='monospace')

# Plot 3: Growth Rate Comparison
ax3 = axes[1, 0]
# Show growth rates over time
years_plot = np.arange(0, 21)
growth_rates = [g1 if t <= n else g2 for t in years_plot]

ax3.plot(years_plot, [g * 100 for g in growth_rates], 'b-', linewidth=3, marker='o', markersize=8,
        alpha=0.8, label='Growth Rate Over Time')
ax3.axvline(x=n, color='red', linestyle='--', linewidth=2, alpha=0.7,
           label=f'Transition at Year {n}')
ax3.fill_between(years_plot[:n+1], 0, [g1 * 100] * (n+1), alpha=0.2, color='green',
               label=f'High Growth: {g1*100:.0f}%')
ax3.fill_between(years_plot[n:], 0, [g2 * 100] * (len(years_plot) - n), alpha=0.2, color='blue',
               label=f'Stable Growth: {g2*100:.0f}%')

ax3.set_xlabel('Year', fontsize=12, fontweight='bold')
ax3.set_ylabel('Growth Rate (%)', fontsize=12, fontweight='bold')
ax3.set_title('Two-Stage Growth Pattern: Transition from High to Stable', fontsize=13, fontweight='bold')
ax3.grid(True, alpha=0.3, linestyle='--')
ax3.legend(loc='upper right', fontsize=9)
ax3.set_ylim(0, (g1 * 100) * 1.2)

# Plot 4: Individual PV Contributions (High Growth Period)
ax4 = axes[1, 1]
bars = ax4.bar(range(len(years_high)), pv_dividends_high,
               color=plt.cm.viridis(np.linspace(0.2, 0.8, len(years_high))),
               alpha=0.7, edgecolor='black', linewidth=1.5)
ax4.axhline(y=sum_pv_high, color='red', linestyle='--', linewidth=2, alpha=0.7,
           label=f'Sum: ${sum_pv_high:.2f}')

# Add value labels
for i, (bar, div, pv) in enumerate(zip(bars, dividends_high, pv_dividends_high)):
    height = bar.get_height()
    ax4.text(bar.get_x() + bar.get_width()/2., height + 0.05,
            f'Y{i+1}: ${div:.2f}\nPV: ${pv:.2f}',
            ha='center', va='bottom',
            fontsize=8, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

ax4.set_xlabel('Year', fontsize=12, fontweight='bold')
ax4.set_ylabel('Present Value ($)', fontsize=12, fontweight='bold')
ax4.set_title('High Growth Period: Individual PV Contributions', fontsize=13, fontweight='bold')
ax4.set_xticks(range(len(years_high)))
ax4.set_xticklabels([f'Year {y}' for y in years_high])
ax4.legend(loc='upper left', fontsize=9)
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **Two-Stage DDM Analysis**")
print(f"{'='*70}")
print(f"Formula: V₀ = Σ[D₀(1+g₁)^t/(1+r)^t] + TV/(1+r)^n")
print(f"  where High Growth: {n} years at {g1*100:.0f}%")
print(f"        Stable Growth: Forever at {g2*100:.0f}%")
print(f"        TV = D_{n+1}/(r-g₂)")
print(f"{'='*70}")
print(f"High Growth Period Dividends:")
print(f"{'Year':<10} {'Dividend':<15} {'PV':<15}")
print(f"{'-'*70}")
for t, div, pv in zip(years_high, dividends_high, pv_dividends_high):
    print(f"{t:<10} ${div:>10.2f}   ${pv:>10.2f}")
print(f"  Sum PV(High Growth): ${sum_pv_high:.2f}")
print(f"{'='*70}")
print(f"Terminal Value (Stable Growth Phase):")
print(f"  D_{n} = ${d_n:.2f}")
print(f"  D_{n+1} = D_{n} × (1+g₂) = ${d_n:.2f} × 1.{int(g2*100):02d} = ${d_n1:.2f}")
print(f"  TV = ${d_n1:.2f} / ({r*100:.0f}% - {g2*100:.0f}%) = ${d_n1:.2f} / {(r-g2)*100:.1f}%")
print(f"  TV = ${terminal_value:.2f}")
print(f"  PV(TV) = ${terminal_value:.2f} / (1+{r:.2f})^{n} = ${pv_terminal:.2f}")
print(f"{'='*70}")
print(f"Total Intrinsic Value:")
print(f"  V₀ = PV(High Growth) + PV(Terminal)")
print(f"  V₀ = ${sum_pv_high:.2f} + ${pv_terminal:.2f}")
print(f"  V₀ = ${intrinsic_value:.2f}")
print(f"{'='*70}")
print(f"✅ Two-stage model for companies transitioning to maturity")
print(f"✅ Captures high growth phase followed by stable growth")
print(f"✅ More realistic than constant growth for growth companies")

Three-Stage DDM

The Three-Stage DDM is even more realistic, modeling:

  1. High growth period: Rapid growth for n1n_1years2.∗∗Transitionperiod∗∗:Growthgraduallydeclinesoveryears 2. **Transition period**: Growth gradually declines overn2n_2years3.∗∗Matureperiod∗∗:Constantgrowthforever∗∗Formula(Simplified):∗∗MATH:math−234Wheregrowthintransitionperioddeclineslinearlyfromyears 3. **Mature period**: Constant growth forever **Formula (Simplified):** {{MATH:math-234}} Where growth in transition period declines linearly fromg1g_1to$g3to \text{\$}g_3.

Use Case: Companies transitioning from growth to maturity (e.g., technology companies becoming mature).

Let's visualize the Three-Stage DDM with enhanced detail:

Python exercise

#| label: three-stage-ddm-enhanced
#| fig-cap: "Three-Stage DDM: Enhanced visualization showing three growth phases: high → declining → stable"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display

# Example: Three-Stage DDM
d0 = 1.00
g1 = 0.20  # High growth: 20%
g2 = 0.05  # Stable growth: 5%
r = 0.12   # Required return: 12%
n1 = 5     # High growth period: 5 years
n2 = 5     # Transition period: 5 years

# Calculate dividends for high growth period
years_high = np.arange(1, n1 + 1)
dividends_high = [d0 * (1 + g1) ** t for t in years_high]
pv_dividends_high = [d / ((1 + r) ** t) for t, d in zip(years_high, dividends_high)]
sum_pv_high = sum(pv_dividends_high)

# Transition period: growth declines linearly from g1 to g2
years_transition = np.arange(n1 + 1, n1 + n2 + 1)
growth_transition = [g1 - (g1 - g2) * (t - n1) / n2 for t in years_transition]
dividends_transition = []
prev_div = dividends_high[-1]
for g in growth_transition:
    new_div = prev_div * (1 + g)
    dividends_transition.append(new_div)
    prev_div = new_div

pv_dividends_transition = [d / ((1 + r) ** t) for t, d in zip(years_transition, dividends_transition)]
sum_pv_transition = sum(pv_dividends_transition)

# Terminal value (stable growth phase)
d_terminal = dividends_transition[-1]
d_terminal_next = d_terminal * (1 + g2)
terminal_value = d_terminal_next / (r - g2)
pv_terminal = terminal_value / ((1 + r) ** (n1 + n2))

# Total intrinsic value
intrinsic_value = sum_pv_high + sum_pv_transition + pv_terminal

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('Three-Stage DDM: High Growth → Transition → Stable Growth',
            fontsize=16, fontweight='bold')

# Plot 1: Dividend Timeline with Three Stages
ax1 = axes[0, 0]
# Extend dividends for stable period (first 10 years shown)
years_stable = np.arange(n1 + n2 + 1, n1 + n2 + 11)
dividends_stable = [dividends_transition[-1] * (1 + g2) ** (t - n1 - n2) for t in years_stable]

# Plot high growth period
ax1.bar(years_high, dividends_high, color='#4ECDC4', alpha=0.7, edgecolor='black', linewidth=1.5,
       label=f'Stage 1: High Growth (g₁ = {g1*100:.0f}%)')
# Plot transition period
ax1.bar(years_transition, dividends_transition, color='#FFA07A', alpha=0.7, edgecolor='black', linewidth=1.5,
       label=f'Stage 2: Transition (g₁ → g₂)')
# Plot stable growth period
ax1.bar(years_stable, dividends_stable, color='#FF6B6B', alpha=0.7, edgecolor='black', linewidth=1.5,
       label=f'Stage 3: Stable Growth (g₂ = {g2*100:.0f}%)')

# Add dividers
ax1.axvline(x=n1 + 0.5, color='blue', linestyle='--', linewidth=2, alpha=0.7,
           label=f'End of Stage 1 (Year {n1})')
ax1.axvline(x=n1 + n2 + 0.5, color='red', linestyle='--', linewidth=2, alpha=0.7,
           label=f'End of Stage 2 (Year {n1+n2})')

ax1.set_xlabel('Year', fontsize=12, fontweight='bold')
ax1.set_ylabel('Dividend ($)', fontsize=12, fontweight='bold')
ax1.set_title('Three-Stage DDM: Dividend Growth Timeline', fontsize=13, fontweight='bold')
ax1.grid(True, alpha=0.3, linestyle='--', axis='y')
ax1.legend(loc='upper left', fontsize=8)

# Plot 2: Value Breakdown
ax2 = axes[0, 1]
components = ['PV(Stage 1:\nHigh Growth)', 'PV(Stage 2:\nTransition)', 
              'PV(Stage 3:\nTerminal)', 'Intrinsic\nValue']
values = [sum_pv_high, sum_pv_transition, pv_terminal, intrinsic_value]
colors_comp = ['#4ECDC4', '#FFA07A', '#FF6B6B', '#45B7D1']
bars = ax2.bar(components, values, color=colors_comp, alpha=0.7, edgecolor='black', linewidth=1.5)
ax2.set_ylabel('Present Value ($)', fontsize=12, fontweight='bold')
ax2.set_title('Three-Stage DDM: Value Breakdown', fontsize=13, fontweight='bold')
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for i, (bar, val) in enumerate(zip(bars, values)):
    height = bar.get_height()
    if i < len(values) - 1:
        pct = (val / intrinsic_value) * 100
        label = f'${val:.2f}\n({pct:.1f}%)'
    else:
        label = f'${val:.2f}\n(Total)'
    ax2.text(bar.get_x() + bar.get_width()/2., height + 0.5,
            label, ha='center', va='bottom',
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add formula annotation
ax2.text(0.02, 0.98, f'Formula:\nV₀ = PV(Stage 1) + PV(Stage 2) + PV(Stage 3)\n\nStage 1: {n1} years @ {g1*100:.0f}%\nStage 2: {n2} years (declining)\nStage 3: Forever @ {g2*100:.0f}%\n\nV₀ = ${sum_pv_high:.2f} + ${sum_pv_transition:.2f} + ${pv_terminal:.2f}\nV₀ = ${intrinsic_value:.2f}',
        transform=ax2.transAxes, fontsize=9, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.9),
        verticalalignment='top', family='monospace')

# Plot 3: Growth Rate Transition
ax3 = axes[1, 0]
years_all = np.concatenate([years_high, years_transition, years_stable])
growth_all = [g1] * len(years_high) + [g for g in growth_transition] + [g2] * len(years_stable)

ax3.plot(years_all, [g * 100 for g in growth_all], 'b-', linewidth=3, marker='o', markersize=6,
        alpha=0.8, label='Growth Rate Over Time')
ax3.axvline(x=n1, color='green', linestyle='--', linewidth=2, alpha=0.7,
           label=f'Stage 1 → Stage 2 (Year {n1})')
ax3.axvline(x=n1 + n2, color='red', linestyle='--', linewidth=2, alpha=0.7,
           label=f'Stage 2 → Stage 3 (Year {n1+n2})')
ax3.fill_between(years_all[:n1], 0, [g1 * 100] * n1, alpha=0.2, color='green',
               label=f'Stage 1: {g1*100:.0f}%')
ax3.fill_between(years_transition, 0, [g * 100 for g in growth_transition], alpha=0.2, color='orange',
               label='Stage 2: Declining')
ax3.fill_between(years_stable, 0, [g2 * 100] * len(years_stable), alpha=0.2, color='blue',
               label=f'Stage 3: {g2*100:.0f}%')

ax3.set_xlabel('Year', fontsize=12, fontweight='bold')
ax3.set_ylabel('Growth Rate (%)', fontsize=12, fontweight='bold')
ax3.set_title('Three-Stage Growth Pattern: High → Transition → Stable', fontsize=13, fontweight='bold')
ax3.grid(True, alpha=0.3, linestyle='--')
ax3.legend(loc='upper right', fontsize=8)
ax3.set_ylim(0, (g1 * 100) * 1.2)

# Plot 4: Stage Contributions
ax4 = axes[1, 1]
stages = ['Stage 1\n(High)', 'Stage 2\n(Transition)', 'Stage 3\n(Terminal)']
pv_values = [sum_pv_high, sum_pv_transition, pv_terminal]
colors_stages = ['#4ECDC4', '#FFA07A', '#FF6B6B']
bars = ax4.bar(stages, pv_values, color=colors_stages, alpha=0.7, edgecolor='black', linewidth=1.5)
ax4.set_ylabel('Present Value ($)', fontsize=12, fontweight='bold')
ax4.set_title('Three-Stage DDM: Individual Stage Contributions', fontsize=13, fontweight='bold')
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, val in zip(bars, pv_values):
    height = bar.get_height()
    pct = (val / intrinsic_value) * 100
    ax4.text(bar.get_x() + bar.get_width()/2., height + 0.3,
            f'${val:.2f}\n({pct:.1f}%)', ha='center', va='bottom',
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add total line
ax4.axhline(y=intrinsic_value, color='green', linestyle='--', linewidth=2, alpha=0.7,
           label=f'Total: ${intrinsic_value:.2f}')
ax4.legend(loc='upper left', fontsize=9)

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **Three-Stage DDM Analysis**")
print(f"{'='*70}")
print(f"Formula: V₀ = PV(Stage 1) + PV(Stage 2) + PV(Stage 3)")
print(f"  Stage 1: High growth ({n1} years @ {g1*100:.0f}%)")
print(f"  Stage 2: Transition ({n2} years, declining from {g1*100:.0f}% to {g2*100:.0f}%)")
print(f"  Stage 3: Stable growth (forever @ {g2*100:.0f}%)")
print(f"{'='*70}")
print(f"Stage 1 (High Growth):")
print(f"  PV(Stage 1) = ${sum_pv_high:.2f}")
print(f"{'='*70}")
print(f"Stage 2 (Transition):")
print(f"  Growth declines linearly from {g1*100:.0f}% to {g2*100:.0f}%")
print(f"  PV(Stage 2) = ${sum_pv_transition:.2f}")
print(f"{'='*70}")
print(f"Stage 3 (Terminal - Stable Growth):")
print(f"  D_{n1+n2} = ${d_terminal:.2f}")
print(f"  D_{n1+n2+1} = ${d_terminal:.2f} × (1+{g2:.2f}) = ${d_terminal_next:.2f}")
print(f"  TV = ${d_terminal_next:.2f} / ({r*100:.0f}% - {g2*100:.0f}%) = ${terminal_value:.2f}")
print(f"  PV(TV) = ${terminal_value:.2f} / (1+{r:.2f})^{n1+n2} = ${pv_terminal:.2f}")
print(f"{'='*70}")
print(f"Total Intrinsic Value:")
print(f"  V₀ = ${sum_pv_high:.2f} + ${sum_pv_transition:.2f} + ${pv_terminal:.2f}")
print(f"  V₀ = ${intrinsic_value:.2f}")
print(f"{'='*70}")
print(f"✅ Three-stage model for companies transitioning to maturity")
print(f"✅ Captures high growth → transition → stable phases")
print(f"✅ Most realistic for growth companies becoming mature")

Special Cases of DDM

Zero Growth Model (Perpetuity)

If dividends are constant (no growth), the model simplifies to:

V0=DrV_0 = \frac{D}{r}

Where D$=Constantdividendperperiod.D\text{\$} = Constant dividend per period.g1g_1thatdeclineslinearlyto$g2that declines linearly to \text{\$}g_2over$H$yearsover \text{\$}H\text{\$} yearsg2g_2forever∗∗Formula:∗∗MATH:math−242Whereforever **Formula:** {{MATH:math-242}} WhereH$=Half−lifeofhigh−growthperiod(yearsuntilgrowthreachesmidpoint).H\text{\$} = Half-life of high-growth period (years until growth reaches midpoint).E1E_13.00pershare,expectedtogrowat4A.3.00 per share, expected to grow at 4% per year forever. If the required rate of return is 10%, what is the stock's intrinsic value using the Gordon Growth Model? A.D1=D0×(1+g)=$3.00×1.04=$3.12D_1 = D_0 \times (1 + g) = \text{\$}3.00 \times 1.04 = \text{\$}3.12$V0=D1r−g=$3.120.10−0.04=$3.120.06=$52.00\text{\$}V_0 = \frac{D_1}{r - g} = \frac{\text{\$}3.12}{0.10 - 0.04} = \frac{\text{\$}3.12}{0.06} = \text{\$}52.003.12÷3.12 ÷g=ROE×Retention Ratio=15%×50%=∗∗7.5∗∗2.IntrinsicValue(ConstantGrowthDDM):∗∗g = \text{ROE} \times \text{Retention Ratio} = 15\% \times 50\% = **7.5%** **2. Intrinsic Value (Constant Growth DDM):**D1=D0×(1+g)=$2.50×1.075=$2.6875D_1 = D_0 \times (1 + g) = \text{\$}2.50 \times 1.075 = \text{\$}2.6875$V0=D1r−g=$2.68750.11−0.075=$2.68750.035=$76.79\text{\$}V_0 = \frac{D_1}{r - g} = \frac{\text{\$}2.6875}{0.11 - 0.075} = \frac{\text{\$}2.6875}{0.035} = \text{\$}76.79∗∗3.ValuationAssessment:∗∗Currentprice:$60Intrinsicvalue:$76.79∗∗Stockisundervaluedby:∗∗($76.79−$60)÷$60=∗∗28.0ThestocktradesatasignificantdiscounttoitsDDM−derivedintrinsicvalue,suggestingitmaybeanattractiveinvestmentopportunity.∗∗4.ImpliedP/ERatio:∗∗Usingrelationship:P/E=PayoutRatio÷(r−g)P/E=0.50÷(0.11−0.075)=0.50÷0.035=∗∗14.3x∗∗ThisistheP/EratioimpliedbytheDDMassumptions.∗∗5.IntrinsicValuewith6If**3. Valuation Assessment:** Current price: \text{\$}60 Intrinsic value: \text{\$}76.79 **Stock is undervalued by:** (\text{\$}76.79 - \text{\$}60) ÷ \text{\$}60 = **28.0%** The stock trades at a significant discount to its DDM-derived intrinsic value, suggesting it may be an attractive investment opportunity. **4. Implied P/E Ratio:** Using relationship: P/E = Payout Ratio ÷ (r - g) P/E = 0.50 ÷ (0.11 - 0.075) = 0.50 ÷ 0.035 = **14.3x** This is the P/E ratio implied by the DDM assumptions. **5. Intrinsic Value with 6% Growth:** Ifg=6%g = 6\%insteadof7.5$D1=$2.50×1.06=$2.65instead of 7.5%: \text{\$}D_1 = \text{\$}2.50 \times 1.06 = \text{\$}2.65$V0=$2.650.11−0.06=$2.650.05=$53.00\text{\$}V_0 = \frac{\text{\$}2.65}{0.11 - 0.06} = \frac{\text{\$}2.65}{0.05} = \text{\$}53.0076.79−6.076.79 - 6.0% growth:D1=$1.00×1.20=$1.20D_1 = \text{\$}1.00 \times 1.20 = \text{\$}1.20∗∗Year2:∗∗**Year 2:**D2=$1.20×1.20=$1.44D_2 = \text{\$}1.20 \times 1.20 = \text{\$}1.44∗∗Year3:∗∗**Year 3:**D3=$1.44×1.20=$1.73D_3 = \text{\$}1.44 \times 1.20 = \text{\$}1.73∗∗Year4:∗∗**Year 4:**D4=$1.73×1.20=$2.07D_4 = \text{\$}1.73 \times 1.20 = \text{\$}2.07∗∗Year5:∗∗**Year 5:**D5=$2.07×1.20=$2.49D_5 = \text{\$}2.07 \times 1.20 = \text{\$}2.49∗∗2.PresentValueofHigh−GrowthDividends:∗∗PV(Year1)=$1.20÷(1.12)1=∗∗$1.07∗∗PV(Year2)=$1.44÷(1.12)2=∗∗$1.15∗∗PV(Year3)=$1.73÷(1.12)3=∗∗$1.23∗∗PV(Year4)=$2.07÷(1.12)4=∗∗$1.32∗∗PV(Year5)=$2.49÷(1.12)5=∗∗$1.41∗∗∗∗SumPV(High−Growth)=$6.18∗∗∗∗3.TerminalValue(ConstantGrowthPhase):∗∗DividendinYear6**2. Present Value of High-Growth Dividends:** PV(Year 1) = \text{\$}1.20 ÷ (1.12)^1 = **\text{\$}1.07** PV(Year 2) = \text{\$}1.44 ÷ (1.12)^2 = **\text{\$}1.15** PV(Year 3) = \text{\$}1.73 ÷ (1.12)^3 = **\text{\$}1.23** PV(Year 4) = \text{\$}2.07 ÷ (1.12)^4 = **\text{\$}1.32** PV(Year 5) = \text{\$}2.49 ÷ (1.12)^5 = **\text{\$}1.41** **Sum PV(High-Growth) = \text{\$}6.18** **3. Terminal Value (Constant Growth Phase):** Dividend in Year 6=$2.49×1.03=$2.56= \text{\$}2.49 \times 1.03 = \text{\$}2.56TerminalValue=$2.56÷(0.12−0.03)=$2.56÷0.09=∗∗$28.44∗∗Terminal Value = \text{\$}2.56 ÷ (0.12 - 0.03) = \text{\$}2.56 ÷ 0.09 = **\text{\$}28.44**6.18+6.18 +1ofannualrevenue.Thismightseemhigh,butitdependsonthecompany′sprofitmargins.Acompanywitha50∗∗Characteristics:∗∗P/Sratioshaveseveraldistinctivecharacteristics.They∗∗userevenue(topline)ratherthanearnings(bottomline)∗∗,whichmakesthemusefulwhenearningsarenegativeorvolatile.They′re∗∗lessaffectedbyaccountingdifferencesthanearnings∗∗becauserevenuerecognitionrulesaregenerallymoreconsistentthanexpenserecognitionrules.They′re∗∗morestablethanP/Eratios∗∗becauserevenueislessvolatilethanearnings−earningscanswingdramaticallyduetoone−timecharges,write−downs,oraccountingchanges,whilerevenueistypicallymoreconsistent.They′re∗∗particularlyusefulforgrowthcompanieswithno/littleearnings∗∗−companiesthatareinvestingheavilyforgrowthmighthavenegativeearningsbutstillgeneraterevenue.∗∗Advantages:∗∗P/Sratiosofferseveraladvantages.∗∗Nonegativevalues∗∗−revenueisrarelynegative(unlikeearnings),soP/Sratiosarealwayscalculableandmeaningful.ThismakesP/Sratiosusefulforcomparingcompaniesthatarelosingmoney.∗∗Lessmanipulation∗∗−revenueishardertomanipulatethanearnings,thoughrevenuerecognitioncanstillbemanipulatedthroughaggressiveaccounting.∗∗Industrycomparison∗∗−P/Sratiosareusefulforcomparingcompanieswithdifferentmargins,aslongasyouaccountforthosemargindifferences.∗∗Growthstage∗∗−P/Sratiosareappropriateforcompaniesinearlygrowthphaseswhereprofitabilityisstilldeveloping.∗∗Limitations:∗∗P/Sratioshavesignificantlimitations.They∗∗ignoreprofitabilityentirely∗∗−acompanywithaP/Sof2.0mightbeagreatinvestmentifithas30<divclass="example">∗∗Example:P/SRatioAnalysis∗∗Twocompaniesinthesoftwareindustry:∗∗CompanySoftwareA:∗∗−Marketcap:1 of annual revenue. This might seem high, but it depends on the company's profit margins. A company with a 50% net margin might justify a P/S of 2.0, while a company with a 5% net margin probably can't. **Characteristics:** P/S ratios have several distinctive characteristics. They **use revenue (top line) rather than earnings (bottom line)**, which makes them useful when earnings are negative or volatile. They're **less affected by accounting differences than earnings** because revenue recognition rules are generally more consistent than expense recognition rules. They're **more stable than P/E ratios** because revenue is less volatile than earnings - earnings can swing dramatically due to one-time charges, write-downs, or accounting changes, while revenue is typically more consistent. They're **particularly useful for growth companies with no/little earnings** - companies that are investing heavily for growth might have negative earnings but still generate revenue. **Advantages:** P/S ratios offer several advantages. **No negative values** - revenue is rarely negative (unlike earnings), so P/S ratios are always calculable and meaningful. This makes P/S ratios useful for comparing companies that are losing money. **Less manipulation** - revenue is harder to manipulate than earnings, though revenue recognition can still be manipulated through aggressive accounting. **Industry comparison** - P/S ratios are useful for comparing companies with different margins, as long as you account for those margin differences. **Growth stage** - P/S ratios are appropriate for companies in early growth phases where profitability is still developing. **Limitations:** P/S ratios have significant limitations. They **ignore profitability entirely** - a company with a P/S of 2.0 might be a great investment if it has 30% margins, or a terrible investment if it has 2% margins. **Margin differences** mean that companies with the same P/S ratio might have very different profitability and therefore very different valuations. A company with high margins and a P/S of 5.0 might be cheaper than a company with low margins and a P/S of 2.0. **Industry-specific** - different industries have vastly different typical P/S ratios due to differences in profit margins, growth rates, and capital intensity. Comparing P/S ratios across industries is generally meaningless. <div class="example"> **Example: P/S Ratio Analysis** Two companies in the software industry: **Company Software A:** - Market cap:2billion−P/S:5.0x−Netmargin:20∗∗CompanySoftwareB:∗∗−Marketcap:2 billion - P/S: 5.0x - Net margin: 20% **Company Software B:** - Market cap:8billion−Revenue:8 billion - Revenue:2 billion

Analysis:

Key Insight: P/S alone doesn't tell the full story - must consider margins. Company A deserves higher P/S because it converts revenue to earnings more efficiently.

Interpreting P/S Ratios

High P/S Ratio:

Low P/S Ratio:

Typical P/S Ranges by Industry:

Enterprise Value Multiples

Enterprise Value (EV) multiples are valuation metrics that use enterprise value (rather than market cap) in the numerator. Enterprise value represents the total value of a company's operations, independent of capital structure. This makes EV multiples particularly useful for comparing companies with different debt levels, as they focus on the value of the business itself rather than how it's financed.

The key insight behind EV multiples is that the value of a business shouldn't depend on how it's financed. A company financed entirely with equity might have the same business value as an identical company financed with 50% debt and 50% equity, but their market capitalizations would be different. By using enterprise value, which includes debt and excludes cash, EV multiples neutralize the effects of capital structure, making comparisons more meaningful.

Enterprise Value Formula

Enterprise Value=Market Cap+Total Debt−Cash and Cash Equivalents+Minority Interest+Preferred Stock\text{Enterprise Value} = \text{Market Cap} + \text{Total Debt} - \text{Cash and Cash Equivalents} + \text{Minority Interest} + \text{Preferred Stock}

Enterprise value is calculated by starting with market capitalization (the value of equity), adding debt (because debt holders also have a claim on the company's value), subtracting cash (because cash reduces the net debt burden), and adjusting for minority interests and preferred stock. The simplified version combines these adjustments into net debt:

EV=Market Cap+Net Debt\text{EV} = \text{Market Cap} + \text{Net Debt}

Where Net Debt = Total Debt - Cash. This simplified formula captures the essential idea: enterprise value equals equity value plus net debt.

Why Use Enterprise Value?

Enterprise value multiples offer several advantages. They're capital-structure neutral - EV is unaffected by the debt/equity mix, so you can compare companies regardless of how they're financed. This is particularly valuable when comparing companies in the same industry that have chosen different financing strategies. They're comparable across companies - EV multiples allow you to compare companies with different leverage levels, which is impossible with market cap-based multiples. They represent total firm value - EV includes both debt and equity holders, giving you a complete picture of the company's valuation. This makes EV multiples standard in mergers and acquisitions, where you're valuing the entire business, not just the equity.

EV/EBITDA Multiple

EV/EBITDA is one of the most widely used valuation multiples, especially in M&A and investment banking. It's become the standard multiple for comparing companies because it neutralizes many of the differences that make other multiples difficult to compare.

EV/EBITDA=Enterprise ValueEBITDA\text{EV/EBITDA} = \frac{\text{Enterprise Value}}{\text{EBITDA}}

Where EBITDA = Earnings Before Interest, Taxes, Depreciation, and Amortization. EBITDA is essentially operating income with depreciation and amortization added back. It measures operating profitability before considering financing decisions (interest), tax policies (taxes), and accounting choices (depreciation methods).

Why EV/EBITDA is Popular:

EV/EBITDA is popular for several reasons. It's capital-structure neutral - EV includes debt while EBITDA excludes interest, so companies with different debt levels can be compared directly. This neutrality is crucial when comparing companies in the same industry that have chosen different financing strategies. It's depreciation neutral - EBITDA excludes depreciation, which is a non-cash expense that varies based on accounting policies and asset age. This makes EBITDA more comparable across companies than earnings-based metrics. It's tax neutral - EBITDA excludes taxes, which vary based on tax jurisdictions, loss carryforwards, and other tax-specific factors. It's an operating metric - EBITDA focuses on operating performance, excluding financing and tax effects that aren't directly related to business operations. It's an M&A standard - EV/EBITDA is widely used in mergers and acquisitions because it values the entire business (EV) relative to operating profitability (EBITDA), which is what acquirers are buying.

Advantages:

EV/EBITDA offers several advantages. It's comparable across companies - because it's capital-structure neutral, you can compare companies with different debt levels, which is difficult with equity-based multiples. It's less affected by accounting - depreciation policies, which can vary significantly, don't affect EBITDA, making it more comparable than earnings-based metrics. It's a cash flow proxy - EBITDA approximates operating cash flow (before working capital changes and CapEx), making it useful for valuation. It's an industry standard - EV/EBITDA is commonly used in many industries, making it easy to find comparable company data.

Limitations:

EV/EBITDA has significant limitations. It ignores capital intensity - companies with high capital expenditure requirements might have the same EBITDA but very different free cash flows. A company that needs to spend 50% of EBITDA on CapEx is very different from one that needs to spend 10%, but EV/EBITDA doesn't capture this. It ignores working capital - EBITDA doesn't reflect working capital needs, which can be significant for some companies. It's not actual cash flow - EBITDA is a proxy for cash flow, but it's not the same as free cash flow. Companies with high EBITDA but high CapEx and working capital needs might generate little free cash flow. It can be manipulated - companies can adjust EBITDA through aggressive accounting, making it important to examine how EBITDA is calculated and whether adjustments are reasonable.

Example: EV/EBITDA Analysis

Two companies in the manufacturing industry:

Company Manufacturing A:

Company Manufacturing B:

Analysis:

Conclusion: Company B appears cheaper on EV/EBITDA basis, but analysis must consider growth, margins, and competitive position.

EV/EBIT Multiple

EV/EBIT is similar to EV/EBITDA but uses EBIT (operating income) instead of EBITDA.

EV/EBIT=Enterprise ValueEBIT\text{EV/EBIT} = \frac{\text{Enterprise Value}}{\text{EBIT}}

Differences from EV/EBITDA:

Use Case: Industries where depreciation is significant (manufacturing, utilities).

EV/Sales Multiple

EV/Sales compares enterprise value to revenue (sales).

EV/Sales=Enterprise ValueTotal Revenue\text{EV/Sales} = \frac{\text{Enterprise Value}}{\text{Total Revenue}}

Advantages:

Use Case: Early-stage companies, high-growth companies, companies with negative earnings.

The Comparables Analysis Process

A comprehensive comparables analysis follows a systematic process:

Step 1: Identify Comparable Companies

Selection Criteria:

Sources:

Number of Comparables:

Step 2: Gather Financial Data

Required Data:

Time Periods:

Step 3: Calculate Valuation Multiples

Key Multiples to Calculate:

Ensuring Consistency:

Step 4: Calculate Summary Statistics

Measures of Central Tendency:

Measures of Dispersion:

Why Median is Often Preferred:

Step 5: Apply Multiples to Target Company

Valuation Approach:

  1. Calculate target company's financial metrics
  2. Apply peer multiples to target metrics
  3. Derive valuation range

Example:

Using Multiple Percentiles:

Step 6: Adjust for Differences

Key Adjustments:

Adjustment Methodology:

Example: Comprehensive Comparables Analysis

Valuing Company Target using comparables:

Step 1: Comparable Companies Identified:

Step 2: Financial Data Gathered:
All companies: EBITDA TTM, EV calculated

Step 3: EV/EBITDA Multiples Calculated:

Step 4: Summary Statistics:

Step 5: Apply to Target Company:

Step 6: Adjustments:

Let's visualize the Comparable Company Analysis with enhanced detail:

Python exercise

#| label: comparable-company-analysis-enhanced
#| fig-cap: "Comparable Company Analysis: Scatter plot showing P/E, P/B ratios for peer companies with regression"
#| fig-width: 16
#| fig-height: 10
#| echo: false
#| warning: false

# Sandbox metadata (auto-generated from lesson.ts)
# libraries: numpy, matplotlib, pandas

import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display
from scipy import stats

# Example from text - comparable companies
companies = ['Company A', 'Company B', 'Company C', 'Company D', 'Target']
market_caps = [2000, 1500, 2500, 1800, 1600]  # Millions
ev_ebitda = [9.5, 8.0, 10.5, 7.5, None]  # Target to be calculated
pe_ratios = [22, 18, 25, 16, None]  # Target to be calculated
pb_ratios = [3.2, 2.8, 3.8, 2.5, None]  # Target to be calculated
growth_rates = [15, 12, 18, 10, 14]  # Percent
ebitda_margins = [20, 18, 22, 16, 19]  # Percent

# Calculate peer statistics
pe_peers = [pe for pe in pe_ratios if pe is not None]
pb_peers = [pb for pb in pb_ratios if pb is not None]
ev_ebitda_peers = [ev for ev in ev_ebitda if ev is not None]

pe_median = np.median(pe_peers)
pe_mean = np.mean(pe_peers)
pb_median = np.median(pb_peers)
pb_mean = np.mean(pb_peers)
ev_ebitda_median = np.median(ev_ebitda_peers)

# Create figure
fig, axes = plt.subplots(2, 2, figsize=(16, 12))
fig.suptitle('Comparable Company Analysis: Peer Multiples and Valuation',
            fontsize=16, fontweight='bold')

# Plot 1: P/E vs. Growth Rate Scatter
ax1 = axes[0, 0]
pe_peer_values = pe_peers
growth_peer_values = [g for i, g in enumerate(growth_rates) if pe_ratios[i] is not None]

# Add regression line
slope, intercept, r_value, p_value, std_err = stats.linregress(growth_peer_values, pe_peer_values)
x_line = np.array([min(growth_peer_values), max(growth_peer_values)])
y_line = slope * x_line + intercept

# Plot peers
for i, (company, pe, growth) in enumerate(zip(companies[:-1], pe_peer_values, growth_peer_values)):
    ax1.scatter(growth, pe, s=300, alpha=0.7, edgecolors='black', linewidth=2,
               label=company if i < 4 else None, zorder=5)

# Plot target
target_growth = growth_rates[-1]
target_pe_estimate = slope * target_growth + intercept
ax1.scatter(target_growth, target_pe_estimate, s=400, marker='*', color='red',
           edgecolors='black', linewidth=2, label='Target (Estimated)', zorder=6)

# Regression line
ax1.plot(x_line, y_line, 'r--', linewidth=2, alpha=0.7,
        label=f'Regression: P/E = {slope:.2f}×Growth + {intercept:.1f}\nR² = {r_value**2:.2f}')

ax1.set_xlabel('Growth Rate (%)', fontsize=12, fontweight='bold')
ax1.set_ylabel('P/E Ratio', fontsize=12, fontweight='bold')
ax1.set_title('P/E Ratio vs. Growth Rate: Peer Comparison', fontsize=13, fontweight='bold')
ax1.grid(True, alpha=0.3, linestyle='--')
ax1.legend(loc='upper left', fontsize=8)

# Add value labels
for company, pe, growth in zip(companies[:-1], pe_peer_values, growth_peer_values):
    ax1.annotate(f'{company}\nP/E={pe}x', xy=(growth, pe), xytext=(5, 5),
               textcoords='offset points', fontsize=8, fontweight='bold',
               bbox=dict(boxstyle='round', facecolor='white', alpha=0.8))

# Plot 2: P/B vs. ROE (using EBITDA margin as proxy)
ax2 = axes[0, 1]
pb_peer_values = pb_peers
margin_peer_values = [m for i, m in enumerate(ebitda_margins) if pb_ratios[i] is not None]

# Regression
slope2, intercept2, r_value2, p_value2, std_err2 = stats.linregress(margin_peer_values, pb_peer_values)
x_line2 = np.array([min(margin_peer_values), max(margin_peer_values)])
y_line2 = slope2 * x_line2 + intercept2

# Plot peers
for i, (company, pb, margin) in enumerate(zip(companies[:-1], pb_peer_values, margin_peer_values)):
    ax2.scatter(margin, pb, s=300, alpha=0.7, edgecolors='black', linewidth=2,
               label=company if i < 4 else None, zorder=5)

# Plot target
target_margin = ebitda_margins[-1]
target_pb_estimate = slope2 * target_margin + intercept2
ax2.scatter(target_margin, target_pb_estimate, s=400, marker='*', color='red',
           edgecolors='black', linewidth=2, label='Target (Estimated)', zorder=6)

# Regression line
ax2.plot(x_line2, y_line2, 'r--', linewidth=2, alpha=0.7,
        label=f'Regression: P/B = {slope2:.2f}×Margin + {intercept2:.1f}\nR² = {r_value2**2:.2f}')

ax2.set_xlabel('EBITDA Margin (%)', fontsize=12, fontweight='bold')
ax2.set_ylabel('P/B Ratio', fontsize=12, fontweight='bold')
ax2.set_title('P/B Ratio vs. Profitability: Peer Comparison', fontsize=13, fontweight='bold')
ax2.grid(True, alpha=0.3, linestyle='--')
ax2.legend(loc='upper left', fontsize=8)

# Plot 3: Multiple Distribution (Box Plot)
ax3 = axes[1, 0]
multiples_data = [pe_peers, pb_peers, [m*10 for m in ev_ebitda_peers]]  # Scale EV/EBITDA for visibility
labels_multiples = ['P/E', 'P/B', 'EV/EBITDA\n(×10)']
bp = ax3.boxplot(multiples_data, labels=labels_multiples, patch_artist=True,
                boxprops=dict(facecolor='lightblue', alpha=0.7),
                medianprops=dict(color='red', linewidth=2))

# Add peer points
for i, (peers, label) in enumerate(zip(multiples_data, labels_multiples)):
    x_pos = i + 1
    y_positions = peers
    ax3.scatter([x_pos] * len(y_positions), y_positions, s=100, alpha=0.6,
               color='blue', edgecolors='black', linewidth=1, zorder=5)

# Add median lines
for i, data in enumerate(multiples_data):
    median_val = np.median(data)
    ax3.text(i + 1, median_val, f'{median_val:.1f}', ha='center', va='bottom',
            fontsize=9, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='yellow', alpha=0.8))

ax3.set_ylabel('Multiple Value', fontsize=12, fontweight='bold')
ax3.set_title('Multiple Distribution: Peer Comparison', fontsize=13, fontweight='bold')
ax3.grid(True, alpha=0.3, linestyle='--', axis='y')

# Plot 4: Valuation Range
ax4 = axes[1, 1]
# Calculate valuation ranges
target_ebitda = 100  # Million (from example)
ev_25th = target_ebitda * 7.5  # 25th percentile
ev_median = target_ebitda * ev_ebitda_median
ev_75th = target_ebitda * 10.5  # 75th percentile

valuation_ranges = ['25th\nPercentile', 'Median', '75th\nPercentile']
ev_values = [ev_25th, ev_median, ev_75th]
colors_range = ['#FF6B6B', '#4ECDC4', '#45B7D1']
bars = ax4.bar(valuation_ranges, ev_values, color=colors_range, alpha=0.7,
              edgecolor='black', linewidth=1.5)

ax4.set_ylabel('Enterprise Value ($ Millions)', fontsize=12, fontweight='bold')
ax4.set_title('Valuation Range: Applying Peer Multiples to Target', fontsize=13, fontweight='bold')
ax4.grid(True, alpha=0.3, linestyle='--', axis='y')

# Add value labels
for bar, val in zip(bars, ev_values):
    height = bar.get_height()
    ax4.text(bar.get_x() + bar.get_width()/2., height + 20,
            f'${val:.0f}M', ha='center', va='bottom',
            fontsize=10, fontweight='bold',
            bbox=dict(boxstyle='round', facecolor='white', alpha=0.9))

# Add range annotation
ax4.axhspan(ev_25th, ev_75th, alpha=0.2, color='green', label='Valuation Range')
ax4.text(0.5, 0.98, f'Target EBITDA: ${target_ebitda:.0f}M\nEV/EBITDA Median: {ev_ebitda_median:.1f}x\nValuation Range: ${ev_25th:.0f}M - ${ev_75th:.0f}M',
        transform=ax4.transAxes, ha='center', va='top',
        fontsize=9, fontweight='bold',
        bbox=dict(boxstyle='round', facecolor='lightyellow', alpha=0.9))
ax4.legend(loc='lower right', fontsize=9)

plt.tight_layout()
display(fig)
plt.close(fig)

print(f"\n📊 **Comparable Company Analysis**")
print(f"{'='*70}")
print(f"Peer Companies Multiples:")
print(f"{'Company':<15} {'P/E':<10} {'P/B':<10} {'EV/EBITDA':<12} {'Growth':<10} {'Margin':<10}")
print(f"{'-'*70}")
for i, (company, pe, pb, ev, growth, margin) in enumerate(zip(companies[:-1], pe_peers, pb_peers, ev_ebitda_peers, growth_peer_values, margin_peer_values)):
    print(f"{company:<15} {pe:<10.1f} {pb:<10.1f} {ev:<12.1f} {growth:<10.1f}% {margin:<10.1f}%")
print(f"{'='*70}")
print(f"Summary Statistics:")
print(f"  P/E Ratio:")
print(f"    Mean: {pe_mean:.1f}x")
print(f"    Median: {pe_median:.1f}x")
print(f"    Range: {min(pe_peers):.1f}x - {max(pe_peers):.1f}x")
print(f"  P/B Ratio:")
print(f"    Mean: {pb_mean:.1f}x")
print(f"    Median: {pb_median:.1f}x")
print(f"    Range: {min(pb_peers):.1f}x - {max(pb_peers):.1f}x")
print(f"  EV/EBITDA:")
print(f"    Mean: {np.mean(ev_ebitda_peers):.1f}x")
print(f"    Median: {ev_ebitda_median:.1f}x")
print(f"    Range: {min(ev_ebitda_peers):.1f}x - {max(ev_ebitda_peers):.1f}x")
print(f"{'='*70}")
print(f"Target Company Valuation (EBITDA = ${target_ebitda:.0f}M):")
print(f"  Using Median EV/EBITDA ({ev_ebitda_median:.1f}x):")
print(f"    Implied EV = ${target_ebitda:.0f}M × {ev_ebitda_median:.1f} = ${ev_median:.0f}M")
print(f"  Using 25th Percentile (7.5x):")
print(f"    Implied EV = ${target_ebitda:.0f}M × 7.5 = ${ev_25th:.0f}M")
print(f"  Using 75th Percentile (10.5x):")
print(f"    Implied EV = ${target_ebitda:.0f}M × 10.5 = ${ev_75th:.0f}M")
print(f"{'='*70}")
print(f"Valuation Range: ${ev_25th:.0f}M - ${ev_75th:.0f}M (Base Case: ${ev_median:.0f}M)")
print(f"{'='*70}")
print(f"✅ Regression analysis shows relationship between multiples and fundamentals")
print(f"✅ Valuation range accounts for peer variation")
print(f"✅ Median often preferred over mean (less affected by outliers)")

Sector-Specific Multiples

Different industries use different multiples based on their characteristics:

Technology Companies

Common Multiples:

Why:

Financial Companies (Banks, Insurance)

Common Multiples:

Why:

Retail Companies

Common Multiples:

Why:

Real Estate Companies (REITs)

Common Multiples:

Why:

Energy Companies

Common Multiples:

Why:

Strengths and Limitations of Relative Valuation

Strengths

  1. Market-Based: Reflects current market sentiment
  2. Quick and Simple: Faster than DCF models
  3. Real-World Benchmark: Uses actual market prices
  4. Industry Context: Provides industry-specific perspective
  5. Widely Accepted: Standard in investment banking and research

Limitations

  1. Market Inefficiency: Assumes market is efficient (may not be)
  2. Comparable Selection: Difficult to find truly comparable companies
  3. Market Sentiment: Affected by market-wide optimism/pessimism
  4. Accounting Differences: Different accounting methods affect comparability
  5. No Absolute Value: Doesn't estimate intrinsic value, only relative value
  6. Circular Logic: If all comparables are overvalued, target will be overvalued

Combining Relative and Absolute Valuation

Best Practice: Use both relative and absolute valuation methods:

  1. DCF Model: Estimate intrinsic value (absolute)
  2. Comparables Analysis: Assess relative value (relative)
  3. Compare Results: If DCF = 45,investigatedifferences4.∗∗Reconcile∗∗:Usebothtoinformfinalvaluation∗∗Reconciliation:∗∗−IfDCF>Comparables:Companymaybeundervaluedbymarket−IfDCF<Comparables:Companymaybeovervaluedbymarket−Ifsimilar:Valuationisconsistent<divclass="knowledge−check">∗∗KnowledgeCheck6.6∗∗Whichofthefollowingmultiplesismostappropriateforcomparingcompanieswithdifferentcapitalstructures?A.P/EratioB.P/BratioC.EV/EBITDAD.P/Sratio<details><summary>Clicktorevealanswer</summary>∗∗C.EV/EBITDA∗∗∗∗Explanation:∗∗−∗∗EV/EBITDA∗∗usesEnterpriseValue(whichincludesdebt)andEBITDA(whichexcludesinterest)−Thismakesit∗∗capital−structureneutral∗∗−companieswithdifferentdebtlevelscanbecompared−∗∗P/E,P/B,andP/S∗∗usemarketcap(equityonly),whichisaffectedbycapitalstructure−AhighlyleveragedcompanymayhavelowerP/Ethanalow−leveragecompanyeveniftheyhavesimilaroperatingperformance∗∗Example:∗∗−CompanyA:Lowdebt,Marketcap=45, investigate differences 4. **Reconcile**: Use both to inform final valuation **Reconciliation:** - If DCF > Comparables: Company may be undervalued by market - If DCF < Comparables: Company may be overvalued by market - If similar: Valuation is consistent <div class="knowledge-check"> **Knowledge Check 6.6** Which of the following multiples is most appropriate for comparing companies with different capital structures? A. P/E ratio B. P/B ratio C. EV/EBITDA D. P/S ratio <details> <summary>Click to reveal answer</summary> **C. EV/EBITDA** **Explanation:** - **EV/EBITDA** uses Enterprise Value (which includes debt) and EBITDA (which excludes interest) - This makes it **capital-structure neutral** - companies with different debt levels can be compared - **P/E, P/B, and P/S** use market cap (equity only), which is affected by capital structure - A highly leveraged company may have lower P/E than a low-leverage company even if they have similar operating performance **Example:** - Company A: Low debt, Market cap =2 billion

Comparable Companies (All High-Growth Tech):

Tech Peer A:

Tech Peer B:

Tech Peer C:

Tech Peer D:

Questions:

  1. Why can't we use P/E or EV/EBITDA for GrowthCo?
  2. Calculate EV/Sales for GrowthCo
  3. Calculate peer EV/Sales multiples and summary statistics
  4. Is GrowthCo fairly valued based on EV/Sales?
  5. What other factors should be considered beyond multiples?
Click to reveal solution

Solution:

1. Why P/E and EV/EBITDA Don't Work:

P/E Ratio:

EV/EBITDA:

Key Insight: For companies with negative earnings/EBITDA, revenue-based multiples (EV/Sales, P/S) are more appropriate.

2. GrowthCo EV/Sales:

Enterprise Value = Market Cap + Net Debt = $2B + $100M = $2.1 billion

EV/Sales = $2.1B ÷ $500M = 4.2x

3. Peer EV/Sales Multiples:

Tech Peer A:
EV/Sales = $3.2B ÷ $800M = 4.0x

Tech Peer B:
EV/Sales = $1.6B ÷ $400M = 4.0x

Tech Peer C:
EV/Sales = $4.1B ÷ $1,000M = 4.1x

Tech Peer D:
EV/Sales = $2.6B ÷ $600M = 4.33x

Summary Statistics:

4. Valuation Assessment:

GrowthCo:

Peer Group:

Analysis:

Implied Valuation:

However, consider:

Conclusion: GrowthCo appears slightly overvalued but the premium may be justified by higher growth rate.

5. Additional Factors to Consider:

Growth Metrics:

Profitability Path:

Market Position:

Financing:

Operational Metrics:

Risk Factors:

Qualitative Factors:

Conclusion: While EV/Sales suggests slight overvaluation, the higher growth rate and path to profitability may justify the premium. A comprehensive analysis requires examining all these factors, not just multiples.


In Module 6: Equity Valuation

  1. Introduction
  2. Fundamental Analysis
  3. Valuation Models and Methods
  4. Discounted Cash Flow Analysis
  5. Relative Valuation Techniques
  6. Valuation in Practice
  7. Special Valuation Cases
  8. Valuation Challenges
  9. Advanced Valuation Topics
  10. End-of-Module Assessment