Procedure for Pricing Bermudans and Callable Swaps

18

Click here to load reader

description

Procedure for Pricing Bermudans and Callable Swaps

Transcript of Procedure for Pricing Bermudans and Callable Swaps

Page 1: Procedure for Pricing Bermudans and Callable Swaps

PROCEDURE FOR PRICING BERMUDANS AND CALLABLE SWAPSPATRICK S. HAGANBLOOMBERG LP499 PARK AVENUE

NEW YORK, NY [email protected]

212-893-4231

Abstract. Here we break up the methodology for evaluating callable swaps

Key words. range notes, time swaps, accrual notes

1. Introduction. The theory an methodology for using the LGM model to evaluate Bermudans iscovered in: Evaluating and hedging exotic swap instruments via LGM. In this paper, Callable Range Notes:Procedure breaks down the method into a specific procedure and set of algorithms. In the main body of thepaper, we treat Bermudans on bullet swaps and callable bullet swaps. In the appendix, we indicate

2. Main routine.

2.1. Inputs.

2.1.1. Deal definition.Coupon leg inputs. The coupon leg is defined by:

(2.1a) n = number of coupon intervals

(2.1b) t0, t1, . . . , tn = start and coupon dates

(2.1c) M1,M2, . . .Mn = maximum coupon payment

(2.1d) m1,m2, . . .mn = minimum coupon payment

(2.1e) R0i , R1i = effective range for the coupon payment

(2.1f) k = index is assumed to be k month Libor rate

(2.1g) ind = index floating rate.

To preform the adjustment, we also need today’s value C0i of each coupon making up the range note,

V cpn1 , V cpn

2 , ..., V cpnn .

Here ti−1 and ti are the start and end dates of the ith interval, for i = 1, 2, ..., n. The maximum couponpayment Ci = αiRfix occurs if the index is within the range for every day of the period i, and where theminimum coupon payment ci = αiRfix occurs if the index is outside the range for every day of the periodi, while the (effective) range is defined by R0i and R1i :

(2.2a) coupon = θiMi + (1− θi)mi paid at ti,

1

Page 2: Procedure for Pricing Bermudans and Callable Swaps

where

(2.2b) θi =# of days t in interval i with R0i ≤ Ltrue(t) ≤ R1i

# of days t in interval i

Here if the index rate Lind(t) has any basis spread, we assume that this spread has already been incoporatedinto the boundaries

(2.3) R0i = R0,origi − bs(ti−1, ind), R1i = R1,origi − bs(ti−1, ind).Funding leg inputs. The inputs to the program are the “effective funding leg coupons,”

(2.4) cfun1 , cfun2 , . . . cfunn .

To explain this input, recall that the funding leg is assumed to be a standard floating leg plus a margin rate.As discussed earlier, we approximate the floating leg’s value by pretending the floating leg schedule is thesame as the fixed leg schedule. Then at any coupon date tj , the value of the floating leg is equivalent to

1 paid at tj(2.5a)

cfuni = cvg(ti−1, ti,basisfun)(mratei + bsfuni ) paid at ti for i = j + 1, ..., n(2.5b)

Exercise input.

(2.6) payer/receiver flag

A payer is a Bermudan option to pay the coupon leg, and receivethe funding leg; a receiver is an option toreceiver the coupon leg and pay the funding leg

(2.7a) τ0, τ1, ..., τm = exercise (notification dates).

We assume that the dates τ j before today have already been excluded. We also need the array

(2.7b) ifirst0 , ifirst1 , ..., ifirstm

If one exercises at τ j , one receives/pays the fixed leg starting with the coupon payment paid at ti wherei = ifirstj . The floating leg is equivalent to 1 paid at ti−1 with i = ifirstj . The exercise fees are

(2.7c) f0, f1, ..., fm = exercise fee.

If the Bermudan is exercised at tfirstj , then the option holder must pay an exercise fee of fj on date ti−1with i = ifirstj .

Deal aproximation input. In the Callable Range Note document we assumed the proxy deal only has 1fixing per period. Here we allow

(2.8) nfix = number of fixings per coupon period

so that we can find the sweet spot between accuracy and performancePayoff adjusters (overall coupon): On ... this means that we will multiply up the proxy coupon to match

today’s coupon.Payoff adjusters (caplet vol): On ... this means we will adjust the caplet vols to match today’s value

(and get risk to caplets)

2

Page 3: Procedure for Pricing Bermudans and Callable Swaps

2.1.2. Market input.

tnow = today (evaluation, or “as of,” date)(2.9a)

yc = designation for yield curve(2.9b)

vc = designation for volatility cube(2.9c)

index = designation for rate used in coupon(2.9d)

These designations are used only in the external routines below.

