Integral Calculus and Differential Equations › Continuous Compounding and the Exponential Function

Michael BrenndoerferOctober 28, 20255 min read
Quantitative FinanceAll chapters
Part 1 of 15Mathematical Foundations
Chapter 7Integral Calculus and Differential Equations › Continuous Compounding and the Exponential Function
Reading section 3 of 14 · Continuous Compounding and the Exponential Function · 5 minSection 3 of 14 · 5 min

Book contents

Section 3 of 14 · 5 min read

Integral Calculus and Differential Equations › Continuous Compounding and the Exponential FunctionOne section · Sections in this chapter3 / 14 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Continuous compounding is an important application of integral calculus in finance. Interest accrual, compounding, and scheduled crediting depend on the contract. Continuous compounding supplies a mathematical convention for the models below.

Discrete compounding at a constant nominal annual rate rr, nn times per year for tt years, gives the following value at compounding dates, where ntnt is an integer:

FV=PV⋅(1+rn)n⋅tFV = PV \cdot \left(1 + \frac{r}{n}\right)^{n \cdot t}

Each completed period credits interest at rate r/nr/n. The comparison below fixes this nominal quote as frequency changes; between credit dates, its curves use fractional-power interpolation, not continuous crediting. As the compounding frequency nn increases, moving from annual to quarterly to daily to hourly, this expression approaches a limit. Taking n→∞n \to \infty yields continuous compounding:

FV=PV⋅ertFV = PV \cdot e^{rt}

where:

  • FVFV: future value of the investment
  • PVPV: present value (initial investment)
  • e≈2.71828e \approx 2.71828: Euler's number, the base of natural logarithms
  • rr: continuously compounded annual rate in erte^{rt}; the preceding discrete formula uses the same number as a nominal annual quote, not an effective annual return
  • tt: time in years

The exponential appears because the balance changes in proportion to its current value at a constant rate. A positive rate produces growth, zero rate leaves the balance constant, and a negative rate produces decay. The continuous formula is a limit of multiplicative discrete factors, not literal infinitely frequent contractual payments.

Every solution of y′=kyy'=ky with constant kk has the form y(t)=Aekty(t)=A e^{kt}. An initial value fixes AA; in particular, ete^t solves y′=yy'=y with y(0)=1y(0)=1.

Deriving Continuous Compounding from an Integral

Let's derive the formula for a positive initial balance V0V_0 and constant continuously compounded rate rr. The balance V(t)V(t) changes at rate rr times its current value, growing for r>0r>0 and shrinking for r<0r<0:

dVdt=rV(t)\frac{dV}{dt} = rV(t)

where:

  • V(t)V(t): account value at time tt
  • dVdt\frac{dV}{dt}: instantaneous rate of change of account value
  • rr: continuous interest rate
  • r⋅V(t)r \cdot V(t): interest earned per unit time, proportional to current balance

Solving this differential equation gives an exponential family; the initial balance selects one path. On the positive-balance branch, separation of variables moves the VV and tt terms to opposite sides:

dVV=r dt\frac{dV}{V} = r \, dt

Integrating both sides:

∫dVV=∫r dt\int \frac{dV}{V} = \int r \, dt ln⁡∣V∣=rt+C\ln|V| = rt + C

Here CC is the integration constant. Because we assumed a positive balance, exponentiating ln⁡∣V∣\ln|V| gives VV, rather than −V-V:

V(t)=ert+C=eC⋅ertV(t) = e^{rt + C} = e^C \cdot e^{rt}

Setting t=0t = 0 and letting V(0)=V0V(0) = V_0 be the initial value:

V0=eC⋅e0=eCV_0 = e^C \cdot e^0 = e^C

Therefore, eC=V0e^C = V_0, and the solution is:

V(t)=V0⋅ertV(t) = V_0 \cdot e^{rt}

The final formula also solves the ODE directly for zero or negative initial values; V0=0V_0=0 gives the separate equilibrium V(t)=0V(t)=0. With a time-varying deterministic coefficient, y′=k(t)yy'=k(t)y instead gives y(t)=y(0)exp⁡(∫0tk(s) ds)y(t)=y(0)\exp(\int_0^t k(s)\,ds). Random shocks require a stochastic model rather than this ODE alone.

In[6]:
Code
import numpy as np

# Compare discrete vs continuous compounding
principal = 1000
rate = 0.05  # 5% annual rate
years = np.linspace(0, 20, 100)

# Continuous compounding
continuous_value = principal * np.exp(rate * years)

# Discrete compounding at various frequencies
annual_value = principal * (1 + rate) ** years
quarterly_value = principal * (1 + rate / 4) ** (4 * years)
monthly_value = principal * (1 + rate / 12) ** (12 * years)
daily_value = principal * (1 + rate / 365) ** (365 * years)
Out[7]:
Visualization
Line chart showing investment value over 20 years under annual, quarterly, monthly, daily, and continuous compounding.
Comparison of investment growth under different compounding frequencies. Continuous compounding provides the highest return, though the difference from daily compounding is negligible.

The plot demonstrates that as compounding frequency increases, the investment value approaches the continuous compounding limit. After 20 years at 5% interest, the final values illustrate the practical differences:

Out[8]:
Console
After 20 years at 5% annual rate:
  Annual compounding:     $2,653.30
  Quarterly compounding:  $2,701.48
  Monthly compounding:    $2,712.64
  Daily compounding:      $2,718.10
  Continuous compounding: $2,718.28

While the difference between daily and continuous compounding is small (about $0.19 on a $1,000 investment over 20 years), continuous compounding provides mathematical elegance that simplifies many calculations in quantitative finance.