Time Value of Money: The Foundation of Finance

30 minbeginner

1. Time Value of Money: The Foundation of Finance

Python exercise

# Interactive Expected Value and Risk Visualization
# Shows probability distributions, variance calculation, risk-return scatter, and efficient frontier

interactive_html = """
<div id="expected-value-risk" style="margin: 2em 0; padding: 1.5em; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
    <h3 style="margin-top: 0; color: #1f2937; font-size: 1.25em; font-weight: 600;">Expected Value and Risk: Understanding Return Distributions</h3>
    <p style="color: #6b7280; margin-bottom: 1.5em;">Adjust outcomes and probabilities to see how they affect expected value and risk:</p>
    
    <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1em; margin-bottom: 2em;">
        <div style="padding: 1em; background: #f9fafb; border-radius: 6px;">
            <label style="display: block; margin-bottom: 0.5em; font-weight: 500; color: #374151;">Outcome 1 (%):</label>
            <input type="range" id="outcome1" min="-20" max="30" value="10" step="1" style="width: 100%; height: 8px; border-radius: 4px; background: #e5e7eb; outline: none;">
            <div style="text-align: center; margin-top: 0.5em;">
                <span id="outcome1_value" style="display: inline-block; padding: 0.5em 1em; background: #059669; color: white; font-weight: 600; font-size: 0.9em; border-radius: 6px; min-width: 50px;">10%</span>
            </div>
        </div>
        <div style="padding: 1em; background: #f9fafb; border-radius: 6px;">
            <label style="display: block; margin-bottom: 0.5em; font-weight: 500; color: #374151;">Probability 1:</label>
            <input type="range" id="prob1" min="0" max="100" value="30" step="1" style="width: 100%; height: 8px; border-radius: 4px; background: #e5e7eb; outline: none;">
            <div style="text-align: center; margin-top: 0.5em;">
                <span id="prob1_value" style="display: inline-block; padding: 0.5em 1em; background: #2563eb; color: white; font-weight: 600; font-size: 0.9em; border-radius: 6px; min-width: 50px;">30%</span>
            </div>
        </div>
        <div style="padding: 1em; background: #f9fafb; border-radius: 6px;">
            <label style="display: block; margin-bottom: 0.5em; font-weight: 500; color: #374151;">Outcome 2 (%):</label>
            <input type="range" id="outcome2" min="-20" max="30" value="5" step="1" style="width: 100%; height: 8px; border-radius: 4px; background: #e5e7eb; outline: none;">
            <div style="text-align: center; margin-top: 0.5em;">
                <span id="outcome2_value" style="display: inline-block; padding: 0.5em 1em; background: #059669; color: white; font-weight: 600; font-size: 0.9em; border-radius: 6px; min-width: 50px;">5%</span>
            </div>
        </div>
        <div style="padding: 1em; background: #f9fafb; border-radius: 6px;">
            <label style="display: block; margin-bottom: 0.5em; font-weight: 500; color: #374151;">Probability 2:</label>
            <input type="range" id="prob2" min="0" max="100" value="50" step="1" style="width: 100%; height: 8px; border-radius: 4px; background: #e5e7eb; outline: none;">
            <div style="text-align: center; margin-top: 0.5em;">
                <span id="prob2_value" style="display: inline-block; padding: 0.5em 1em; background: #2563eb; color: white; font-weight: 600; font-size: 0.9em; border-radius: 6px; min-width: 50px;">50%</span>
            </div>
        </div>
        <div style="padding: 1em; background: #f9fafb; border-radius: 6px;">
            <label style="display: block; margin-bottom: 0.5em; font-weight: 500; color: #374151;">Outcome 3 (%):</label>
            <input type="range" id="outcome3" min="-20" max="30" value="-5" step="1" style="width: 100%; height: 8px; border-radius: 4px; background: #e5e7eb; outline: none;">
            <div style="text-align: center; margin-top: 0.5em;">
                <span id="outcome3_value" style="display: inline-block; padding: 0.5em 1em; background: #dc2626; color: white; font-weight: 600; font-size: 0.9em; border-radius: 6px; min-width: 50px;">-5%</span>
            </div>
        </div>
        <div style="padding: 1em; background: #f9fafb; border-radius: 6px;">
            <label style="display: block; margin-bottom: 0.5em; font-weight: 500; color: #374151;">Probability 3:</label>
            <input type="range" id="prob3" min="0" max="100" value="20" step="1" style="width: 100%; height: 8px; border-radius: 4px; background: #e5e7eb; outline: none;">
            <div style="text-align: center; margin-top: 0.5em;">
                <span id="prob3_value" style="display: inline-block; padding: 0.5em 1em; background: #2563eb; color: white; font-weight: 600; font-size: 0.9em; border-radius: 6px; min-width: 50px;">20%</span>
            </div>
        </div>
    </div>
    
    <div style="background: white; padding: 1.5em; border-radius: 6px; border: 1px solid #e5e7eb;">
        <canvas id="riskCanvas" width="700" height="700" style="width: 100%; max-width: 700px; height: 700px; border: 1px solid #e5e7eb; border-radius: 4px; display: block;"></canvas>
    </div>
    
    <div id="risk-analysis" style="margin-top: 1.5em; padding: 1.5em; background: #eff6ff; border-radius: 6px; border-left: 4px solid #2563eb;">
        <h4 style="margin: 0 0 0.5em 0; color: #1e40af; font-size: 1em; font-weight: 600;">Risk Metrics:</h4>
        <div id="analysis_text" style="color: #1e40af; font-size: 0.9em; line-height: 1.6;">
            Calculating expected value and risk...
        </div>
    </div>
</div>

<script>
(function() {
    function initCanvas() {
        const canvas = document.getElementById('riskCanvas');
        if (!canvas) return;
        const ctx = canvas.getContext('2d');
        if (!ctx) return;
        const dpr = window.devicePixelRatio || 1;
        const baseWidth = 700;
        const baseHeight = 700;
        canvas.width = baseWidth * dpr;
        canvas.height = baseHeight * dpr;
        ctx.scale(dpr, dpr);
        canvas.style.width = baseWidth + 'px';
        canvas.style.height = baseHeight + 'px';
    }
    
    function drawRiskVisualization(ctx, width, height, outcomes, probabilities) {
        ctx.clearRect(0, 0, width, height);
        
        // Normalize probabilities
        const totalProb = probabilities.reduce((a, b) => a + b, 0);
        const normalizedProbs = probabilities.map(p => p / totalProb);
        
        // Calculate expected value and variance
        const expectedReturn = outcomes.reduce((sum, outcome, i) => sum + outcome * normalizedProbs[i], 0);
        const variance = outcomes.reduce((sum, outcome, i) => {
            const deviation = outcome - expectedReturn;
            return sum + normalizedProbs[i] * deviation * deviation;
        }, 0);
        const stdDev = Math.sqrt(variance);
        
        // Draw probability distribution (bar chart)
        const padding = 80;
        const plotWidth = width - padding * 2;
        const plotHeight = height - padding * 2;
        const barWidth = plotWidth / outcomes.length * 0.6;
        const maxProb = Math.max(...normalizedProbs);
        
        // Draw bars
        const colors = ['#059669', '#2563eb', '#dc2626'];
        outcomes.forEach((outcome, i) => {
            const barHeight = (normalizedProbs[i] / maxProb) * plotHeight * 0.4;
            const x = padding + (i * plotWidth / outcomes.length) + (plotWidth / outcomes.length - barWidth) / 2;
            const y = height - padding - barHeight;
            
            ctx.fillStyle = colors[i];
            ctx.fillRect(x, y, barWidth, barHeight);
            ctx.strokeStyle = '#374151';
            ctx.lineWidth = 2;
            ctx.strokeRect(x, y, barWidth, barHeight);
            
            // Labels
            ctx.fillStyle = '#374151';
            ctx.font = '11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
            ctx.textAlign = 'center';
            ctx.fillText(`${(normalizedProbs[i] * 100).toFixed(0)}%`, x + barWidth / 2, y - 5);
            ctx.fillText(`${outcome}%`, x + barWidth / 2, height - padding + 20);
        });
        
        // Draw expected value line
        const expectedX = padding + plotWidth / 2;
        ctx.strokeStyle = '#dc2626';
        ctx.lineWidth = 3;
        ctx.setLineDash([10, 5]);
        ctx.beginPath();
        ctx.moveTo(expectedX, padding);
        ctx.lineTo(expectedX, height - padding);
        ctx.stroke();
        ctx.setLineDash([]);
        
        // Labels
        ctx.fillStyle = '#374151';
        ctx.font = '12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
        ctx.textAlign = 'center';
        ctx.fillText('Return (%)', width / 2, height - 10);
        ctx.textAlign = 'right';
        ctx.fillText('Probability', padding - 10, height / 2);
        
        // Title
        ctx.font = 'bold 16px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
        ctx.textAlign = 'center';
        ctx.fillText('Probability Distribution of Returns', width / 2, 30);
        
        // Expected value label
        ctx.fillStyle = '#dc2626';
        ctx.font = 'bold 12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
        ctx.fillText(`Expected: ${expectedReturn.toFixed(1)}%`, expectedX, padding - 10);
        
        // Update analysis
        updateAnalysis(expectedReturn, variance, stdDev);
    }
    
    function updateAnalysis(expectedReturn, variance, stdDev) {
        const analysisEl = document.getElementById('analysis_text');
        if (!analysisEl) return;
        
        let html = `Expected Return: <strong>${expectedReturn.toFixed(2)}%</strong><br>`;
        html += `Variance: <strong>${variance.toFixed(2)}</strong><br>`;
        html += `Standard Deviation: <strong>${stdDev.toFixed(2)}%</strong> = √${variance.toFixed(2)}<br><br>`;
        html += `✅ Higher variance = Higher risk. Standard deviation measures the spread of possible returns around the expected value.`;
        
        analysisEl.innerHTML = html;
    }
    
    window.updateRisk = function() {
        const outcome1El = document.getElementById('outcome1');
        const prob1El = document.getElementById('prob1');
        const outcome2El = document.getElementById('outcome2');
        const prob2El = document.getElementById('prob2');
        const outcome3El = document.getElementById('outcome3');
        const prob3El = document.getElementById('prob3');
        
        if (!outcome1El || !prob1El || !outcome2El || !prob2El || !outcome3El || !prob3El) return;
        
        const outcomes = [
            parseFloat(outcome1El.value),
            parseFloat(outcome2El.value),
            parseFloat(outcome3El.value)
        ];
        const probabilities = [
            parseFloat(prob1El.value),
            parseFloat(prob2El.value),
            parseFloat(prob3El.value)
        ];
        
        document.getElementById('outcome1_value').textContent = outcomes[0] + '%';
        document.getElementById('prob1_value').textContent = probabilities[0] + '%';
        document.getElementById('outcome2_value').textContent = outcomes[1] + '%';
        document.getElementById('prob2_value').textContent = probabilities[1] + '%';
        document.getElementById('outcome3_value').textContent = outcomes[2] + '%';
        document.getElementById('prob3_value').textContent = probabilities[2] + '%';
        
        const canvas = document.getElementById('riskCanvas');
        if (!canvas) return;
        const ctx = canvas.getContext('2d');
        if (!ctx) return;
        const dpr = window.devicePixelRatio || 1;
        const width = canvas.width / dpr;
        const height = canvas.height / dpr;
        
        drawRiskVisualization(ctx, width, height, outcomes, probabilities);
    };
    
    function tryInit() {
        const canvas = document.getElementById('riskCanvas');
        const outcome1El = document.getElementById('outcome1');
        
        if (canvas && outcome1El) {
            initCanvas();
            window.updateRisk();
            
            ['outcome1', 'prob1', 'outcome2', 'prob2', 'outcome3', 'prob3'].forEach(id => {
                document.getElementById(id).addEventListener('input', window.updateRisk);
            });
            
            return true;
        }
        return false;
    }
    
    if (!tryInit()) {
        setTimeout(() => {
            if (!tryInit()) {
                setTimeout(tryInit, 200);
            }
        }, 50);
    }
})();
</script>
"""