2.1.3. Method inputs.Calibration flags and variables. Calibration method: constant mean reversionCalibration parameter: κ = 0Evaluation method. Integration method: Direct convolution ... other methods may be developed in the

futureKink handling: True ... this means to apply the kink correction below to the integration

2.2. Output. The value of the Bermudan and the component european options on the range note arecalculated:

V berm = value of bermudan option(2.10a)

V eur0 , V eur

1 , ..., V eurm = value of European options contained in Bermudan(2.10b)

Also, we output the four vectors defining the calibrated model:

0 = T0, T1, ..., Tn(2.11a)

0 = H0,H1, ...,Hn(2.11b)

0 = τ0, τ1, ..., τm(2.11c)

0 = ζ0, ζ1, ..., ζm(2.11d)

The functions H(T ) and ζ(t) are obtained by piecewise linear interpolation, with linear extrapolation beyondTn and τm).

2.3. Procedure. Step1. Replace

(2.12a) Mnewi =Mi −mi for i = 1, ..., n

and

(2.12b) fnewj =

½fj for receivers−fj for payers

for j = 1, ...,m

Then if the deal is exercised at τ j , the payoff is equivalent to

mi − cfuni +Mi

nfix

nfixX=1

θi, received at ti for i = ifirstj , ifirstj + 1, ..., n(2.13a)

1 recieved at tn(2.13b)

1 + fj paid at tifirstj −1(2.13c)

3

Page 4: Procedure for Pricing Bermudans and Callable Swaps

for receivers. For payers, one exchanges the received’s and paid’s. Here θi, are the appropriate digitals. Seebelow.

Step 2. Calculate the schedule data for each digitalStep 2a. Get the appropriate business day rule, holiday centers, and end of month rule for the k month ratebeing used as an index. Also get the appropriate day count basis, basisind, for the k month index rate.

bdrind = GetBDR(index),(2.14a)

hol1, hol2, hol3 = GetHolCtrs(index),(2.14b)

eom = GetEOM(index),(2.14c)

basisind = GetBasisFlt(index).(2.14d)

Step 2b. Subdivide each interval ti−1 to ti into nfix subintervals. Set

tsti, = Add(t, 0,months, bdrind, hol1, hol2, hol3, eom)(2.15a)

for = 1, 2, .., nfix, i = 1, 2, ..., n

where

(2.15b) t =nfix − + 1

nfixti−1 +

− 1nfix

ti for = 1, 2, .., nfix, i = 1, 2, ..., n

rounded to the nearest integer. Note that the Add function just moves t to a good business day using theappropriate conventions for a k month caplet based on the rate indexStep 2c. Find the end date, fixing date, and day count fraction for each sub-interval. Since the index is a kmonth rate

tfixi, = FixingOf(tsti, , index) for = 1, 2, .., nfix, i = 1, 2, ..., n(2.16a)

tendi, = Add(tsti, , k,months, bdrind, hol1, hol2, hol3, eom)(2.16b)

for = 1, 2, .., nfix, i = 1, 2, ..., n

(2.16c) αi, = coverage(tsti, , tendi, , basisind).

Step 2d. Get the forward rates and the implied vol for each digital caplet:

R0i, =D(tsti, )−D(tendi, )

αi, D(tendi, )for = 1, 2, .., nfix, i = 1, 2, ..., n,(2.17a)

σ1i, = ImpliedDigVol(tfixi, , k months, R1i ) for = 1, 2, .., nfix, i = 1, 2, ..., n,(2.17b)

σ1i, = ImpliedDigVol(tfixi, , k months, R1i ) for = 1, 2, .., nfix, i = 1, 2, ..., n.(2.17c)

Step2e. Calculate discount factors for each coupon date

(2.18) Di = Df(ti, yc) for i = 1, 2, ..., n,

Step 3. Call characterization routineStep 4. Call the calibration routineStep 5. Call the evaluation routineStep 6. Free space & return prices and model calibration vectors

4

Page 5: Procedure for Pricing Bermudans and Callable Swaps

2.4. External routines needed. GetBDR(index), ... returns the business day rule for index

GetHolCtrs(index) ... returns the holiday centers for index paydaysGetEOM(index) ... returns the end of month flag for index schedulesGetBasisFlt(index) ... returns the day count basis for indexFixingOf(t, index) ... returns the fixing date for the rate index which starts on date tCoverage(t1, t2, basis) ... returns the coverage (day count fraction) according to the basis basis.Add(t, j,months, bdr, hol1, hol2, hol3, eom) ... adds j months to t; if the result is a bad business day in

any of the holiday centers, uses the business day rule bdr to move to a good business dayDf(t,yc) ... returns the discount factor to date t, according to the yield curve yc.ImpliedDigitalVol(tex, , Rfix,vc) ... returns the volatility for a digital caplet based on index

