Computational Finance Zvi Wiener 02-588-3049 http://pluto.mscc.huji.ac.il/~mswiener/zvi.html CF-5 Bank Hapoalim Jul-2001 Bonds and Interest Rates Following T. Bjork, ch. 15 Arbitrage Theory in Continuous Time CF-5 Bank Hapoalim Jul-2001

Bonds and Interest Rates Zero coupon bond = pure discount bond T-bond, denote its price at time t by p(t,T). principal = face value, coupon bond - equidistant payments as a % of the face value, fixed or floating coupons. Zvi Wiener CF5 slide 3 Assumptions There exists a frictionless market for Tbonds for every T > 0 p(t, t) =1 for every t for every t the price p(t, T) is differentiable with respect to T.

Zvi Wiener CF5 slide 4 Interest Rates Let t < S < T, what is IR for [S, T]? at time t sell one S-bond, get p(t, S) buy p(t, S)/p(t,T) units of T-bond cashflow at t is 0 cashflow at S is -$1 cashflow at T is p(t, S)/p(t,T) the forward rate can be calculated ... Zvi Wiener CF5

slide 5 The simple forward rate LIBOR - L is the solution of: p (t , S ) 1 (T S ) L p (t , T ) The continuously compounded forward rate R is the solution of: e Zvi Wiener R (T S ) p (t , S ) p (t , T )

CF5 slide 6 Definition 15.2 The simple forward rate for [S,T] contracted at t (LIBOR forward rate) is p (t , T ) p (t , S ) L(t ; S , T ) (T S ) p (t , T ) The simple spot rate for [S,T] LIBOR spot rate is (t=S): p( S , T ) 1 L( S , T ) (T S ) p ( S , T ) Zvi Wiener

CF5 slide 7 Definition 15.2 The continuously compounded forward rate for [S,T] contracted at t is log p(t , T ) log p(t , S ) R(t ; S , T ) T S The continuously compounded spot rate for [S,T] is (t=S) log p( S , T ) R ( S , T ) T S Zvi Wiener

CF5 slide 8 Definition 15.2 The instantaneous forward rate with maturity T contracted at t is log p (t , T ) f (t , T ) T The instantaneous short rate at time t is r (t ) f (t , t ) Zvi Wiener CF5 slide 9

Definition 15.3 The money market account process is t Bt exp r ( s )ds 0 Note that here t means some time moment in the future. This means dB(t ) r (t ) B(t )dt B(0) 1 Zvi Wiener CF5

slide 10 Lemma 15.4 For t s T we have p (t , T ) p (t , s ) exp T f ( t , u

) du s And in particular p (t , T ) exp Zvi Wiener T f

( t , u ) du t CF5 slide 11 Models of Bond Market Specify the dynamic of short rate Specify the dynamic of bond prices Specify the dynamic of forward rates

Zvi Wiener CF5 slide 12 Important Relations Short rate dynamics dr(t)= a(t)dt + b(t)dW(t) (15.1) Bond Price dynamics (15.2) dp(t,T)=p(t,T)m(t,T)dt+p(t,T)v(t,T)dW(t) Forward rate dynamics df(t,T)= (t,T)dt + (t,T)dW(t) W is vector valued

Zvi Wiener CF5 (15.3) slide 13 Proposition 15.5 We do NOT assume that there is no arbitrage! If p(t,T) satisfies (15.2), then for the forward rate dynamics (t , T ) vT (t , T )v(t , T ) mT (t , T ) (t , T ) vT (t , T ) Zvi Wiener

CF5 slide 14 Proposition 15.5 We do NOT assume that there is no arbitrage! If f(t,T) satisfies (15.3), then the short rate dynamics a(t ) fT (t , t ) (t , t ) b(t ) (t , t ) Zvi Wiener CF5 slide 15

Proposition 15.5 If f(t,T) satisfies (15.3), then the bond price dynamics 1 2 dp(t , T ) p(t , T ) r (t ) A(t , T ) S (t , T ) dt 2 p(t , T ) S (t , T )dW (t ) T Zvi Wiener A(t , T ) (t , s )ds t