import sys
sys.stdout.write(f"[HTML_CONTENT]{interactive_html}[/HTML_CONTENT]\n")
sys.stdout.flush()

The time value of money is perhaps the most fundamental concept in finance. It recognizes a simple but profound truth: a dollar today is worth more than a dollar tomorrow. This principle underlies virtually every financial decision - from personal savings to corporate investment to government policy. Understanding the time value of money is essential for understanding how financial markets work, how investments are valued, and how to make sound financial decisions.

Why Money Has Time Value

The time value of money exists for several fundamental reasons:

Opportunity Cost is the most basic reason. If you have a dollar today, you can invest it and earn a return. If you receive a dollar in the future, you've lost the opportunity to earn that return. The opportunity cost of waiting is the return you could have earned.

Inflation erodes purchasing power over time. A dollar today can buy more than a dollar in the future if prices are rising. To maintain purchasing power, money must grow over time at least at the rate of inflation.

Risk means that future payments are uncertain. A dollar today is certain, but a dollar promised in the future might not materialize. Investors require compensation for this uncertainty, which is reflected in higher required returns for riskier investments.

Liquidity Preference reflects the fact that people prefer to have money now rather than later. Having money now provides flexibility and options that having money later doesn't provide.

Consumption Preference recognizes that people generally prefer to consume now rather than later. To defer consumption, people require compensation in the form of interest or returns.