3. Characterization routine.

3.1. Inputs.

Mi = maximum coupon for interval i(3.1a)

mi = minimum coupon for interval i(3.1b)

cfuni = effective coupon from funding leg (margin+basis spread)(3.1c)

R1i , R2i = effective boundary of ranges(3.1d)

Di = discount factors at pay dates(3.1e)

nfix = number of subintervals to approximate each coupon period(3.1f)

R0i, = at-the-money rate for caplet i,(3.1g)

αi, = day count fraction for caplet i,(3.1h)

σ1i, = implied digital vol at R1i for caplet i,(3.1i)

σ2i, = implied digital vol at R2i for caplet i,(3.1j)

tfixi, , tsti, , tendi, = caplet fixing, start, and end dates(3.1k)

tnow = today (evaluation, or “as of,” date)(3.1l)

τ j = jth exercise date of Bermudan(3.1m)

ifirstj = settlement-upon-exercise date of Bermudan(3.1n)

fj = sign adjusted fee for exercising at τ j(3.1o)

3.2. Output. The vectors of exercise dates, tenors and parallel shifts

τ j = exercise dates,(3.2)

j = tn − tifirstj −1 = tenor(in months)(3.3)

γj = parallel shift(3.4)

for j = 1, 2, ...,m.We use the convention that curve shifts γ use the Act365 convention, so wherever one seeγ(t2 − t1) in below, one should replace it with γ(t2 − t1)/365

3.3. Procedure. Step 1. Let

(3.5a) tstj = tifirstj −1

be the coupon start date for the first coupon received upon exercising at τ j , and calculate

(3.5b) s1,2i, = σ1,2i,

qtfixi, − tnow

5

Page 6: Procedure for Pricing Bermudans and Callable Swaps

Step 2. Use a global Newton (chord?) scheme to find the value of the shift γj such that

nXi=ifirstj

(mi − ci +

Mi

nfix

nfixX=1

£1−N (d1i, (γ)−N (−d2i, (γ))

¤)Die

−γj(ti−tstj )(3.6a)

+D(tn)e−γj(tn−tstj ) = (1 + fj)D(t

stj )

with

(3.6b) d1,2i, (γ) =

logR1,2i

R0i, (γ)+³12 −R0i, (γ)yi,

´ hs1,2i,

i2s1,2i,

,

where

(3.6c) R0i, (γ) = R0i, +1

αi,

¡1 + αi, R

0i,

¢ ³eγ(t

endi, −tsti, ) − 1

´Step 3: Return the outputs

3.4. External routines needed. User written iteration scheme

Standard cumulative normal

4. Calibration routine.

4.1. Inputs. The inputs are:

τ j = notification (exercise) date, for j = 0, 1, ...,m− 1(4.1a)

j = length of the swap, for j = 0, 1, ...,m− 1(4.1b)

γj = parallel shifts for j = 0, 1, ...,m− 1(4.1c)

where m is the number of options. Also, input are

(4.1d) tnow = today (evaluation, or “as of,” date)

method = constant mean reversion,

κ = mean reversion,

where the mean reversion is presumably zero. Finally, we need to input:

flt = designator of standard floating leg index(4.2a)

yc = designator of yield curve(4.2b)

vc = designator of volatility cube(4.2c)

These designators are used in the basis spread, discount factor, and vol cube routines.

6

Page 7: Procedure for Pricing Bermudans and Callable Swaps

4.2. Outputs. The outputs are the four vectors

0 = T0, T1, ..., Tn(4.3a)

0 = H0,H1, ...,Hn(4.3b)

0 = τ0, τ1, ..., τm(4.3c)

0 = ζ0, ζ1, ..., ζm(4.3d)

The functions H(T ) and ζ(t) are obtained by piecewise linear interpolation, with linear extrapolation beyondTn and τm).

4.3. Procedure. In this procedure we develop a set of swaption which have common pay dates ... this isnot necessary for the “constant kappa” calibration method we are using (since each swaption can be calibratedindependently of all the others. However, it greatly simplifies some of the other calibration methods, so wemay as well develop it this way to simplify future work.

In this procedure, we also need quatities which refer to the standard floating leg index (such as 3mUS-DLibor) and market default parameters for fixed legs opposite these floating legs in single currency swaps.We’ll abreviate these arguments as flt and fix.

Step 1: Ensure that the triples are ordered in terms of increasing j , and exclude any date closer than,say, 1 month apart from the previous date.

Step 2: Replace each j by the nearest whole number of months.Step 3: Fill in the swaption schedules.

a) for each exercise date, find the swaptions start date:

(4.4a) tstj = spot-of-t(τ j ,flt) for j = 0, 1, ...,m− 1.

b) find the the theoretical end dates for the swaptions; of these the theoretical end dates that are withina month of the last theoretical end date, select the average (or most common) date to be the anchor dateTanchor;c) Fill in the fixed leg pay dates: let

q = freq(fix)(4.4b)

bdr = BusDayRule(fix)(4.4c)

be the number of months per period and business day rule for a standard swap, and then find all the dates

(4.4d) Tk = Add(Tanchor,−q(n− k),months,bdr,ho11,hol2,hol3, eom) for k = 0, 1, ..., n.

Here, the holiday centers, and end-of-month rule are the ones appropriate for fixed legs in the standard swap,and T0 is the first date with

(4.4e) T0 ≤ tst0 .

If T0 ≤ tnow, then replace it with tnow.Step 4: Calculate the quantities needed for the swaptions

a) calculate the coverages (day count fractions) for each interval using the both the fixed and floating legbases:

αfixk = cvg(Tk−1, Tk,basisfix) for k = 1, ..., n(4.5a)

αfltk = cvg(Tk−1, Tk,basisflt) for k = 1, ..., n(4.5b)

7

Page 8: Procedure for Pricing Bermudans and Callable Swaps

b) find the discount factor to each pay date:

(4.5c) Dk = Df(Tk, yc) for k = 1, ..., n,

where “yc” is the relevent yield curve.c) find the forward basis spread for each interval,

(4.5d) bsk = bs(Tk−1,flt) for k = 2, ..., n

d) the first period of each swaption is special, in that it may be broken. So for each swaption j, we have tofind the same quantities:d1) find the first pay date Tk strictly after the swaptions start-upon-exercise date tstj . Call it k

1j :

(4.6a) k1j is smallest k with tstj < Tk1j .

d2) find the coverage for the first period:

(4.6b) αfix,firstj = cvg(tstj , Tk1j ,basisfix), αflt,firstj = cvg(tstj , Tk1j ,basis

flt)

d3) find the discount factor for each start date tstj ,

(4.6c) Dstj = Df(t

stj , yc)

d4) find the basis spread for the first period

bsfirstj = bs(tstj ,flt)

Step 5: For each swaption j, determine the strike Rfixj of each swaption from

(4.7) Rfixj =

Dstj −Dne

−γj(Tn−tstj ) + αflt,firstj bsfirstj Dk1je−γj(Tk1

j−tstj )

+nP

k=k1j+1

αfltk bskDke−γj(Tk−tstj )

αfix,firstj Dk1je−γj(Tk1

j−tstj ) +

nPk=k1j+1

αfixk Dke−γj(Tk−tstj )

Here γj∆T is to be interpretted as Act365. See characterization routineStep 6: For each swaption j, determine the market price

a) Find the at-the-money forward swap rate

(4.8a) R0j =

Dstj −Dn + αflt,firstj bsfirstj Dk1j

+nP

k=k1j+1

αfltk bskDk

αfix,firstj Dk1j+

nPk=k1j+1

αfixk Dk

.

8

Page 9: Procedure for Pricing Bermudans and Callable Swaps

b) Get the volatility σ for the swaption with exercise date τ j ,start date t1j , end date Tn, and strike Rfixj :

(4.8b) σ = GetVol(τ j , Tn, Rfixj , R0j , vc)

c) Find

(4.8c) yj = Years(tnow, τ j) = time to exercise in years

d) Evaluate

(4.8d) V mktj =

nRfixj N (d1)−R0jN (d2)

oαfix,firstj Dk1j+

nXk=k1j+1

αfixk Dk

,

with

(4.8e) d1,2 =logRfix

j /R0j ± 12σ

2yj

σ√yj

.

Now we get to the calibration-proper step.Step 7: Fill in H(T ):

(4.9) Hi =1− e−κTi

κ

to fill in the H vector.Step 8: For each j, find the value of

pζj :

a) interpolate (linear-linear-linear) to obtain Hstj at the swaptions start-upon-exercise date

b) Use the following formula to get an intial guess forpζj

(4.10)qζj ≈

12

³Rfixj +R0j

´σ√yj

nPk=k1j+1

αfixk Dk

Sum

with

Sum =hHk1j−Hst

j

i ³αfix,firstj Rfix

j − αflt,firstj bsfirstj

´Dk1j

(4.11)

+nX

k=k1j+1

£Hk −Hst

j

¤ ³αfixk Rfix

j − αfltk bsk

´Dk +

£Hn −Hst

j

¤Dn

c) Use a global Newton scheme to find thepζj which sets the model value V

LGMj equal to the above market

9

Page 10: Procedure for Pricing Bermudans and Callable Swaps