T S (t , T ) (t , s )ds t CF5 slide 16 Proof of Proposition 15.5 Left as an exercise Zvi Wiener CF5 slide 17

Fixed Coupon Bonds n p (t ) K p (t , Tn ) ci p (t , Ti ) i 1 Ti T0 i ci ri Ti Ti 1 K n p (t ) K p (t , Tn ) r p (t , Ti ) i 1 Zvi Wiener

CF5 slide 18 Floating Rate Bonds ci Ti Ti 1 L(Ti 1 , Ti ) K L(Ti-1,Ti) is known at Ti-1 but the coupon is delivered at time Ti. Assume that K =1 and payment dates are equally spaced. Now it is t

Floating Rate Bonds ci Ti Ti 1 L(Ti 1 , Ti ) K p (t , Ti ) p (t , Ti 1 ) L(t , Ti 1 , Ti ) (Ti Ti 1 ) p (t , Ti ) implies ci Zvi Wiener 1 p(Ti 1 , Ti ) CF5 1 slide 20 ci

1 p (Ti 1 , Ti ) 1 This coupon will be paid at Ti. The value of -1 at time t is -p(t, Ti). The value of the first term is p(t, Ti-1). Thus the present value of each coupon is PV ci p (t , Ti 1 ) p(t , Ti ) The present value of the principal is p(t,T n). Zvi Wiener CF5 slide 21

The value of a floater is n p (t ) p(t , Tn ) p(t , Ti 1 ) p(t , Ti ) i 1 Or after a simplification p (t ) p (t , T0 ) Zvi Wiener CF5 slide 22 Forward Swap Settled in Arrears K - principal, R - swap rate, rates are set at dates T0, T1, Tn-1 and paid at

dates T1, Tn. T0 Zvi Wiener T1 Tn-1 CF5 Tn slide 23 Forward Swap Settled in Arrears If you swap a fixed rate for a floating rate (LIBOR), then at time Ti, you will receive

KL(Ti 1 , Ti ) Kci where ci is a coupon of a floater. And at Ti you will pay the amount K R Net cashflow Zvi Wiener K L(Ti 1 , Ti ) R CF5 slide 24 Forward Swap Settled in Arrears At t < T0 the value of this payment is Kp(t , Ti 1 ) K (1 R) p(t , Ti ) The total value of the swap at time t is then n

(t ) K p (t , Ti 1 ) (1 R) p(t , Ti ) i 1 Zvi Wiener CF5 slide 25 Proposition 15.7 At time t=0, the swap rate is given by R p (0, T0 ) p (0, Tn ) n p(0, Ti )

i 1 Zvi Wiener CF5 slide 26 Zero Coupon Yield The continuously compounded zero coupon yield y(t,T) is given by log p (t , T ) y (t , T ) Tt p (t , T ) e (T t ) y ( t ,T )

For a fixed t the function y(t,T) is called the zero coupon yield curve. Zvi Wiener CF5 slide 27 The Yield to Maturity The yield to maturity of a fixed coupon bond y is given by n p (t ) ci e (Ti t ) y i 1

Zvi Wiener CF5 slide 28 Macaulay Duration Definition of duration, assuming t=0. n T c e i i D Zvi Wiener Ti y

i 1 p CF5 slide 29 Macaulay Duration T T 1 CFt D t wt t

t Bond Pr ice t 1 (1 y ) t 1 A weighted sum of times to maturities of each coupon. What is the duration of a zero coupon bond? Zvi Wiener CF5 slide 30 Meaning of Duration n dp d Ti y ci e Dp dy dy i 1

$ r Zvi Wiener CF5 slide 31 Proposition 15.12 TS of IR With a term structure of IR (note y i), the duration can be expressed as: n T c e i i D

Ti yi i 1 p n d Ti ( yi s ) ci e Dp ds i 1 s 0 Zvi Wiener CF5