These factors combine to create the time value of money. The magnitude of the time value depends on the interest rate, the time period, and the risk involved. Understanding these relationships is crucial for all financial decisions.

The Basic Time Value Relationship

The fundamental relationship in time value of money is:

Future Value: FV=PV×(1+r)nFV = PV \times (1 + r)^n

This simple formula shows how money grows over time. If you invest $100todayat5∗∗PresentValue∗∗:\text{\$}100 today at 5% interest for one year, you'll have \text{\$}105 in one year. The \text{\$}100 is the present value, \text{\$}105 is the future value, 5% is the interest rate, and 1 is the number of periods. **Present Value**: today at 5% interest for one year, you'll have PV=FV(1+r)nPV = \frac{FV}{(1 + r)^n} in one year and the interest rate is 5%.

The present value is 105105PV=$5,000PV = \text{\$}5{,}000−-r=7%=0.07r = 7\% = 0.07−-n=40n = 40years−years -FV=$5,000×(1.07)40FV = \text{\$}5{,}000 \times (1.07)^{40}−-FV=$5,000×14.9745=$74,872.50FV = \text{\$}5{,}000 \times 14.9745 = \text{\$}74{,}872.50∗∗OptionB∗∗:Invest$10,000atage35for30years(age35to65)−**Option B**: Invest \text{\$}10,000 at age 35 for 30 years (age 35 to 65) -PV=$10,000PV = \text{\$}10{,}000−-r=7%=0.07r = 7\% = 0.07−-n=30n = 30years−years -FV=$10,000×(1.07)30FV = \text{\$}10{,}000 \times (1.07)^{30}−-FV=$10,000×7.6123=$76,123.00FV = \text{\$}10{,}000 \times 7.6123 = \text{\$}76{,}123.00