value.

V LGMj =

³αfix,firstj Rfix

j − αflt,firstj bsfirstj

´Dk1j

N

y∗ +hHk1j−Hst

j

iζjp

ζj

(4.12a)

+nX

k=k1j+1

³αfixk Rfix

j − αfltk bsk

´DkN

Ãy∗ +

£Hk −Hst

j

¤ζjp

ζj

!

+DnN

Ãy∗ +

£Hn −Hst

j

¤ζjp

ζj

!−Dst

j N

Ãy∗pζj

!

∂V LGMj

∂pζj

=hHk1j−Hst

j

i ³αfix,firstj Rfix

j − αflt,firstj bsfirstj

´Dk1j

G

y∗ +hHk1j−Hst

j

iζjp

ζj

(4.12b)

+nX

k=k1j+1

£Hk −Hst

j

¤ ³αfixk Rfix

j − αfltk bsk

´DkG

Ãy∗ +

£Hk −Hst

j

¤ζjp

ζj

!

+£Hn −Hst

j

¤DnG

Ãy∗ +

£Hn −Hst

j

¤ζjp

ζj

!

with y∗ determined implicitly by

³αfix,firstj Rfix

j − αflt,firstj bsfirstj

´Dk1j

e−(Hk1

j−Hst

j )y∗− 1

2 Hk1j−Hst

j

2

ζj(4.12c)

+nX

k=k1j+1

³αfixk Rfix

j − αfltk bsk

´Dke

−(Hk−Hstj )y

∗− 12(Hk−Hst

j )2ζj

+Dne−(Hn−Hst

j )y∗− 1

2 (Hn−Hstj )

2ζj = Dst

j

Note: For efficiency, it’s usually best for a single function to calculate and return V LGMj ,

∂V LGMj

∂√ζj, and

y∗. One usually inputs an initial guess for y∗, since y∗ needs to be determined implicitly by its own globalNewton scheme. (y∗ = 0 is a good initial guess, which always leads to convergence.). For each step in theNewton’s method for

pζj , we can use y

∗ from the preceding step as the initial guess. Then only only oneor two steps are needed to get y∗. For the first step, y∗ = 0 can be used.

Step 9. Fill in the return array with τ0 = 0, ζ0 = 0 and then τ j , ζj . Check to ensure that ζj ’s areincreasing in j. If ζj < ζj−1, increase ζj to ζj−1. Of the theoretically feasible values, this one is closest tomatching the market.

4.4. Summary of external routines needed. Date mechanics routines:

tst = spot-of-t(τ ,flt)q = freq(fix)bdr = BusDayRule(fix)FixLegDCBasis(index) returns the day count basis βfix for a fixed leg of same type of swapFltLegDCBasis(index) returns the day count basis βflt for a floating leg of same type of swap

10

Page 11: Procedure for Pricing Bermudans and Callable Swaps

Tk = Add(Tanchor, j,months,bdr,ho11,hol2,hol3,eom) adds/subtracts j months to Tanchor, usingthe respect end-of-month flag eom, and then applies the business day rule bdr to find a good business dayaccording to the joint holiday schedules hol1, hol2, hol3. Note: need to allow j negative and zero as well aspositive.

cvg (ta, tb,basis) returns the day count fraction of interval from ta to tb according to basisyj =Years(tnow, τ j) = time to exercise in years

Market info routinesDf(t, yc) returns discount factor for date t according to the yield curve yc.bs(t,flt) returns the basis spread for the floating rate indexfltGetVol(τex, Tend, Rfix, R0,flt) returns the volatility of a swaption/caplet whose exercise (no-

tification) date is τ , where the underlying swap/FRA lasts from spot-of-τ to Tend, with strike Rfix andat-the-money rate R0. Here, the standard fixed leg frequency, day count basis for swaptions/caplets basedon index needs to be used.

Note: It may be simpler to agree on the names of an "add months" routine, which automatically appliesthe eom flag, business day rule, and holiday centers appropriate for the floating leg (and fixed leg) index:

(4.13a) t = AddMonths(tanchor, n,fix),

(4.13b) t = AddMonths(tanchor, n, bdr,flt),

5. Creating the payoffs/adjustments.

5.1. Inputs.

5.1.1. Deal inputs.

Mi = maximum coupon for interval i(5.1a)

mi = minimum coupon for interval i(5.1b)

cfuni = effective coupon from funding leg (margin+basis spread)(5.1c)

R1i , R2i = effective boundary of ranges(5.1d)

Di = discount factors at pay dates(5.1e)

nfix = number of subintervals to approximate each coupon period(5.1f)

R0i, = at-the-money rate for caplet i,(5.1g)