slide 32 Convexity 2 p C 2 y $ r Zvi Wiener CF5 slide 33 FRA Forward Rate Agreement A contract entered at t=0, where the parties (a

lender and a borrower) agree to let a certain interest rate R*, act on a prespecified principal, K, over some future time period [S,T]. Assuming continuous compounding we have at time S: -K at time T: KeR*(T-S) Calculate the FRA rate R* which makes PV=0 hint: it is equal to forward rate Zvi Wiener CF5 slide 34 Exercise 15.7 Consider a consol bond, i.e. a bond which will forever pay one unit of cash at t=1,2, Suppose that the market yield is y - flat.

Calculate the price of consol. Find its duration. Find an analytical formula for duration. Compute the convexity of the consol. Zvi Wiener CF5 slide 35 Change of Numeraire Following T. Bjork, ch. 19 Arbitrage Theory in Continuous Time CF-5 Bank Hapoalim Jul-2001

Change of Numeraire P - the objective probability measure, Q - the risk-neutral martingale measure, We will introduce a new class of measures such that Q is a member of this class. Zvi Wiener CF5 slide 37 Intuitive explanation T r ( s ) ds Q

0 (0; X ) E Xe Assuming that X and r are independent under Q, we get Q X (0; X ) p (0, T ) E In all realistic cases that X and r are not independent under Q. However there exists a measure T (forward neutral) such that (0; X ) p (0, T ) E Zvi Wiener

CF5 T X slide 38 Risk Neutral Measure Is such a measure Q that for every choice of price process (t) of a traded asset the following quotient is a Q-martingale. (t ) B(t ) Note that we have divided the asset price (t) by a numeraire B(t). Zvi Wiener CF5

slide 39 Conjecture 19.1.1 For a given financial market and any asset price process S0(t) there exists a probability measure Q0 such that for any other asset (t)/ S0(t) is a Q0-martingale. For example one can take p(t,T) (fixed T) as S0(t) then there exists a probability measure QT such that for any other asset (t)/p(t,T) is a QT-martingale. Zvi Wiener CF5 slide 40 Using p(T,T)=1 we get

(0) T (T ) T E E (T ) p(0, T ) p(T , T ) Using a derivative asset as (t,X) we get (0, X ) T E X p(0, T ) Zvi Wiener CF5

slide 41 Assumption 19.2.1 Denote an observable k+1 dimensional process X=(X1, , Xk, Xk+1) where Xk+1(t)=r(t) (short term IR) Denote by Q a fixed martingale measure under which the dynamics is: dXi(t)=i(t,X(t))dt + i(t,X(t))dW(t), i=1,,k+1 A risk free asset (money market account): dB(t)=r(t)B(t)dt Zvi Wiener CF5 slide 42 Proposition 19.1 The price process for a given simple claim

Y=(X(T)) is given by (t,Y)=F(t,X(t)), where F is defined by T r ( s ) ds Q F (t , x) Et , x Ye t Zvi Wiener CF5 slide 43 Practical Numeraire Approach

Zvi Wiener 02-588-3049 http://pluto.mscc.huji.ac.il/~mswiener/zvi.html CF-5 Bank Hapoalim Jul-2001 Options with uncertain strike Stock option with strike fixed in foreign currency. How it can be priced? Margarbe 78 or Numeraire approach 1. Price it using this currency as a numeraire. foreign interest rate foreign current price foreign volatility! 2. Translate the resulting price into SHEKELS using the current exchange rate.

Zvi Wiener CF5 slide 45 Options with uncertain strike Endowment warrants strike is increasing with short term IR. strike is decreasing when a dividend is paid What is an appropriate numeraire? A closed Money Market account. Result price by standard BS but with 0 dividends and 0 IR. Zvi Wiener CF5

slide 46 Options with uncertain strike An option to choose by some date between dollar and CPI indexing (may be with some interest). Margrabe can be used or one can price a simple CPI option in terms of an American investor and then translate it to SHEKELS. Zvi Wiener CF5 slide 47 Convertible Bonds A convertible bond typically includes an option to convert it into some amount of ordinary shares.

This can be seen as a package of a regular bond and an option to exchange this regular bond to shares of the company. If the company does not have traded debt there is a problem of pricing this option. Zvi Wiener CF5 slide 48 Convertible Bonds This is an option to exchange one asset to another and can be priced with Margrabe approach. However in order to use this approach one need to know the correlation between the two assets (stock and regular bond). When there is no market for regular bonds

