Calibration of Models
Calibration of Models
Introduction
In this short pdf, I am breaking down the calibration of option pricing models and interest rate models step by step, focusing
on clear and practical methods for understanding and implementing these processes. We’ll cover key models such as the
Black-Scholes model, LV model, Vasicek model, CIR and HW Model.
1. Data Collection
• Market Prices of Options (Cmarket ): These are the observed prices of options traded in the market. We collect these
because they represent the ”true” value of the options under current market conditions.
• Underlying Asset Price (S0 ): This is the current price of the stock or asset on which the option is based.
• Strike Price (K): This is the price at which the option can be exercised.
• Time to Maturity (T): The remaining time until the option expires.
• Risk-Free Interest Rate (r): The continuously compounded risk-free rate, typically derived from government bonds.
2. Parameter to Calibrate
• Volatility (σ): This is the parameter we need to calibrate. It represents the standard deviation of the asset’s returns and
is crucial for pricing options.
where:
ln(S0 /K ) + (r + σ2 /2) T
d1 = √
σ T
√
d2 = d1 − σ T
and Φ is the cumulative distribution function of the standard normal distribution.
5. Objective Function
The objective function measures the error between market prices and theoretical prices. We aim to minimize this error.
n
Error = ∑ (Cmarket,i − Cmodel,i (σ))2
i =1
where Cmodel,i (σ ) is the price calculated using the Black-Scholes formula with volatility σ.
1
Illustrative Example
Let’s say we have the following data for a European call option:
Initial Guess
Let’s start with an initial guess for volatility σ0 = 0.2.
Calculating Cmodel
Compute d1 and d2 :
ln(100/100) + (0.05 + 0.22 /2) · 1 0 + 0.07
d1 = √ = = 0.35
0.2 1 0.2
√
d2 = d1 − 0.2 · 1 = 0.35 − 0.2 = 0.15
Compute Φ(d1 ) and Φ(d2 ): Using standard normal distribution tables or a calculator:
Φ(0.35) ≈ 0.6368
Φ(0.15) ≈ 0.5596
Compute the theoretical option price:
Error Calculation
Error = (8 − 10.54)2 = (−2.54)2 = 6.45
Update Volatility
Since the model price (10.54) is higher than the market price (8), we need to reduce the volatility.
New Guess: Let’s try σ1 = 0.15.
Compute d1 and d2 for new σ:
2
Error Calculation
Error = (8 − 8.57)2 = (−0.57)2 = 0.32
The error has reduced significantly. We can continue this process, adjusting σ iteratively until the error is minimized.
3. Newton-Raphson Iteration
The Newton-Raphson update formula is:
f (σn )
σn+1 = σn −
f ′ (σn )
Here, f (σn ) is the difference between the model price and the market price, and f ′ (σn ) is the vega.
Example Calculation
Let’s go through a detailed example with the following data:
3
Initial Guess
Start with an initial guess σ0 = 0.2.
Iteration 1
Compute d1 and d2 for σ0 :
Φ(0.35) ≈ 0.6368
Φ(0.15) ≈ 0.5596
Compute the theoretical option price:
Iteration 2
Compute d1 and d2 for σ1 :
Φ(0.2137) ≈ 0.5853
Φ(0.0814) ≈ 0.5324
Compute the theoretical option price:
4
Iteration 3 (Optional)
Continue iterating in the same manner until the difference f (σn ) is close to zero, indicating that the theoretical price matches
the market price.
Summary
1. Define the objective function f (σ ) and its derivative (vega).
The local volatility model extends the Black-Scholes model by allowing the volatility to be a function of both the underlying
asset price S and time t, i.e., σ = σ (S, t). This model captures the observed market phenomenon where implied volatilities
vary with strike prices and maturities.
Dupire’s Equation
Dupire’s local volatility function σLV (S, t) can be derived from the market prices of European call options C (K, T ):
∂C ∂C
2 ∂T + rK ∂K
σLV (K, T ) = 1 2 ∂2 C
2 K ∂K2
Here, C (K, T ) is the market price of a European call option with strike K and maturity T.
∂C ∂C ∂2 C
, ,
∂T ∂K ∂K2
Example Calculation
Let’s go through an example step by step using simple finite differences.
Market Data
Option Prices: We have the following market prices for a given maturity T:
5
Finite Differences
First Partial Derivative with Respect to Strike Price K:
∂C C (K + ∆K ) − C (K − ∆K )
≈
∂K 2∆K
Let’s choose ∆K = 10:
∂C C (110, T ) − C (90, T ) 5 − 12
≈ = = −0.35
∂K K =100 2 · 10 20
Second Partial Derivative with Respect to Strike Price K:
∂2 C C (K + ∆K ) − 2C (K ) + C (K − ∆K )
≈
∂K 2 (∆K )2
Using the same ∆K = 10:
6
Vasicek Model Calibration
The Vasicek model describes the evolution of the short-term interest rate r (t) with the following stochastic differential
equation (SDE):
dr (t) = κ (θ − r (t)) dt + σ dW (t)
where:
• κ: Speed of mean reversion (how quickly the rate reverts to the long-term mean)
• θ: Long-term mean level of the rate
• σ: Volatility of the rate
Calibration Steps
1. Collect Market Data
To calibrate the Vasicek model, you need market data, such as:
• Zero-coupon bond prices: Prices of bonds with different maturities.
• Interest rate swaps: Market prices of interest rate swaps with various tenors.
where A(t, T ) and B(t, T ) are functions that depend on the model parameters. For the Vasicek model:
1 − exp(−κ ( T − t))
B(t, T ) =
κ
2
2 exp(−κ ( T − t))
σ
A(t, T ) = exp θ 2 ( T − t) −
2κ 2κ
where:
• Pmarket,i : Market price of the i-th bond.
• Pmodel,i : Model price of the i-th bond, computed using the Vasicek model.
• Gradient Descent: Iteratively adjust parameters in the direction that reduces the objective function.
• Newton-Raphson Method: Uses second-order information (the Hessian matrix) to find the minimum.
7
Detailed Example: Calibration of Vasicek Model
Market Data
Suppose you have the following market prices of zero-coupon bonds with maturities Ti :
• Bond 1 (Maturity = 1 year): Pmarket,1 = 0.98
• Bond 2 (Maturity = 2 years): Pmarket,2 = 0.95
• Bond 3 (Maturity = 3 years): Pmarket,3 = 0.92
T=1
1 − exp(−0.5 × 1)
B(t, 1) = ≈ 0.632
0.5
2
2 exp(−κ ( T − t))
σ
A(t, 1) = exp θ 2 ( T − t) − ≈ 0.982
2κ 2κ
Pmodel,1 = 0.982 × exp(−0.632 × 0.02) ≈ 0.98
Repeat this process for Bonds 2 and 3.
F (κ, θ, σ ) = (0.98 − 0.98)2 + (0.95 − Model Price 2)2 + (0.92 − Model Price 3)2
Newton-Raphson Method
To use the Newton-Raphson method, we need the gradient of the objective function with respect to the parameters. Let’s
focus on ∂F
∂θ .
N ∂P
∂F
= −2 ∑ ( Pmarket,i − Pmodel,i ) · model,i
∂θ i =1
∂θ
For the model price:
P(t, T ) = A(t, T ) exp(− B(t, T ) · r (t))
∂Pmodel,i ∂A(t, T )
= exp(− B(t, T ) · r (t))
∂θ ∂θ
σ2 2 exp(−κ ( T − t))
∂A(t, T )
= A(t, T ) · 2 ( T − t) −
∂θ 2κ 2κ
8
Example Calculation
For Bond 1:
T=1
Pmarket,1 = 0.98, Pmodel,1 = 0.97
∂A(t, T )
= A(t, T ) · 0.000225 [1 − exp(−0.5)]
∂θ
∂Pmodel,1
Compute ∂θ :
∂Pmodel,1 ∂A(t, T )
= exp(− B(t, T ) · r (t))
∂θ ∂θ
Compute the Gradient:
∂F ∂P
= −2(0.98 − 0.97) · model,1
∂θ ∂θ
Summary
• Collect Market Data: Zero-coupon bond prices or interest rate swaps.
• Compute Model Prices: Use the Vasicek model formulas for bonds or swaps.
• Define Objective Function: Measure the difference between market and model prices.
• Optimize Parameters: Use numerical methods to find the parameters that minimize the objective function.
1 CIR Model
The CIR model describes the short-term interest rate r (t) with the following stochastic differential equation (SDE):
q
dr (t) = κ (θ − r (t)) dt + σ r (t) dW (t) (1)
Where:
• κ: Speed of mean reversion
• θ: Long-term mean level of the rate
• σ: Volatility of the rate
• W (t): Standard Brownian motion
2 Calibration Steps
2.1 Collect Market Data
As with the Vasicek model, you need market data such as:
• Zero-coupon bond prices: Prices of bonds with different maturities.
• Interest rate swaps: Prices of swaps with various tenors.
2 (exp(κ ( T − t)) − 1)
B(t, T ) = (3)
2κ + (σ2 /θ ) (exp(κ ( T − t)) − 1)
σ2
2κθ
A(t, T ) = exp B ( t, T ) − ( T − t ) − ( B ( t, T ) − ( T − t )) (4)
σ2 2κ
9
2.3 Objective Function for Calibration
Define the objective function to minimize the difference between the model-implied prices and the market prices:
N
F (κ, θ, σ ) = ∑ ( Pmarket,i − Pmodel,i )2 (5)
i =1
Where Pmodel,i is the price computed using the CIR model and Pmarket,i is the market price.
• κ = 0.5
• θ = 0.03
• σ = 0.015
• T=1
Compute B(t, 1) and A(t, 1):
2 (exp(0.5 × 1) − 1)
B(t, 1) = 2
(6)
2 × 0.5 + 0.015
0.03 (exp(0.5 × 1) − 1)
F (κ, θ, σ ) = (0.98 − Model Price 1)2 + (0.95 − Model Price 2)2 + (0.92 − Model Price 3)2 (8)
Optimize:
Adjust κ, θ, and σ to minimize F using an optimization algorithm.
10
3.5 Gradient Calculation for Newton-Raphson
∂F
To use the Newton-Raphson method, we need the gradient of the objective function with respect to κ, θ, and σ. For ∂θ , the
gradient is:
N ∂P
∂F
= −2 ∑ ( Pmarket,i − Pmodel,i ) · model,i (9)
∂θ i =1
∂θ
∂Pmodel,i
Where ∂θ can be derived from:
∂Pmodel,i ∂A(t, T )
= · exp (− B(t, T ) · r (t)) (10)
∂θ ∂θ
∂A(t,T )
To compute ∂θ :
∂A(t, T ) 2σ2
= A(t, T ) · 2 [ B(t, T ) − ( T − t)] (11)
∂θ θ
Hull-White Model
The Hull-White model describes the short-term interest rate r (t) with the following stochastic differential equation (SDE):
where:
• θ (t) is the deterministic drift term.
• σ (t) is the time-dependent volatility term.
• W (t) is a standard Brownian motion.
For the Hull-White model, the term structure of the interest rate is given by:
where A(t, T ) and B(t, T ) are functions of the model parameters. Specifically:
1 − e−α( T −t)
B(t, T ) =
α
σ2
2
A(t, T ) = exp B(t, T ) − ( T − t)
2α2
where:
• α is the mean-reversion speed.
• σ is the volatility of the short-term interest rate.
Calibration Steps
Collect Market Data
To calibrate the Hull-White model, you need:
• Zero-Coupon Bond Prices: Prices of bonds with different maturities.
• Interest Rate Swaps: Prices of swaps with various tenors.
11
Define the Objective Function
The objective function F to minimize is the sum of squared differences between market prices and model prices:
N
F (α, σ ) = ∑ ( Pmarket,i − Pmodel,i )2
i =1
Optimize Parameters
Use optimization techniques to find the parameters α and σ that minimize the objective function.
• σ = 0.015
0.0152
2
A(t, 1) = exp 0.632 − 1
2 × 0.52
0.000225
A(t, 1) ≈ exp (0.399 − 1) ≈ exp(−0.000045) ≈ 0.999955
0.5
So, the model price for Bond 1:
Pmodel,1 = 0.999955 × exp(−0.632 × r (t))
Optimize Parameters
Use numerical optimization techniques (e.g., gradient descent, Newton-Raphson) to adjust α and σ to minimize F.
12
Gradient Calculation for Newton-Raphson
∂F
To use the Newton-Raphson method, we need the gradients of F with respect to α and σ. For ∂α , the gradient is:
N ∂P
∂F
= −2 ∑ ( Pmarket,i − Pmodel,i ) · model,i
∂α i =1
∂α
∂Pmodel,i
where ∂α can be derived from:
∂Pmodel,i ∂A(t, T )
= · exp(− B(t, T ) · r (t))
∂α ∂α
Summary
1. Collect Market Data: Zero-coupon bond prices or interest rate swaps.
13