αi, = day count fraction for caplet i,(5.1h)

σ1i, = implied digital vol at R1i for caplet i,(5.1i)

σ2i, = implied digital vol at R2i for caplet i,(5.1j)

tfixi, , tsti, , tendi, = caplet fixing, start, and end dates(5.1k)

τ j = jth exercise date of Bermudan(5.1l)

ifirstj = settlement-upon-exercise date of Bermudan(5.1m)

fj = sign adjusted fee for exercising at τ j(5.1n)

5.1.2. Market inputs.

tnow = today (evaluation, or “as of,” date)(5.2a)

V cpn1 , V cpn

2 , ..., V cpnn = today’s value of each coupo(5.2b)

11

Page 12: Procedure for Pricing Bermudans and Callable Swaps

5.1.3. Model inputs. We need the calibrated H(T ) and ζ(t)

0 = T0, T1, ..., Tn(5.3a)

0 = H0,H1, ...,Hn(5.3b)

0 = τ0, τ1, ..., τm(5.3c)

0 = ζ0, ζ1, ..., ζm(5.3d)

5.1.4. Grid inputs.

hj = grid spacing for each exercise(5.4a)

mx = number of grid points is 2mx + 1(5.4b)

5.2. Outputs. The vectors

(5.5) Pj(xk) = payoff of exercising at τ j for k = 0, 1, ..., 2mx

for j = 1, 2, ..,m.

5.3. Procedure. Creating the payoff vectors is often done in two steps. The first is a set-up routinethat does everything except calculate the final payoff vectors Pj(xk). This routine does as much of the pre-calculation as possible. The payoff routine is then called for each j. This routine calculates the payoff vectorfrom the stored intermediates. Lastly, the wind-up routine is called to free all the space.

Step 1. Define

(5.6) tstj = tifirstj −1 = the start date upon exercise for j = 1, ...,m

and interpolate to obtain the needed model parameters

(5.7a) ζj = ζ(τ j)

(5.7b) Hi = H(ti)

(5.7c) ζi, = ζ(tfixi, )

(5.7d) Hsti, = H(tsti, ), Hend

i, = H(tendi, )

Step 2. Determine the vol adjustment. For each i, determine

(5.8a) θ1,2i, = Φ2

1 +Φ2

vuuuut1− 2 Hendi, −Hst

i,

log1 + αi, R

1,2i

1 + αi, R0i,

,

12

Page 13: Procedure for Pricing Bermudans and Callable Swaps

with

(5.8b) Φ =

log1 + αi, R

1,2i

1 + αi, R0i,Hendi, −Hst

i,

σ1,2i,

qtfixi, − tnow

logR1,2iR0i,

+ 12

hσ1,2i,

i2(tfixi, − tnow)

.

Step 3. Determine the gross up Λi for each couponStep 3a. Determine the today’s unadjusted value of each coupon

V unadji = Di

(mi +

Mi

nfix

nfixX=1

£1−N (d1i, (0, 0))−N (−d2i, (0, 0))

¤)where

(5.9a) d1,2i, (0, 0) =X1,2i, +Hi

hθ1,2i,

i2θ1,2i,

and

(5.9b) X1,2i, =

log1 + αi. R

1,2i

1 + αi. R0i,Hendi, −Hst

i,

− 12

£Hendi, +Hst

i,

¤ hθ1,2i,

i2.

Step 3b. Determine the adjument factor

(5.10) Λi =V mkti

V unadji

for i = 1, 2, ..., n

Note: this is a little different then in the other notes.Step 4. For each j and k, determine

Pj(xk) =nX

i=ifirstj

Z(x; ti)

(Λimi − cfuni +

ΛiMi

nfix

nfixX=1

£1−N (d1i, (t, xk))−N (−d2i, (t, xk))

¤)(5.11a)

+Z(xk; tn)− (1 + fj)Z(xk; tstj )

where

Z(x; ti) = Die−Hix− 1

2H2i ζj(5.11b)

d1,2i, (t, x) =X1,2i, − x+Hi

hθ1,2i,

i2 £1− ζj/ζi,

¤θ1,2i,

q1− ζj/ζi,

,(5.11c)

and

(5.11d) X1,2i, =

log1 + αi. R

1,2i

1 + αi. R0i,Hendi, −Hst

i,

− 12

£Hendi, +Hst

i,

¤ hθ1,2i,

i2.

13

Page 14: Procedure for Pricing Bermudans and Callable Swaps

Step 5. If the deal is a payer, multiply payoff by −1:

(5.12) Pj(xk) −→ −Pj(xk)

5.4. External routines used. Standard normal distribution

6. Evaluating the Bermudan.

6.1. Inputs. Integration variables:my, hy : defines the y grid points through