this might be a problem. Zvi Wiener CF5 slide 49 Convertible Bonds An alternative approach is with a numeraire. Denote by St stock price at time t, Bt price at time t of a regular bond (may be not observable). CBt price of a convertible bond. C - value of the conversion option, so that CB = C(B) + B at any time Zvi Wiener CF5

slide 50 Convertible Bonds Note that C is a decreasing function of B (the higher the strike price, the lower is the options value). This means that as soon as CBt < St = C(B=0) the right hand side of the following equation (B - an unknown) CBt = C(Bt) + Bt has a unique solution. Zvi Wiener CF5 slide 51 Convertible Bonds

The left hand side is a known constant, the right hand side is a sum of two variables. The first one is decreasing in B, but its derivative is strictly less than one and approaches zero for large B. The second one is linear with slope one. This means that as soon as CB>C(B=0)+0=S there exists a unique solution. Zvi Wiener CF5 slide 52 Uniqueness of a solution CB S B

Zvi Wiener CF5 slide 53 Pricing with known volatility Lets use Bt as a numeraire, then the stochastic variable is St/Bt. Assume that St/Bt has a constant volatility . Then this option has a fixed strike (in terms of B) and is equivalent to a standard option, which can be priced with BS equation. Call(St/Bt, T, 1, , r) (in terms of Bt), the dollar value is then BtCall(St/Bt, T, 1, , r). Zvi Wiener CF5

slide 54 Pricing with known volatility This means that when is known the option can be priced easily and consequently the straight bond. However that we need can not be observed. The solution is in the following procedure. Zvi Wiener CF5 slide 55 Pricing with known volatility Assume that is stable but unknown. For any value of we can easily price the option at any date, and hence we can also derive the value of B t.

Take a sequence of historical data (meaning S t and CBt). For any value of we can construct the implied Bt(). Then using these sequence of observations we can check whether the volatility of St/Bt is indeed . If our guess of was correct this is true. Zvi Wiener CF5 slide 56 Pricing with known volatility However there is no reason why some value of will give the same implied historical volatility. This means that we have to solve for such that the implied volatility is equal . Numerically this can be done easily. Why there exists a unique solution???

Check monotonicity!! Zvi Wiener CF5 slide 57 Solution for Implied volatitity 1 0.8 0.6 0.4 0.2 0.2

