Structural Models:
Considers default as being driven by the firm's assets.
Example: Merton
Note: Structural Models produce poor bond prices, but OK to use them to calculate PD.
Reduced-Form Models:
Proposes a relationship between bond price/yield and default risk. Default risk proxied by hazard rate. Then use market price to back out the hazard rate (hazard rate term structure fitting).
Example: Duffie and Singleton (1999)
Wednesday, June 1, 2011
Structural vs Reduced-Form Models (ABS)
Structural Models:
Treats prepayment as a (American) call option of the mortgage. Tries to solve for the optimal exercise strategy. Focuses on why loans terminate. Needs full information set for calibration (i.e., not just market prices). Computationally too expensive to be practical. Some primitive Structural Models do not allow for mortgages to exceed par.
Example: Dunn and McConnell (1981)
Reduced-Form Models:
Focuses on how (or, when) loans terminate. Needs only partial information set for calibration. Poor out-of-sample performance. Often are hazard models.
Example: Schwartz and Torous (1989)
Treats prepayment as a (American) call option of the mortgage. Tries to solve for the optimal exercise strategy. Focuses on why loans terminate. Needs full information set for calibration (i.e., not just market prices). Computationally too expensive to be practical. Some primitive Structural Models do not allow for mortgages to exceed par.
Example: Dunn and McConnell (1981)
Reduced-Form Models:
Focuses on how (or, when) loans terminate. Needs only partial information set for calibration. Poor out-of-sample performance. Often are hazard models.
Example: Schwartz and Torous (1989)
Thursday, May 26, 2011
Quant Interview Question
There are 2 pills A from bottle A and 2 pills B from bottle B. You have to take 1 pill A and 1 pill B every day, for two days, to survive. After taking 1 pill A from bottle A, you accidentally retrieved 2 pills B from bottle B. Now you have 3 indistinguishable pills in your hand (you do know that 1 out of the 3 is A and the rest are B). What's your survival strategy?
Ans:
Cut all 3 indistinguishable pills in halves (6 half-pills in total) and separate them into two piles. Make sure that each pile only contains a half from each individual pill. Now, each pile would necessarily contain 0.5 pill A and 1 pill B. Take the remaining pill A (still in bottle A) and split that in halves. We have created two "daily-doses" (the two piles) of the right composition for survival, although we still do not know which pill is which type.
Remark:
This can be trivially extended to n pills, n>2.
See here for more interview questions/brainteasers
Ans:
Cut all 3 indistinguishable pills in halves (6 half-pills in total) and separate them into two piles. Make sure that each pile only contains a half from each individual pill. Now, each pile would necessarily contain 0.5 pill A and 1 pill B. Take the remaining pill A (still in bottle A) and split that in halves. We have created two "daily-doses" (the two piles) of the right composition for survival, although we still do not know which pill is which type.
Remark:
This can be trivially extended to n pills, n>2.
See here for more interview questions/brainteasers
Tuesday, May 3, 2011
Instantaneous vs. Terminal volatility/correlation
Instantaneous vol. and correlation refer to the sigma and rho within the SDE's.
Terminal vol. and correlation require integrations. For an explanation on how instantaneous and terminal correlation differ, see Brigo pp.234-237.
Question to think about: are variance swap and correlation swap trading on instantaneous or terminal vol./correlation?
Terminal vol. and correlation require integrations. For an explanation on how instantaneous and terminal correlation differ, see Brigo pp.234-237.
Question to think about: are variance swap and correlation swap trading on instantaneous or terminal vol./correlation?
Trading Interview Questions
Brainteaser 1
There are N dice, each having x faces. What is the number of combination that give at least one 1 or x?
Ans: (x - 2)^N
Brainteaser 2
What is the longest diagonal within a k-dimensional hypercube?
Ans: sqrt(k)
Finance 1
You purchase a 5yr pure discount bond at 5% yield. One month later you sell it at 4% yield. What is the IRR of this investment?
Ans: ~60%
Finance 2
You enter into a pair trade consisting of CDS_A of 5yr tenor and 100bps, and CDS_B of 5yr tenor and 300bps. Suppose the spread narrows down to 100bps (from 200 bps) after 1 year and you are to unwind it. Describe the strategy and estimate the profit of this trade.
Ans: Sell protection with CDS_B and buy protection with CDS_A. Profit = 600bps (why?)
Finance 3
Part I
You, an American investor, are holding a 10yr convertible bond that is convertible over the first 5 years. Explain what risks you are exposed to and how they can be hedged away.
Ans:
a) Price risk (wrt the underlying equity). Can be hedged by shorting vanilla call.
b) IR risk. Can be hedged by shorting one (or more) zero coupon bonds, or entering into a fixed EUR for floating EUR swap.
c) FX risk. Can be hedged by entering into a floating EUR for floating USD swap.
NOTE: or we can enter into a fixed EUR for floating USD swap to hedge both IR and FX risks.
d) Credit risk. Can be hedged using CDS.
Part II
Suppose this is the only bond issued by the company. How do you calculate/estimate the price of a non-convertible 5yr bond issued by the same company?
Ans:
1. Strip away the embedded option to find the price of non-convertible 10yr
2. Find the spread of non-convertible 10yr over treasury curve/LIBOR swap curve
3. Here we have to make some sort of assumption regarding the term structure of the spread: constant, or usually slowing increasing
4. Using the spread term structure, find the spread of non-convertible 5yr over treasury curve/LIBOR swap curve
5. Using the spread of non-convertible 5yr over treasury curve/LIBOR swap curve, find the yield and hence the bond price
See here for more interview questions/brainteasers
There are N dice, each having x faces. What is the number of combination that give at least one 1 or x?
Ans: (x - 2)^N
Brainteaser 2
What is the longest diagonal within a k-dimensional hypercube?
Ans: sqrt(k)
Finance 1
You purchase a 5yr pure discount bond at 5% yield. One month later you sell it at 4% yield. What is the IRR of this investment?
Ans: ~60%
Finance 2
You enter into a pair trade consisting of CDS_A of 5yr tenor and 100bps, and CDS_B of 5yr tenor and 300bps. Suppose the spread narrows down to 100bps (from 200 bps) after 1 year and you are to unwind it. Describe the strategy and estimate the profit of this trade.
Ans: Sell protection with CDS_B and buy protection with CDS_A. Profit = 600bps (why?)
Finance 3
Part I
You, an American investor, are holding a 10yr convertible bond that is convertible over the first 5 years. Explain what risks you are exposed to and how they can be hedged away.
Ans:
a) Price risk (wrt the underlying equity). Can be hedged by shorting vanilla call.
b) IR risk. Can be hedged by shorting one (or more) zero coupon bonds, or entering into a fixed EUR for floating EUR swap.
c) FX risk. Can be hedged by entering into a floating EUR for floating USD swap.
NOTE: or we can enter into a fixed EUR for floating USD swap to hedge both IR and FX risks.
d) Credit risk. Can be hedged using CDS.
Part II
Suppose this is the only bond issued by the company. How do you calculate/estimate the price of a non-convertible 5yr bond issued by the same company?
Ans:
1. Strip away the embedded option to find the price of non-convertible 10yr
2. Find the spread of non-convertible 10yr over treasury curve/LIBOR swap curve
3. Here we have to make some sort of assumption regarding the term structure of the spread: constant, or usually slowing increasing
4. Using the spread term structure, find the spread of non-convertible 5yr over treasury curve/LIBOR swap curve
5. Using the spread of non-convertible 5yr over treasury curve/LIBOR swap curve, find the yield and hence the bond price
See here for more interview questions/brainteasers
Friday, April 29, 2011
LMM Calibration & Parameterization
Refer to Brigo Ch.6.
The 'calibration' of LMM to market data is trivial - since LMM is designed so as to be consistent with Black volatilities, the 'calibration' amounts to simply bootstrapping the caplet vol. from the cap vol.
However, we don't just want to use LMM to price caps/floors. We want to price other more exotic products. Hence we also have to specify the instantaneous volatilities (the diffusion coefficient sigma in the SDE) and the instantaneous correlations (the rho among the Brownian motions). Remember, if the payoff of an instrument depends on more than one LIBOR forward rates, then it depends on the terminal correlation, which in turn depends on both instantaneous volatility AND instantaneous correlation(Brigo pp.234). Note that we are assuming the scalar LIBOR specification (see here).
# LMM requires that sigma be deterministic. Hence parameterizing sigma amounts to choosing a deterministic function (of time) for the volatility term structure. Parameterizing sigma has nothing to do with fitting to market data.
# Meanwhile, correlation is a constant (matrix). By parameterizing the rho matrix we reduce the rank (i.e. degree of freedom) of the matrix. Parameterizing rho has nothing to do with fitting to market data.
The 'calibration' of LMM to market data is trivial - since LMM is designed so as to be consistent with Black volatilities, the 'calibration' amounts to simply bootstrapping the caplet vol. from the cap vol.
However, we don't just want to use LMM to price caps/floors. We want to price other more exotic products. Hence we also have to specify the instantaneous volatilities (the diffusion coefficient sigma in the SDE) and the instantaneous correlations (the rho among the Brownian motions). Remember, if the payoff of an instrument depends on more than one LIBOR forward rates, then it depends on the terminal correlation, which in turn depends on both instantaneous volatility AND instantaneous correlation(Brigo pp.234). Note that we are assuming the scalar LIBOR specification (see here).
# LMM requires that sigma be deterministic. Hence parameterizing sigma amounts to choosing a deterministic function (of time) for the volatility term structure. Parameterizing sigma has nothing to do with fitting to market data.
# Meanwhile, correlation is a constant (matrix). By parameterizing the rho matrix we reduce the rank (i.e. degree of freedom) of the matrix. Parameterizing rho has nothing to do with fitting to market data.
Monday, April 25, 2011
Convexity, Time and Quanto Adjustments
Under the simplest B-S setting, the price of a forward contract does not depend on the volatility (cf. the price of a vanilla call). This makes sense because while the option payoff is asymmetric, hence would benefit from higher volatility, the forward payoff is symmetric (you lose money when the underlying price goes under water) and hence would neither benefit from nor be harmed by higher vol. However, in some cases the volatility comes into play even when the contract payoff is symmetric, and here we consider a few examples. The common theme of them is that we are trying to price an instrument under the "wrong" numeraire, which introduces an extra drift that does depend on the volatility.
Convexity/Time Adjustment
When the payoff is a linear function of the spot rate. The "wrong" numeraire is the zero coupon bond that does not expire on the right date (i.e. in-arrear swap or in-arrear cap/floor).
Quanto Adjustment
When the payoff is a linear function of the asset denominated in a foreign currency. The "wrong" numeraire is the domestic money-market account.
Reference:
Hull - Options, Futures and Other Derivatives [Chapter 29]
Veronesi - Fixed Income Securities [Section 21.7]
Brigo - Interest Rate Models [Chapter 13]
Convexity/Time Adjustment
When the payoff is a linear function of the spot rate. The "wrong" numeraire is the zero coupon bond that does not expire on the right date (i.e. in-arrear swap or in-arrear cap/floor).
Quanto Adjustment
When the payoff is a linear function of the asset denominated in a foreign currency. The "wrong" numeraire is the domestic money-market account.
Reference:
Hull - Options, Futures and Other Derivatives [Chapter 29]
Veronesi - Fixed Income Securities [Section 21.7]
Brigo - Interest Rate Models [Chapter 13]
Sunday, April 24, 2011
Polymorphism and Virtual Function in C++
Virtual function syntax:
virtual void func(int i){};
Pure virtual function syntax:
virtual void func(int i) = 0;
If a class contains at least one pure virtual member, it is an abstract class - we cannot instantiate an object of an abstract class. However, we can create a pointer that points to such a class. Suppose
class myAbsClass{
virtual void func(int i) = 0;
}
class myChildClass: public myAbsClass{
void func(int i) {return 1};
}
Then we can do
myAbsClass* pointer1;
pointer1 = new myChildClass;
Polymorphism makes coding more flexible and efficient. For example, suppose there are more than one (non-abstract) child classes, and each of them has different implementations of the virtual function in the parent class. If we want to write a function that requires the returned value of such functions, we do not have to write it multiple times, but only need to write it so that it takes the abstract pointer as an input.
virtual void func(int i){};
Pure virtual function syntax:
virtual void func(int i) = 0;
If a class contains at least one pure virtual member, it is an abstract class - we cannot instantiate an object of an abstract class. However, we can create a pointer that points to such a class. Suppose
class myAbsClass{
virtual void func(int i) = 0;
}
class myChildClass: public myAbsClass{
void func(int i) {return 1};
}
Then we can do
myAbsClass* pointer1;
pointer1 = new myChildClass;
Polymorphism makes coding more flexible and efficient. For example, suppose there are more than one (non-abstract) child classes, and each of them has different implementations of the virtual function in the parent class. If we want to write a function that requires the returned value of such functions, we do not have to write it multiple times, but only need to write it so that it takes the abstract pointer as an input.
Fixed Income Mathmetics
LIBOR rate and Bond price
L(t,S,T) = -(p(t,T) - p(t,S))/((T-S) p(t,T))
* LIBOR is just discretely compounded forward rate
Continuously compounded forward rate and Bond price
R(t,S,T) = -(log(p(t,T)) - log(p(t,S)))/(T-S)
Instantaneous forward rate and Bond price
f(t,T) = -d(log(p(t,T)))/dT
Instantaneous short rate
r(t) = f(t,t)
Bond price and Instantaneous forward rate
p(t,T) = exp[-\int^T_t f(t,s) ds]
Note: this is just the inversion of the f vs. p formula above
Bond price and Instantaneous short rate
p(t,T) = E^Q[exp[-\int^T_t r(s) ds]]
Note: this comes from valuing a 1 dollar payoff under the Q-measure
L(t,S,T) = -(p(t,T) - p(t,S))/((T-S) p(t,T))
* LIBOR is just discretely compounded forward rate
Continuously compounded forward rate and Bond price
R(t,S,T) = -(log(p(t,T)) - log(p(t,S)))/(T-S)
Instantaneous forward rate and Bond price
f(t,T) = -d(log(p(t,T)))/dT
Instantaneous short rate
r(t) = f(t,t)
Bond price and Instantaneous forward rate
p(t,T) = exp[-\int^T_t f(t,s) ds]
Note: this is just the inversion of the f vs. p formula above
Bond price and Instantaneous short rate
p(t,T) = E^Q[exp[-\int^T_t r(s) ds]]
Note: this comes from valuing a 1 dollar payoff under the Q-measure
Different Rates
- Federal Funds Rate
Bank lending Fed funds to other banks
- Prime Rate
Bank lending money to its customers
- Repo/Discount Rate
Fed lending its own money to banks
See: Discount Window
- LIBOR (London Interbank Offered Rate)
Bank lending money to other banks
- OIS (Overnight Indexed Swap)
Banks paying/receiving floating/fixed with other banks
Note: The swap rate is usually in between LIBOR and the Fed funds rate
See: OIS
- Eurodollar
Banks lending USD outside US
What does the LIBOR-OIS spread tell us?
Both LIBOR and OIS are between two risky counterparties, but OIS is less risky (because of swap payment and nominal amount netting). Hence the LIBOR-OIS spread is a measure of banks' credit risks.
Bank lending Fed funds to other banks
- Prime Rate
Bank lending money to its customers
- Repo/Discount Rate
Fed lending its own money to banks
See: Discount Window
- LIBOR (London Interbank Offered Rate)
Bank lending money to other banks
- OIS (Overnight Indexed Swap)
Banks paying/receiving floating/fixed with other banks
Note: The swap rate is usually in between LIBOR and the Fed funds rate
See: OIS
- Eurodollar
Banks lending USD outside US
What does the LIBOR-OIS spread tell us?
Both LIBOR and OIS are between two risky counterparties, but OIS is less risky (because of swap payment and nominal amount netting). Hence the LIBOR-OIS spread is a measure of banks' credit risks.
Subscribe to:
Posts (Atom)