(6.1) yi = hy(i−my) for i = 0, 1, ..., 2my

mx : the number of x points on the grid is 2mx + 1J : number of exercisesh0, h1, ..., hJ−1 : For each j = 0, 1, ..., J − 1, the discretization of x at τ j is

(6.2) xk = hj(k −mx) for k = 0, 1, ..., 2mx

Model variables:ζ0, ζ1, ...ζJ−1 : For each j = 0, 1, ..., J − 1, ζj is the variance of x at τ j .

Deal variables:For each j = 0, 1, ..., J − 1 :

Pjk = Pj(τ j , xk) for k = 0, 1, ..., 2mx : the vector of payoff values at τ j if exercised at τ jNote: it is usualyl sounder engineering to pass the name of a payoff routine and a pointer to a structure

containing whatever data’s needed by the routine. This routine, given the input j, hj ,mx and the pointer tothe data structure then returns the payoff vector Pjk. Even if for some complicated deal types, this routinejust returns rows of the 2d array of payoffs Pjk, for other deal types the payoff vectors can be calculatedon-the-fly very efficiently.

6.2. Outputs. Today’s value V of the Bermudan, and the vector V eur0 , V eur

1 , ..., V eurJ−1. Here V

eurj is

the value of the jth European option on the accrual swap.

6.3. Procedure. Step 1. Call the routine for generating the integration weights w0, w1, ..., w2my andpartial sums S0, S1, ..., S2my

. This requires only hy and my as inputs. (See routine description below).Step 2. Intialize the V + vector

(6.3) V +k = 0 for k = 0, 1, ..., 2mx

For j = J − 1, J − 2, ..., 1, 0:Step 3. Call the routine to generate the payoff vector Pjk = Pj(τ j , xk)

(6.4) Pjk = Pj(τ j , xk), where xk = hj(k −mx) for k = 0, 1, ..., 2mx

Step 4: Calculate the value of the jth European option. As input, this requires the grid variableshj ,mx, the payoff vector Pjk, the variance ζj at τ j ,the y grid variablea hy,my, and the weight vector wi.(See routine description below).

Step 5: Take the maximum of the payoff Pjk with V +k :

(6.5a) Vk = max©Pjk, V

+k

ªfor k = 0, 1, ..., 2mx,

14

Page 15: Procedure for Pricing Bermudans and Callable Swaps

and store the index K of the interval where Pjk and V +k cross,

(6.5b)¡Pj,K − V +

K

¢ ¡Pj,K+1 − V +

K+1

¢ ≤ 0.If there is more than one crossing (which there won’t be for this deal type) choose the crossing with Knearest the midpoint k = mx. Store the max’s and min’s from the crossing:

(6.5c) mK = min©Pj,K , V

+K

ª, mK+1 = min

©Pj,K+1, V

+K+1

ª(6.5d) MK = max

©Pj,K , V

+K

ª, MK+1 = max

©Pj,K+1, V

+K+1

ªNote: Trhoughout step 6 below, we should set ζ−1 = 0 so that

pζj − ζj−1 =

pζ0 at j = 0.

Step 6: For each k,6a. Find ifirst(k), largest integer with

(6.6) ifirst(k) ≤ my − mxhj − (k −mx)hj−1hypζj − ζj−1

.

6b. Find ilast(k), the smallest integer with

(6.7) ilast(k) ≤ my +mxhj − (k −mx)hj−1

hypζj − ζj−1

.

6c. Calculate the sum

(6.8a) V +k = Sifirst(k)V0 +

ilast(k)+1Xi=ifirst(k)+1

wiVk(i) + Silast(k)V2mx

where

(6.8b) k(i) =hj−1 (k −mx) + hy(i−my)

pζj − ζj−1

hj+mx,

and where piecewise linear interpolation is used to evaluate Vk(i) :

(6.8c) Vk(i) = [k0(i) + 1− k(i)]Vk0(i) + [k(i)− k0(i)]Vk0(i)+1 if k0(i) ≤ k(i) < k0(i) + 1.

Of course, the terms Sifirst(k)V0 should be omitted if ifirst(k) < 0, and Silast(k)V2mx should be omitted ifilast(k) > 2mx.

6d. Correct the kink by adding

(6.9a) V +k = V +

k +hjEavgpζj − ζj−1

G

Ãhj(K + 1

2 −mx)− hj−1(k −mx)pζj − ζj−1

!

if hj ≤pζj − ζj−1, and

V +k = V +

k(6.9b)

+EavgNÃhj(K + 1−mx)− hj−1(k −mx)p

ζj − ζj−1

!−EavgN

Ãhj(K −mx)− hj−1(k −mx)p

ζj − ζj−1

!15

