Fixed Income Modeling Review 5

This topic is mainly about modeling of short rate \(r(t)\) which plays a central role in the theory and practice because zero coupon bonds can be priced as

\(P(t,T)=E_t[\exp(-\int^T_tr(s)ds)]\)

and so could discount factor.

Assume there is only one source of uncertainty represented by a Brownian motion \(W(t)\) under the risk-neutral measure \(Q\). We want the stochastic process to be markovian which is referred to as path independence and hence allows for the use of recombining lattice. We don't want to use non-recombining lattice cause the number of nodes growing exponentially w.r.t. the number of time steps and thus is not practical. There are several important things we need to think about when choosing a model:

-- Does the dynamics guarantee positive rates?
-- What distribution does the dynamics imply for the short rate?
-- Can the model be calibrated to fit today's structure of zero coupon bond prices, how easy, and does the calibration stable?
-- Are the zero bond prices computable by means of analytic formulas?
-- Are there analytic pricing formulas available for call/put bond option?
-- Is the model mean-reverting?
-- How do the volatility structures implied by the model look like?
-- How suited is the model for building recombining lattices?

If the parameters of a model are constant like \(dr=a(b-r(t))dt+\sigma dW\) (Vasicek) then it is called equilibrium model. It's simple but could not be calibrated to fit the current term structure of rates. If we make the parameter of the drift term time dependent then we can overcome this problem and make the model no-arbitrage.

Based on empirical observation, people find that interest rates (unlike stock prices) tend to be pulled back to some mean level. So we want our model to be mean reverting; we also want to have the analytical formulas for zero coupon bond, call/put bond options, etc., and hence we require the model be affine which means the drift term is linear to short rate and square of the volatility is also linear to short rate. Regarding the volatility, typically we have two kinds of model for volatility: normal and lognormal. It is very hard to say which one is better, normal assumption results in analytic tractability and lognormal assumption leads to positive rates. Also, normal dynamics suit low rate environments and for lognormal, the other way around.

Several important models:

Ho-Lee: \(dr=\theta(t)dt+\sigma dW\)
Hull-White: \(dr=a(\theta(t)-r)dt+\sigma dW\)
CIR model: \(dr=a(\theta(t)-r)dt+\sigma\sqrt{r}dW\)
BDT model: \(d\ln(r)=(\theta(t)+(\sigma'(t)/\sigma(t))\ln(r))dt+\sigma(t)dW(t)\)

Among these models, Hull-White has a positive probability to generate negative rates but we can cut that and it does not affect pricing very much. CIR model is the only model with full analytic tractability which also has positive rates. While doing calibration, \(\theta(t)\) term in CIR must be solved for numerically. Under lognormal assumption, the total volatility is proportional to the rate level and thus it grows/declines with the rates, which produces rate path distribution skewed upward. Theoretically, we could deduce such equation under lognormal model:

\(E_0[B(\Delta t)]=\infty\)

therefore we can make infinite money in an arbitrary small time from $1 initial investment, however in numerical implementations of a short rate model on a tree this problem does not appear as the number of states is finite.

In order to make our models better, we could add a deterministic shift:

\(r(t)=r_0(t)+\varphi(t)\)
\(dr_0(t)=a(\theta(t)-r_0)dt+\sigma\sqrt{r_0}dW(t)\).

This kind of extension could preserve the tractability but not the positiveness of rates. Shifted CIR model could perfectly fit the market price of zero coupon bond and according to this:

when rates are low: \(\sigma(t)(r(t)+\alpha)\approx\sigma(t)\alpha\)
when rates are high: \(\sigma(t)(r(t)+\alpha)\approx\sigma(t)r(t)\)

we know that shifted lognormal models capture the phenomenon that rates follow close-to-normal dynamics in low rate environments and close-to-lognormal one in high rate environments.

Fixed Income Modeling Review 4

After reviewing Ito lemma and SDE, it is time to have a look at the standard market model which are forward contracts, future contracts, options on bond, interest rate caps, floors, collars and swaptions.

Forward contracts and future contracts are similar but there are also some crucial differences: forward contracts are over the counter and future contracts are traded on exchanges; future contracts are settled daily which reduces the credit risks, and after daily settlement future contracts is worth zero.

Forward price and future price are prices make the contracts worth zero at the beginning or the time after each settlement. Usually they are different but if the interest rates are deterministic, or more generally, the underlying asset price process is independent of the rate process then thery are the same.

\(Fwrd(t)=\frac{S(t)}{P(t,T)}=\frac{E^B_t[D(t,T)S(T)]}{E^B_t[D(t,T)]}=E^B_t[S(T)]=Fut(t)\)

One more thing is that if the underlying asset price is positively correlated with the interest rates then the futures price will be higher than the forward price and this is why the rate implied from Eurodollar futures price is higher than the corresponding forward rate.

For options on futures we have Black's model which is completely consistent with the Black-Scholes formula for stock options. Black's model is so popular that the implied volatility from the option prices has become the way most popular options are quoted, and it has also become a popular pricing and quoting tool on fixed income markets thought it assumes deterministic interest rates.

There are two basic assumptions for Black's model:
(1) The value V(T) of the option is lognormally distributed with the standard deviation of \(\ln(V(T))\) equal to \(\sigma(T-t)^{1/2}\).
(2) The expected value of V(T) is F(t) under T-forward measure.

And so the Black's formula becomes

\(Call(t)=P(t,T)[F(t)\cdot N(d_1)-K\cdot N(d_2)]\)
\(Put(t)=P(t,T)[K\cdot N(-d_2)-F(t)\cdot N(-d_1)]\)

Bond option is an option to buy or sell a particular bond by a certain date for a particular price. In addition to trading in the OTC market, bond options are often embedded in bonds when they are issued like callable bonds or puttable bonds. By assuming the bond price S(T) at the maturity of the option T is lognormally distributed with standard deviation of \(\ln(S(T))\) equal to \(\sigma(T-t)^{1/2}\) we can apply the Black's model to compute the price of European call and put options.

Interest rate cap is an OTC floating rate contract which is a series of call options with the underlying being the market rate and the strikes equal to a fixed rate. Each of the call options is called a caplet. For floors and floorlets, they are similar, only with call options changed to put options.

Every caplet can also be seen as a bond option:

\(V_i(t_{i-1})=P(t_{i-1},t_i)L\tau(t_{i-1},t_i)\max[R(t_{i-1},t_i)-R_K),0]\)
\(=\max[L-L(1+\tau(t_{i-1},t_i)R_K)P(t_{i-1},t_i),0]\)

Thus under the assumptions of Black's model we have the pricing formulas for caplets and floorlets:

\(Caplet_i(t)=L\tau(t_{i-1},t_i)P(t,t_i)[F_t(t)\cdot N(d_1)-R_k\cdot N(d_2)]\) \(Floorlet_i(t)=L\tau(t_{i-1},t_i)P(t,t_i)[R_K\cdot N(-d_2)-F_i(t)\cdot N(-d_1)]\)

In the formulas above we use different volatilities for each caplet and there is another approach which is to use the same volatility for one maturity. Volatility in the first approach is called spot volatilities and in the latter one it is called flat volatilities. In real market we usually use flat volatility for quoting.

European swaption is another OTC contract. It gives its holder the right to enter into a swap contract at a certain time in the future called exercise time. We could take a fixed-for-float swap to examine the nature of the contract. Since at the start of the contract the value of the floating leg is equal to the notional principle of the swap, the swaption could be seen as an option on a fixed rate bond with the strike being equal to the bond priciple.

\(Payoff(T_{Exe})=\max[R_K-R_{swap}(T_{Exe},T_{Stl},T_{Mat}),0]\cdot A(t,T_{Stl},T_{Mat})\cdot L\)

We can easily calculate the swap rate by

\(R_{Swap}(t,T_{Stl},T_{Mat})=\frac{P(t,T_{Stl})-P(t,T_{Mat})}{A(t,T_{Stl},T_{Mat})}\)

then a pricing formula for the swaption is

\(ReceiverSwaption(t)=L\cdot A(t,T_{Stl},T_{Mat})[R_K\cdot N(-d_2)-R_{Swap}(t)\cdot N(-d_1)]\)

Sometimes we need adjustments to price options on bond and they are convexity adjustment and timing adjustment. If the bond price is given in terms of the yield, then we could not simply assume that the forward price F(t) is equal to expected bond value and this is when convexity adjustments take place. If payment date is delayed until a later time \(T^>T\), then in order to compute expectation of a variable at time T with respect to \(T^\) forward measure, we need timing adjustments.

HW 4, My solution

Box-Muller transform

蒙特卡罗方法在金融数学中有很重要的作用, 比如可以方便的处理与路径相关的金 融衍生品定价, 它的基本原理是生成随机数, 进而生成多个随机路径, 假设这些路 径具有相同的概率, 于是根据

\(V(0)=E[e^{-rT}V(T)]\)

就可以通过对所有的路径取平均而得到 V(0), 即衍生品的价格. 它的一个缺点是计 算出来的 V(0) 取决于生成的随机数, 因为每次的随机数必不相同(几乎是几乎处处), 所以 V(0) 也互不相同.

可见如何生成随机数是蒙特卡罗方法的关键, 并且蒙特卡罗方法一般都是通过计算 机编程实现(很难想象进行手算蒙特卡罗的应用), 于是如何找到快速有效低耗的生 成随机数的方法就相当重要. 通常的步骤是: 生成伪随机数 --> 生成一致分布的随 机数 --> 生成正态分布的随机数. 所谓伪随机数就是一列整数 \(I_n\in[0,RAND_MAX]\), 可以通过 \(u_n=I_n/RAND_MAX\) 转化为[0,1]一致分布 的随机数. 各个编程语言都提供了生成伪随机数的算法, 比如 Microsoft C++ 就 有一套令 RAND_MAX=32,767 的标准算法, 但这对于金融应用并不够, 比如要进行 一个360月的债券的定价, 在第91个路径之后随机数便开始重复了. Numerical Recipes in C 这本书里据说讨论了一些非常好的随机数生成算法, 但是我还没看.

当获得了一致分布的随机数之后, 要将它们转化成正态分布 N(0,1), 这里有几个 方法:

(1) 最基本的是生成 \(u_i\sim U(0,1),i=1,2,...,12\), 然后令 \(\epsilon=\sum^{12}_{i=1}u_i-6\). 这种方法简单而且快, 但缺点是不够准确.

(2) 一种非常常用的方法叫 Box-Muller 方法. 它的原理是假设有两个独立同分布 的 \(U_1,U_2\sim U(0,1)\), 那么根据 Inverse transform sampling 定 理, \(R^2=-2\ln U_1\) 是指数分布, 同时也是 \(\mathcal{X}^2\) 分布, 这也就是说它是一 个二维正态分布的范数的平方, 然后再通过极坐标投影,

\(Z_0=R\cos(\theta), Z_1=R\sin(\theta)\)

是两个独立标准正态分布, 其中 \(\theta=2\pi U_2\). 这种方法还能进行转化, 令 \(u=R\cos\theta,v=R\sin\theta\), 那么

\(Z_0=\sqrt{-2\ln U_1}\cos(2\pi U_2)=u\cdot\sqrt{\frac{-2\ln s}{s}}\)

\(Z_1=\sqrt{-2\ln U_1}\sin(2\pi U_2)=v\cdot\sqrt{\frac{-2\ln s}{s}}\)

这种转化的好处是避免了在计算机中进行正弦, 余弦函数的运算. 最后是一段简单 的在 C++ 中通过 Box-Muller 方法生成正态分布随机数的代码

double GetOneGaussianByBoxMuller()
{
double result;
double x;
double y;
double sizeSquared;
do
{
x = 2.0*rand()/static_cast(RAND_MAX)-1;
y = 2.0*rand()/static_cast(RAND_MAX)-1;
sizeSquared = x*x + y*y;
}
while
( sizeSquared >= 1.0);
result = x*sqrt(-2*log(sizeSquared)/sizeSquared);
return result;
}

Fixed Income Modeling Review 3

During the whole semester, topic 3 was probably the easiest. Because I have known the material of Ito integral and stochastic differential equation(SDE) in advance of the lecture. But it was still good as a complement to my knowledge.

Everyone should know what probability space, filtration, stochastic processes, adapted processes, martingale and Brownian motion are, cause these concepts are the very basics of mathematical finance. One should also know that Ito integrals are martingales and if the integrand is non-random then Ito integral and Stratonovich integral are the same thing, which means that the product rule for Riemann integral applies to Ito integral as well. Why do we choose Ito integral instead of Stratonovich integral given that Stratonovich integral preserves the product rule? The reason is when we construct Ito integral, we choose the left end points for the integrand so we don't look into the future, and this is essential to financial application.

One of the most important theory we need to use is Ito's lemma. It basically expands the concept of derivative we already know in calculus. We know the Taylor expansion:

\(df(x)=f'(x)dx\)

and now for Ito integral we have

\(dg(t,W(t))=g_tdt+g_xdW(t)+\frac{1}{2}g_{xx}dt\)

so essentially we are using the fact that \(dW(t)dW(t)=dt\).

In order to compare different securities and remove the price appreciation due to the time value of money effect, we introduce the concept of numeraire and prices divided by numeraire are called dicounted prices. For any numeraire there exists a corresponding martingale measure which is equivalent to the probability measure that discounted prices are martingales under such measure. Actually this is not precisely correct cause martingale measure does not always exist, so this sentence I am saying is more with respect to change of numeraire. That is if you change the numeraire then the martingale measure changes and vice versa.

The first fundamental theory of asset pricing says if there exists a martingale measure then there is no arbitrage in the market. The converse is not true and you need to add another condition called no free lunch with vanishing risk to ensure that martingale measure exists given there isn't any arbitrage opportunity. One thing new I learnt from this lecture is that if martingale measure exists for one numeraire then for another numeraire we could also find martingale measure. The most commonly used numeraire are banking account and zero coupon bond.

Change of measure is another important technique with respect to mathematical finance. You first need to know what is Radon-Nikodym derivative from real analysis. Then you should know the Girsanov's Theorem:

If W is a Brownian motion under P, then for

\(dP^*=\rho dP\), \(\rho=\exp{-\int^t_0\theta(s)dW(s)-\frac{1}{2}\int^t_0\theta^2(s)ds}\)

\(dW^(t)=dW(t)+\theta(t)dt\) is a Brownian motion under \(P^\).

Martingale measure according to banking account is called risk neutral measure which is named after the fact that the market price of risk is zero in this case. Under risk neutral measure, all the prices discounted by momey market account are martingales and in case of random interest rate model we often change the numeraire to forward measure because of simplicity of calculation(this is not the only reason!). Forward measure is the EMM with respect to zero coupon bond and one of the professors said to us that if someone knows what forward measure is then he/she could skip the course of Mathematical Finance I. Notably, forward price is a martingale under forward measure.

In fixed income modeling, one rule I didn't know is that conditional expectation of short rate is equal to the forward rate: \(E^T_t[r(T)]=f(t,T)\).

HW 3, My Solution

Fixed Income Modeling Review 2

This review will concentrate on bond mathematics and yield curves. I have come up with typical assumptions in fixed income modeling last time now we first need to examine more detailed assmptions on zero-coupon bonds, which illustrate the differences between theoretical formulas and market reality.

-- Most of the bonds pay regular coupons
-- Available bond maturities do not span the whole time axis
-- Different bonds trade at different spreads to benchmark securities because of different credit quality and liquidity level
-- Most corporate bonds are callable

After addressing the theoretical assumptions, we now turn to a very important concept in fixed-income: yield. Bond yield or yield to maturity can be defined as a constant discount rate through the whole life of a coupon bond. So we can see that the bond price is decreasing with respect to the yield. Furthermore, the bond price equals the principle if and only if yield equals the coupon rate. For short term bonds paying no coupon we define the discount yield which is a simply compounded rate. For government bonds we often have another quoting method called Bond Equivalent Yield (BEY) which is defined as a discounted rate semi-annually.

In my opinion, fixed-income market is a market of interest rate derivatives, so we definitely need to examine one derivative's interest rate risk. PVBP is one indicator to show a security's sensitivity to the change of interest rate. It is defined as

\(P=100[\sum^N_{i=1}\frac{c/2}{(1+y/2)^i}+\frac{1}{(1+y/2)^N}]\)
\(P^+=100[\sum^N_{i=1}\frac{c/2}{(1+(y+0.0001)/2)^i}+\frac{1}{(1+(y+0.0001)/2)^N}]\)
\(PVBP=P-P^+\).

PVBP can also be approximately computed by \(PVBP=-\frac{\partial P}{\partial y}0.0001\).

Duration is a similar measure to PVBP but rather in a relative way: \(D=-\frac{\partial P}{\partial y}\frac{1+y/k}{P}\).

When \(k\rightarrow\infty\), we have \(D=-\frac{\partial P}{\partial y}\frac{1}{P}\) which is also defined as modified duration. One important property of duration is that duration can be expressed as a weighted average of cash flow times.

\(D=-\frac{\partial P}{\partial y}\frac{1+y/k}{P}=\sum^N_{i=1}\frac{1}{P}\frac{CF(t_i)t_i}{(1+y/k)^{kt_i}}=w_i\cdot t_i\).

PVBP and duration measure the first order sensitivity to the change of rate while convexity measures the second order sensitivity.

\(Cx=\frac{1}{2}\frac{\partial^2P}{\partial y^2}\frac{1}{P}\)

Hence we can hedge against small parallel shifts in yield curve by making portfolio's PVBP zero and hedge against large parallel shifts by making convexity zero.

We have seen the importance of zero coupon bond curve. We can and we have to use them to calculate the present value of a cash flow. In practical world, we often use a way called bootstraping-interpolation to strip the zero-coupon bond price out of market data. Basically, it is to solve linear equations of cash flows to get the zero bond price at every node. By using this way, we could not only calculate zero bond price but also continuous forward rate, continuous spot rate and discretely compounded yields.

The last thing for this review is how to interpolate zero coupon bonds. From my point of view, the most popular way and its special cases can be called polynomial spline, which briefly speaking is to assume the zero bond price between two different time nodes could be expressed as polynomials.

HW 2, My Solution

第 2 页,共 3 页123