Analysis: Option B gives slightly more ($76,123 vs $74,872), but Option A requires only half the initial investment. However, the real lesson is that starting early is powerful - Option A's $5,000 grows to almost as much as Option B's $10,000 because of the extra 10 years of compounding.

Python exercise

#| label: practice-1-1
#| fig-cap: "Practice Problem 1.1: Retirement Savings Comparison"
#| fig-width: 14
#| fig-height: 6
#| 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

# Parameters
pv_a = 5000
pv_b = 10000
rate = 0.07
years_a = 40
years_b = 30
fv_a = pv_a * ((1 + rate) ** years_a)
fv_b = pv_b * ((1 + rate) ** years_b)

# Growth over time
years = np.arange(0, 41, 1)
growth_a = pv_a * ((1 + rate) ** years)
growth_b = np.zeros_like(years)
growth_b[years >= 10] = pv_b * ((1 + rate) ** (years[years >= 10] - 10))

fig, axes = plt.subplots(1, 2, figsize=(16, 6))
fig.suptitle('Practice Problem 1.1: Retirement Savings Decision', fontsize=14, fontweight='bold')

# Plot 1: Growth Comparison
ax1 = axes[0]
ax1.plot(years, growth_a, 'b-', linewidth=3, marker='o', markersize=4, label='Option A: $5K at 25', alpha=0.8)
ax1.plot(years, growth_b, 'r--', linewidth=3, marker='s', markersize=4, label='Option B: $10K at 35', alpha=0.8)
ax1.axvline(x=10, color='gray', linestyle=':', linewidth=1.5, alpha=0.5)
ax1.plot(40, fv_a, 'go', markersize=12, markeredgewidth=2, markeredgecolor='darkgreen', zorder=5)
ax1.plot(40, fv_b, 'ro', markersize=12, markeredgewidth=2, markeredgecolor='darkred', zorder=5)
ax1.set_xlabel('Years', fontsize=11, fontweight='bold')
ax1.set_ylabel('Future Value ($)', fontsize=11, fontweight='bold')
ax1.set_title('Growth Over Time', fontsize=12, fontweight='bold')
ax1.grid(True, alpha=0.3, linestyle='--')
ax1.legend(loc='upper left', fontsize=9)
ax1.annotate(f'Option A: ${fv_a:,.0f}', xy=(40, fv_a), xytext=(42, fv_a + 5000),
             arrowprops=dict(arrowstyle='->', color='blue', lw=1.5), fontsize=9, fontweight='bold')