Page 16: Procedure for Pricing Bermudans and Callable Swaps

if hj >pζj − ζj−1. Here,

(6.9c) Eavg = −12(MK −mK) (MK+1 −MK)

MK+1 −mK+1 +MK −mK.

Step 7. Return V +k at k = mx, today’s value of the Bermudan option on a range note.

6.4. External routines needed. Routine for generating the integration weights and partial sums (detailed below)

Routine for calculating the payoff vector at each j (detailed above)Routine for calculating the European option values (detailed immediately below)Standard cumulative normal distributionGaussian density

7. Routine for evaluating the European options. Classically, this routine is part of the evaluatingthe Bermudan routine

7.1. Inputs. grid variables: hx,mx defined by

(7.1a) xk = hx(k −mx) for k = 0, 1, ..., 2mx

the payoff vector

(7.1b) Pj(τ j , xk) = payoff vector for exercising at the jth exercise date

ζj , the variance at τ jthe y definition variable hy,my defined by

(7.1c) yi = hy(i−my)

the weight vector

(7.1d) w0, w1, ..., w2my

7.2. Output. The today’s value V eurj of the jth European option

7.3. Procedure. Take the maximum of the payoff with 0 :

(7.2a) Ik = max {Pj(τ j , xk), 0} for k = 0, 1, ..., 2mx,

and remember the interval xK , xK+1 where Pj(τ j , xk) becomes negative,

(7.2b) Pj(τ j , xK)Pj(τ j , xK+1) ≤ 0.

If there is more than one crossing (which there won’t be for this deal type) choose the crossing with Knearest the midpoint mx. Remember the max’s and min’s from the crossing:

(7.2c) mK = min {Pj(τ j , xK), 0} , mK+1 = min {Pj(τ j , xK+1), 0}

(7.2d) MK = max {Pj(τ j , xK), 0} , MK+1 = max {Pj(τ j , xK+1), 0}16

Page 17: Procedure for Pricing Bermudans and Callable Swaps

Compute the sum

(7.3a) V eurj =

2myXi=0

wiIk(i)

where for each i, Ik(i) is the linearly interpolated value

(7.3b) Ik(i) =

I0 if k(i) ≤ 0[k0(i) + 1− k(i)] Ik0(i) + [k(i)− k0(i)] Ik0(i)+1) if 0 < k(i) < 2mx,I2mx

if k(i) ≥ 2mx

at

(7.3c) k(i) =hy(i−my)

hx

qζj +mx.

Here k0(i) is the largest integer smaller the k(i) :

(7.3d) k0(i) ≤ k(i) < k0(i) + 1

After computing the sum, we should make the kink correction

(7.4a) V eurj = V eur

j +hxEavgp

ζjG

Ãhx(K + 1

2 −mx)pζj

!

iff hx ≤pζj , and

V eurj = V eur

j +EavgNÃhx(K + 1−mx)p

ζj

!−EavgN

Ãhx(K −mx)p

ζj

!

if hj >pζj . Here,

(7.4b) Eavg = −12(MK −mK) (MK+1 −MK)

MK+1 −mK+1 +MK −mK.

7.4. External routines required. Standard cumulative normal distribution

Gaussian density

8. Routine to create integration weights.

8.1. Inputs. There are only two inputs required: h and m. These define the grid of points

(8.1) yi = h(i−m) for i = 0, 1, ..., 2m

8.2. Outputs. The weight vector w0, w1, ..., w2m and the vector of partial sums, S0, S1, ..., S2m.

17

Page 18: Procedure for Pricing Bermudans and Callable Swaps

8.3. Procedure. Calculate

(8.2a) w0 =³1 +

y0h

´N (y0 + h)− y0

hN (y0) + 1

h{G(y0 + hy)−G(y0)} .

wi =³1 +

yih

´N (yi + h)− 2yi

hN (yi) +

³1− yi

h

´N (yi − h)(8.2b)

+1

hy{G(yi + h)− 2G(yi) +G(yi − h)}

for i = 1, 2, ...,m. Then use symmetry to get the other valuts

(8.2c) wi+m = wm−i for i = 1, 2, ...,m

Calculates the moments of the weights,

(8.3a) M0 =

2myXi=0

wi, M2 =

2myXi=0

y4iwi, M2 =

2myXi=0

y4iwi,

and define

(8.3b) A =M4 −M2

M0M4 −M22

, B = − M2 −M0

M0M4 −M22

.

Then set re-define the weights by,

(8.3c) wnewi = (A+By2i )wi

Finally calculate the partial sums

(8.4) Si =iX

k=0

wk.

8.4. External routines required. N(x) standard cumulative normal distribution at x

G(x) standard gaussian density 1√2πe−x

2/2

18