Zvi Wiener 0.4 0.6 CF5 0.8 1 slide 58 MMA implementation FindRoot[CB == B + bsCallFX[s, ttm, B, sg, 0, 0], {B,CB}] ConvertibleBondHistorical[StockHistory_, CBHistory_, ttm_] := Module[{sg, len, ff, BusinessDaysYear = 250, sgg, t1, t2},

len = Length[StockHistory]; ff[sg_] := Log[StockHistory/ MapThread[StraightBond[#1, #2, ttm, sg] &, {CBHistory, StockHistory}]]; FindRoot[sg == StandardDeviation[Rest[ff[sg]] - Drop[ff[sg], -1]]* Sqrt[BusinessDaysYear], {sg, 0.001, 1}][[1, 2]] ]; Zvi Wiener CF5 slide 59 Example 1 CB 1.15 S

1.1 1.05 20 40 60 80 100 0.95 0.9 B Zvi Wiener

CF5 slide 60 Example 2 CB 0.9 S 0.85 20 40

60 80 100 0.75 B Zvi Wiener CF5 slide 61 Value of Value-at-Risk Zvi Wiener The Hebrew University of Jerusalem [email protected]

CF-5 Bank Hapoalim Jul-2001 VaR 1 day 1% probability 1w 1% probability 1d 1 week P&L Zvi Wiener CF5

slide 63 Model Banks choice of an optimal system Depends on the available capital Current and potential capital needs Queuing model as a base Zvi Wiener CF5 slide 64 Required Capital Let A be total assets C capital of a bank - percentage of qualified assets k capital required for traded assets

C A(1 )0.08 Ak Zvi Wiener CF5 slide 65 Maximal Risk (Assets) Amax C (1 )0.08 k The coefficient k varies among systems, but a better (more expensive) system provides more precise risk measurement, thus lower k.

Cost of a system is p, paid as a rent (pdt during dt). Amax is a function of C and p. Zvi Wiener CF5 slide 66 Risky Projects Deposits arrive and are withdrawn randomly. All deposits are of the same size. Invested according to banks policy. Can not be used if capital requirements are not satisfied. Zvi Wiener CF5

slide 67 Arrival of Risky Projects We assume that risky projects arrive randomly (as a Poisson process with density ). This means that there is a probability dt that during dt one new project arrives. Zvi Wiener CF5 slide 68 Arrival of Risky Projects A new project is undertaken if the bank has enough capital (according to the existing risk measuring system). We assume that one can NOT raise capital or

change systems quickly. Zvi Wiener CF5 slide 69 Termination of Risky Projects We assume that each risky project disappears randomly (as a Poisson process with density ). Zvi Wiener CF5 slide 70 Termination of Risky Projects

We assume that each risky project disappears randomly (as a Poisson process with density ). This means that there is a probability ndt that during dt one out of n existing projects terminates. With probability (1-ndt) all existing projects will be active after dt. Zvi Wiener CF5 slide 71 Profit We assume that each existing risky project gives a profit of dt during dt. Thus when there are n active projects the bank has instantaneous profit (n-p)dt.

Zvi Wiener CF5 slide 72 States After C and p are chosen, the maximal number of active projects is given by s=Amax(C,p). 2

s 0 1 2 s-1 s 0 1 2

s-1 s Zvi Wiener CF5 slide 73 States

2 s 0 1 2 s-1 s 0 1 2

s-1 s Stable distribution: 0 = 1 1 = 2 2 s-1 = s s Zvi Wiener n n n! n n ! n s i s i , where

i i ! i 0 i 0 i! CF5 slide 74 Probabilities n n

e (1 s ) n ! n s i (1 n)(1 s, ) i 0 i! Probability of losing a new project due to capital requirements is equal to the probability of being in state s, i. e. s. Termination of projects does not have to be Poissonian, only mean and variance matter. Zvi Wiener CF5

slide 75 Expected Profit s( s, ) E ( profit ) 1 s ( p ) p p p (1 s, ) An optimal p (risk measurement system) can be found by maximizing the expected profit stream. Zvi Wiener CF5 slide 76 Example k ( p) 0.015 (0.08 0.015)e

p q Capital requirement as a function of p (price) and q (scaling factor), varies between 1.5% and 8%. Zvi Wiener CF5 slide 77 Example k ( p) 0.015 (0.08 0.015)e Amax14.25

14 p q q=0.5 13.75 q=1 13.5 q=3 13.25 1

2 3 4 p 12.75 12.5 Zvi Wiener CF5 slide 78 Example of a bank Capital $200M

Average project is $20K On average 200 new projects arrive each day Average life of a project is 2 years 15% of assets are traded and q=1 spread =1.25% Zvi Wiener CF5 slide 79 Expected profit 33 32.5 32 31.5 31 30.5 1

2 3 4 5 6 rent p 29.5 Banks profit as a function of cost p. C=$200M, arrival rate 200/d, size $20K, average life 2 yr., spread 1.25%, q=1, 15% of assets are traded.

Zvi Wiener CF5 slide 80 Expected profit 25 24 23 22 21 1 2 3

4 5 6 rent p Banks profit as a function of cost p. C=$200M, arrival rate 200/d, size $20K, average life 2 yr., spread 1%, q=1, 5% of assets are traded. Zvi Wiener CF5 slide 81

Conclusion Expensive systems are appropriate for banks with low capitalization operating in an unstable environment Cheaper methods (like the standard approach) should be appropriate for banks with high capitalization small trading book operating in a stable environment many small uncorrelated, long living projects Zvi Wiener CF5 slide 82 A simple intuitive and flexible model of optimal choice of risk measuring method.

Zvi Wiener CF5 slide 83 DAC Zvi Wiener 02-588-3049 http://pluto.mscc.huji.ac.il/~mswiener/zvi.html CF-5 Bank Hapoalim Jul-2001 Life Insurance yearly contribution 10,000 NIS

yearly risk premium 2,000 NIS first year agents commission 3,000 NIS promised accumulation rate 8,000 NIS/yr After the first payment there is a problem of insufficient funds. 8,000 NIS are promised (with all profits) and only 5,000 NIS arrived. Zvi Wiener CF5 slide 85 10,000 NIS Risk 2,000 NIS Clients 8,000 NIS

Agent 3,000 NIS insufficient funds if the client leaves insufficient profits Zvi Wiener CF5 slide 86 Risk measurement The reason to enter this transaction is because of the expected future profits. Assume that the program is for 15 years and the probability of leaving such a program is . Fees are 0.6% of the portfolio value each year

15% real profit participation Zvi Wiener CF5 slide 87 Obligations The most important question is what are the obligations? The Ministry of Finance should decide Transparent to a client Accounted as a loan Zvi Wiener CF5

slide 88 One year example Assume that the program is for one year only and there is no possibility to stop payments before the end. Initial payment P0, fees lost L0, fixed fee a% of the final value P1, participation fee b% of real profits (we ignore real). Investment policy TA-25 (MAOF). Zvi Wiener CF5 slide 89 Liabilities (no actual loan) P0 (1 a) X1

P0 (1 a) b Call ( X 1 , X 0 ,1) X0 X0 Assets (no actual loan) X1 P0 L0 X0 Zvi Wiener CF5 slide 90 Total=Assets-Liabilities P0 (1 a )

X1 aP0 L0 b Call ( X 1 , X 0 ,1) X0 X0 Fair value Xt P0 (1 a) aP0 L0 b Call ( X t , X 0 ,1) X0 X0 Zvi Wiener CF5 slide 91

Liabilities (actual loan) P0 (1 a ) X1 Rt P0 (1 a) b Call ( X 1 , X 0 ,1) L0 e X0 X0 Assets (actual loan) X1 P0 X0 Zvi Wiener CF5

slide 92 Total=Assets-Liabilities (loan) Xt P0 (1 a ) Rt aP0 b Call ( X t , X 0 ,1) L0 e X0 X0 Zvi Wiener CF5 slide 93

2 years liabilities (no actual loan) 2 P0 (1 a ) X2 P0 (1 a ) b Call ( X 2 , X 0 ,2) X0 X0 2 2 years assets (no actual loan) X2 P0 L0 X0 In reality the situation is even better for the insurer, since profit participation fees once taken are never returned (path dependence).

Zvi Wiener CF5 slide 94 2 years fair value, no loan X2 P0 1 (1 a ) L0 X0 2

2 P0 (1 a ) b Call ( X 2 , X 0 ,2) X0 Zvi Wiener CF5 slide 95 2 years liabilities (with a loan) 2 P0 (1 a ) X2

2R P0 (1 a) b Call ( X 2 , X 0 ,2) L0 e X0 X0 2 2 years assets (with a loan) X2 P0 X0 Zvi Wiener CF5 slide 96

10 years, L0=7% With a loan No loan Profit 0.3 0.2 0.1 0.5 1 1.5 2.5

3 3.5 Stock index -0.1 Zvi Wiener 2 CF5 slide 97 Partial loan - portion q Xn P0 1 (1 a ) (1 q ) L0

X0 n n P0 (1 a ) nR b Call ( X n , X 0 , n) qLe X0 Theoretically q can be negative.

Zvi Wiener CF5 slide 98 Mixed portfolio When the investment portfolio is a mix one should analyze it in a similar manner. Important: an option on a portfolio is less valuable than a portfolio of options. Another risk factor - leaving rate should be accounted for by taking actuarial tables as leaving rate. Zvi Wiener CF5

slide 99 Conclusions It is a reasonable risk management policy not to take a loan against DAC. Up to some optimal point it creates a useful hedge to other assets (call options and shares) of the firm. Intuitively DAC is good when the stock market performs badly and profit participation is valueless. DAC performs bad when the market performs well. Zvi Wiener CF5 slide 100