ax1.annotate(f'Option B: ${fv_b:,.0f}', xy=(40, fv_b), xytext=(42, fv_b - 5000),
             arrowprops=dict(arrowstyle='->', color='red', lw=1.5), fontsize=9, fontweight='bold')

# Plot 2: Comparison Bar Chart
ax2 = axes[1]
categories = ['Initial\nInvestment', 'Final Value\n(at 65)']
option_a_values = [pv_a, fv_a]
option_b_values = [pv_b, fv_b]
x = np.arange(len(categories))
width = 0.35
bars1 = ax2.bar(x - width/2, option_a_values, width, label='Option A', color='blue', alpha=0.7, edgecolor='black')
bars2 = ax2.bar(x + width/2, option_b_values, width, label='Option B', color='red', alpha=0.7, edgecolor='black')
ax2.set_ylabel('Amount ($)', fontsize=11, fontweight='bold')
ax2.set_title('Comparison: Investment vs Final Value', fontsize=12, fontweight='bold')
ax2.set_xticks(x)
ax2.set_xticklabels(categories)
ax2.legend(loc='upper left', fontsize=9)
ax2.grid(True, alpha=0.3, linestyle='--', axis='y')
for bars in [bars1, bars2]:
    for bar in bars:
        height = bar.get_height()
        ax2.text(bar.get_x() + bar.get_width()/2., height + height*0.01,
                 f'${height:,.0f}', ha='center', va='bottom', fontsize=9, fontweight='bold')

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

Real-World Context: This demonstrates why financial advisors emphasize starting retirement savings early. The time value of money means that even smaller amounts invested early can grow to significant sums due to compounding over long periods.

Practice Problem 1.2: Comparing Investment Offers

A technology startup offers you two compensation packages:

  • Package A: $100,000 salary today
  • Package B: $50,000 salary today plus a $60,000 bonus in 3 years

If you can invest at 5% annual return, which package is worth more in present value terms?

Solution:

Package A: $100,000 today

  • PV = $100,000 (already in present value)

Package B: $50,000 today + $60,000 in 3 years

  • PV of $50,000 today = $50,000
  • PV of $60,000 in 3 years:
#x27; in math mode at position 9: PV of \\$̲60{,}000 in 3 y…" style="color:#cc0000">PV of \\$60{,}000 in 3 years = \\$60{,}000 / (1.05)^3
  • PV:
  • #x27; in math mode at position 8: PV = \\$̲60{,}000 / 1.15…" style="color:#cc0000">PV = \\$60{,}000 / 1.1576 = \\$51{,}833.33
  • Total PV:
  • #x27; in math mode at position 14: Total PV = \\$̲50{,}000 + \\$5…" style="color:#cc0000">Total PV = \\$50{,}000 + \\$51{,}833.33 = \\$101{,}833.33

    Analysis: Package B is worth more in present value ($101,833 vs $100,000), making it the better financial choice if you can wait for the bonus. However, Package A provides more immediate liquidity, which may be valuable if you have immediate needs.

    Python exercise

    #| label: practice-1-2
    #| fig-cap: "Practice Problem 1.2: Investment Offers Comparison"
    #| fig-width: 14
    #| fig-height: 6
    #| 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
    
    # Package parameters
    package_a = 100000
    package_b_today = 50000
    package_b_future = 60000
    years = 3
    rate = 0.05
    pv_b_future = package_b_future / ((1 + rate) ** years)
    pv_b_total = package_b_today + pv_b_future
    
    # Timeline visualization
    fig, axes = plt.subplots(1, 2, figsize=(16, 6))
    fig.suptitle('Practice Problem 1.2: Comparing Investment Offers', fontsize=14, fontweight='bold')
    
    # Plot 1: Cash Flow Timeline
    ax1 = axes[0]
    time_points = [0, 3]
    ax1.barh([0], [package_a], left=0, height=0.3, color='blue', alpha=0.7, label='Package A', edgecolor='black')
    ax1.barh([1], [package_b_today], left=0, height=0.3, color='green', alpha=0.7, label='Package B: Today', edgecolor='black')
    ax1.barh([1], [package_b_future], left=3, height=0.3, color='orange', alpha=0.7, label='Package B: Year 3', edgecolor='black')
    ax1.plot([3, 3], [0.5, 1.5], 'k--', linewidth=1, alpha=0.5)
    ax1.set_xlabel('Time (Years)', fontsize=11, fontweight='bold')
    ax1.set_ylabel('Package', fontsize=11, fontweight='bold')
    ax1.set_yticks([0, 1])
    ax1.set_yticklabels(['Package A', 'Package B'])
    ax1.set_title('Cash Flow Timeline', fontsize=12, fontweight='bold')
    ax1.grid(True, alpha=0.3, linestyle='--', axis='x')
    ax1.legend(loc='upper right', fontsize=9)
    ax1.set_xlim(-0.5, 4)
    
    # Plot 2: Present Value Comparison
    ax2 = axes[1]
    packages = ['Package A\n($100K today)', 'Package B\n($50K + $60K in 3 yrs)']
    pv_values = [package_a, pv_b_total]
    colors = ['blue', 'green']
    bars = ax2.bar(packages, pv_values, color=colors, alpha=0.7, edgecolor='black', linewidth=1.5)
    ax2.axhline(y=package_a, color='blue', linestyle='--', linewidth=2, alpha=0.5, label=f'Package A: ${package_a:,.0f}')
    ax2.set_ylabel('Present Value ($)', fontsize=11, fontweight='bold')
    ax2.set_title('Present Value Comparison (5% discount rate)', fontsize=12, fontweight='bold')
    ax2.grid(True, alpha=0.3, linestyle='--', axis='y')
    for bar, val in zip(bars, pv_values):
        height = bar.get_height()
        ax2.text(bar.get_x() + bar.get_width()/2., height + 500,
                 f'${height:,.0f}', ha='center', va='bottom', fontsize=10, fontweight='bold')
    ax2.legend(loc='upper right', fontsize=9)
    
    plt.tight_layout()
    display(fig)
    plt.close(fig)

    Real-World Context: This type of analysis is common in evaluating job offers, contract negotiations, and investment opportunities. The time value of money helps quantify the trade-off between immediate cash and future payments.

    Practice Problem 1.3: Bond Investment Decision

    You're considering purchasing a corporate bond that will pay $1,000 in 5 years. The bond has no coupon payments. Current market interest rates for similar-risk bonds are 4%. What is the maximum price you should pay for this bond today?

    Solution:

    The bond is a zero-coupon bond that pays $1,000 at maturity in 5 years. To determine the maximum price, we calculate the present value:

    • FV = $1,000 (face value at maturity)
    • r = 4% = 0.04 (market interest rate)
    • n = 5 years
    • PV:
    #x27; in math mode at position 8: PV = \\$̲1{,}000 / (1.04…" style="color:#cc0000">PV = \\$1{,}000 / (1.04)^5
  • PV:
  • #x27; in math mode at position 8: PV = \\$̲1{,}000 / 1.216…" style="color:#cc0000">PV = \\$1{,}000 / 1.2167 = \\$821.93

    Analysis: You should pay no more than $821.93 for this bond. If you pay this amount and hold to maturity, you'll earn exactly 4% annual return, matching the market rate for similar-risk investments. If the bond is offered at a higher price, you'd earn less than 4%, making it unattractive. If offered at a lower price, you'd earn more than 4%, making it a good deal.

    Python exercise

    #| label: practice-1-3
    #| fig-cap: "Practice Problem 1.3: Bond Investment Decision"
    #| fig-width: 14
    #| fig-height: 6
    #| 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
    
    # Bond parameters
    fv = 1000
    rate = 0.04
    years = 5
    pv = fv / ((1 + rate) ** years)
    
    # Growth over time
    time_points = np.arange(0, years + 1, 1)
    bond_value = pv * ((1 + rate) ** time_points)
    
    # Price sensitivity to interest rates
    rates = np.linspace(0.02, 0.06, 100)
    bond_prices = fv / ((1 + rates) ** years)
    
    fig, axes = plt.subplots(1, 2, figsize=(16, 6))
    fig.suptitle('Practice Problem 1.3: Bond Investment Decision', fontsize=14, fontweight='bold')
    
    # Plot 1: Bond Value Growth to Maturity
    ax1 = axes[0]
    ax1.plot(time_points, bond_value, 'b-', linewidth=3, marker='o', markersize=6, alpha=0.8)
    ax1.plot(0, pv, 'go', markersize=12, markeredgewidth=2, markeredgecolor='darkgreen', zorder=5, label=f'Purchase Price: ${pv:.2f}')
    ax1.plot(years, fv, 'ro', markersize=12, markeredgewidth=2, markeredgecolor='darkred', zorder=5, label=f'Maturity Value: ${fv:.0f}')
    ax1.fill_between(time_points, pv, bond_value, alpha=0.3, color='green')
    ax1.set_xlabel('Years to Maturity', fontsize=11, fontweight='bold')
    ax1.set_ylabel('Bond Value ($)', fontsize=11, fontweight='bold')
    ax1.set_title(f'Bond Value Growth (4% annual return)', fontsize=12, fontweight='bold')
    ax1.grid(True, alpha=0.3, linestyle='--')
    ax1.legend(loc='upper left', fontsize=9)
    ax1.set_xticks(time_points)
    
    # Plot 2: Price Sensitivity to Interest Rates
    ax2 = axes[1]
    ax2.plot(rates * 100, bond_prices, 'b-', linewidth=3, alpha=0.8)
    ax2.axvline(x=rate * 100, color='red', linestyle='--', linewidth=2, alpha=0.7, label=f'Market Rate: {rate*100:.0f}%')
    ax2.axhline(y=pv, color='red', linestyle='--', linewidth=2, alpha=0.7, label=f'Fair Price: ${pv:.2f}')
    ax2.plot(rate * 100, pv, 'ro', markersize=12, markeredgewidth=2, markeredgecolor='white', zorder=5)
    ax2.fill_between(rates * 100, pv - 50, pv + 50, where=(np.abs(bond_prices - pv) <= 5), alpha=0.3, color='green', label='Fair Value Zone')
    ax2.set_xlabel('Interest Rate (%)', fontsize=11, fontweight='bold')
    ax2.set_ylabel('Bond Price ($)', fontsize=11, fontweight='bold')
    ax2.set_title('Bond Price vs Interest Rate', fontsize=12, fontweight='bold')
    ax2.grid(True, alpha=0.3, linestyle='--')
    ax2.legend(loc='upper right', fontsize=9)
    
    plt.tight_layout()
    display(fig)
    plt.close(fig)

    Real-World Context: This is exactly how bond prices are determined in financial markets. Bond prices adjust so that the yield to maturity equals the market interest rate for bonds of similar risk. When interest rates rise, bond prices fall (because future payments are worth less in present value terms). When interest rates fall, bond prices rise.

    Applications in Financial Markets

    The time value of money is fundamental to financial markets:

    Bond Pricing: Bonds are priced by discounting future coupon payments and principal repayment to present value using the yield to maturity as the discount rate. The relationship between bond prices and interest rates comes directly from time value of money principles.

    Stock Valuation: Stock prices reflect the present value of expected future dividends and capital gains. The discount rate used reflects the risk of the stock. Higher risk means higher discount rates and lower present values.

    Loan Amortization: Loan payments are calculated so that the present value of all payments equals the loan amount. This ensures that the lender is compensated for the time value of money.

    Investment Decisions: Companies evaluate investment projects by comparing the present value of expected cash flows to the investment cost. Projects with positive net present value (where present value of cash flows exceeds cost) are accepted.

    Retirement Planning: Retirement planning involves calculating how much to save today to have enough money in the future. This requires understanding how money grows over time.

    Option Pricing: Options are priced using time value of money principles. The option's value depends on the present value of expected payoffs, discounted at the risk-free rate.

    Every financial instrument, every investment decision, and every trading strategy involves the time value of money. Understanding this concept is essential for understanding financial markets.


    In Module 4: Mathematics for Finance

    1. Introduction
    2. Time Value of Money: The Foundation of Finance
    3. Compound Interest: The Power of Exponential Growth
    4. Present Value and Future Value: Valuing Money Across Time
    5. Annuities and Perpetuities
    6. Basic Statistics and Probability: Understanding Uncertainty
    7. Financial Ratios and Percentages: Tools for Analysis
    8. Advanced Financial Mathematics
    9. Mathematical Modeling in Finance
    10. End-of-Module Assessment