The following algorithm illustrates the basic methodology for calibrating volatility parameter ƒ such that traded options are priced with smallest error.
Main procedure within which the optimisation is performed.
For valuation_date 1 to n For expiry_date 1 to m initialise 1 and 2 get Black_premium for this expiry and valuation date Calibrate_Rate_Tree ( 1 ) Evaluate_Bond_Tree P 1 = BDT_option_premium ( 1 ) - Black_premium Calibrate_Rate_Tree ( 2 ) Evaluate_Bond_Tree P 2 = BDT_option_premium ( 2 ) - Black_premium While P 1 > 1 * 10 -5 and P 2 > 1 * 10 -5 mid = ( 1 + 2 )/2 Calibrate_Rate_Tree ( mid ) Evaluate_Bond_Tree P mid = BDT_option_premium ( mid ) - Black_premium If P 1 * P mid < 0 Then 2 = mid ElseIf P 2 * P mid < 0 Then 1 = mid End If Loop = mid Next expiry_date Next valuation_date
The procedure Calibrate_Rate_Tree builds the binomial tree of short-term interest rates for the specified volatility parameter. The basic procedure followed is as described in §14.3. Once the tree of short- term interest rates has been constructed , the coupon bond is priced by procedure Evaluate_Bond_Tree . Due to the long maturity dates of the coupon bonds it is not practical to construct trees with daily time steps. Using a larger time step, say 30 days, introduces some complications. Since bond maturity and coupon payments may fall between node points, we need to interpolate these values to maintain accuracy. Below is the algorithm used to price the coupon bond for time steps greater than one day. We let N b be the final time step of the tree. This will be either equal to or just greater than, the maturity of the bond underlying the option we wish to price.
If bond maturity lies between time N b - 1 and N b then offset = (Maturity_Date - Valuation_Date)/Time_Step - N b - 1)] *Time_Step/365 For each state j = -( N b - 1) to ( N b - 1) Step 2 B ( N b - 1, j ) = (1 + Coupon)/(1 + r ( N b - 1, j ) * offset) Next state j End if For each time i = ( N b - 2) to 0 Step -1 If a coupon lies between times i and i + 1 then offset = [Coupon_Term/Time_Step - i ] * Time_Step/365 For state j = - i to i Step 2 Coupon_Value = Coupon/(1 + r i,j * offset) B i,j = d i,j [ B i +1, j +1 + B i +1. j -1 ]+ Coupon_Value Next state j Else For state j = - i to i Step 2 B i,j = d i,j [ B i +1, j +1 + B i +1. j -1 Next state j End If Next time i
A similar problem is encountered when pricing the coupon bond option in the procedure BDT_option_premium . The option expiry date may fall between two time nodes. Further complications may arise from the T + ± settlement convention for bonds [5] . The strike refers to a bond price at option expiry + ± . To calculate the terminal option value we must discount the strike price to option expiry. Option expiry and (option expiry+ ± ) may occur between the same pair of time nodes, on either side of a time node or either one, but not both, may occur at a time node (unless time step is ± days). These possibilities must all be taken into account to allow for correct interpolation of the strike price and bond price. This algorithm is outlined below.
Interpolate to determine bond price and option strike price at option expiry. If settlement date of option expiry lies between time i and i + 1 then offset = [Settlement_Term/Time_Step - i ] * Time_Step/365 For state j = - i to i Step 2 Strike i,j = Strike_AIP/(1 + r i,j * offset) Next state j Else For state j = - i to i Step 2 Strike i,j = Strike_AIP Next state j End If If option expiry date lies between time i and i + 1 then For state j = - i to i Step 2 Linearly interpolate between Strike i,j and Strike_AIP at time Settlement_Term to obtain the Strike_at_Expiry j Linearly interpolate between B i,j and B i +1, j to obtain B_at_Expiry j Next state j Else (here option expiry lies prior to time i ) For state j = -( i - 1) to i - 1 Step 2 Strike i -1, j = d i,j (Strike i,j +1 + Strike i,j -1 Next state j For state j = -( i - 1) to i - 1 Step 2 Linearly interpolate between B i -1, j and B i,j to obtain B_at_Expiry j Linearly interpolate between Strike i -1, j and Strike i,j to obtain Strike at Expiry j Next state j End If Initialise option value at option expiry. For state j at option expiry V_at_Expiry j = Max {B_at_Expiry j - Strike_at_Expiry j , 0} Next state j Determine option value at node directly prior to option expiry. Let k be the node directly prior to option expiry. This corresponds to either node i or node i - 1 above. For state j = - k to k Step 2 V k,j = d k,j (V_at_Expiry j +1 + V_at_Expiry j -1 Next state j Using backward induction, determine initial option value. For time i = k - 1 to 0 Step -1 For state j = - i to i Step 2 V i,j = d i,j ( V i +1, j +1 + V i +1, j -1 Next state j Next time i
[5] This represents time T plus ± business days.