Monday, May 28, 2012

Variance Swap Revisited (Redux)

It's amazing how much I learn every time I re-read the variance swap literatures.

1. The (model-independent) formula for the fair strike of a variance swap depends on the choice of S* (the truncating spot price). Most generally it is

$ rT - \frac {S_0 e^{rT} - S^*} {S^*} - ln \frac {S^*}{S_0} + e^{rT} \int_0^{S^*} \frac {P(K)}{K^2} dK + e^{rT} \int_{S^*}^{\infty} \frac {C(K)}{K^2} dK$

If S* is chosen to be the future stock price then the above expression can be simplified.

To hedge a variance swap, a trader statically holds the continuum of OTM options, plus rolling a future position of (1/F_t - 1/F_0). In a B-S universe the future position would hedge away the delta exposure, except that...

2. Delta of variance swap (one that comes from practicality):
In principal the terminal variance is measured as the INTEGRAL of INSTANTANEOUS variance; in practice, the contract is such that variance is calculated on a daily basis using daily prices. This leads to the need for intra-day Delta hedging.

3. Delta of variance swap (one that comes from smile)
The Coulombe paper show that variance swap Delta is a function of implied volatility skew. This implies that the Delta can be negative.

Reference:
Derman GS paper
de Weert "Exotic Options Trading" Ch. 23
Carr and Madan 2002 "Towards a Theory of Volatility Trading"
Coulombe et al 2008 "An Analytic Formula for the Delta of Variance Swap"

Sunday, May 20, 2012

Short Notes on (Implied) Volatility

  1. At the risk of stating the obvious, implied volatility is nothing but the quoting of price under B-S framework. The use of it for anything else (i.e. hedging) is a recipe for disaster.
  2. In light of this, the purpose of having a stochastic volatility model is not primarily to have better fits to market smiles (though that is important too), but rather:
    • To allow for consistent hedging (especially vega hedging);
    • To prescribe some dynamics to the evolution of the smile^.
  3. In the B-S framework, if one long an option and continuously delta-hedge, the payoff would be 0.5*S*S*Gamma*(realized var. - implied var.)*dt. What about under a stochastic volatility model? Suppose that the variance process is also stochastic and we only delta hedge w.r.t. the stock price. If the variance process is dv = a dt + b dX, then the delta-hedged P&L would have a residual of b*Vv*dX, thanks to the additional source of randomness.
^ Local volatility model is somewhat helpful for the first purpose (hedging). It however produces smile dynamics that are at odd with observation. See the discussion in the original SABR paper.

 Reference: Rebonato, "Volatility and Correlation: The Perfect Hedger and the Fox" Ch. 6
                  Wilmott, "Paul Wilmott on Quantitative Finance" Ch. 12

Monday, May 7, 2012

Time Integral of Brownian Motion

This is a short note on computing the time integral of a Brownian motion:

$ \int_0^t W_s ds$

In fact I should have said the moments of such an integral. The first moment is just

$ E[\int_0^t W_s ds] = \int_0^t E[W_s] ds = 0$


The second moment is

\begin{align*} E[\int_0^t W_s ds \int_0^t W_u du] & =  E[\int_0^t \int_0^t W_s W_u ds du] \\ &= \int_0^t \int_0^t E[W_s W_u] ds du \\ &= \int_0^t \int_0^t min(u,s) ds du \\ &= \int_0^t \int_0^s u du ds + \int_0^t \int_s^t s du ds \\ &=\int_0^t \frac {s^2} {2} ds+\int_0^t (ts-s^2) ds \\ &= \frac {t^3}{3}\end{align*}

The trick is to separate the min function into two 
regimes.

Thursday, April 12, 2012

Short Note on Corp (or Risky) Credit Term Structure

Bootstrapping the risk-free yield curve is (relatively) straightforward. One might be tempted to repeat the same trick for Corp bonds, i.e. bootstrapping a risky yield curve and use it for pricing by adding it to the risk free rate.

However, this approach would produce very poor results especially for lower rating bonds. If one starts from short maturity and move to longer maturities according to the naive scheme, the yield usually
  • fluctuates a lot
  • drops sharply (thus almost surely producing an inverted curve)
  • or even unfolds in a way such that the PV of the earlier coupons of a long dated bond exceeds its observed price!
The problems arise because by adopting the naive bootstrapping approach that is borrowed from the risk free case, we completely ignored the effects of 1) recovery; and 2) CF timing shortening (due to default), which are dominant in the case of low rating bonds. Remember, the naive procedure is based on discounted (known) CF with no uncertainties either in timing or amount. When default is not only possible (since we are considering corp) but probable (since we are considering low ratings), this method breaks down.

One way to get by is to back out not the risky yield but the hazard rate (or equivalently the risk neutral default probability). To do that we have to express market bond price as a function of recovery and hazard rate, much like what is done for CDS pricing.

Reference:
Berd et al. 2004, "Defining, Estimating and Using Credit Term Structures" Part 1-3

Monday, April 9, 2012

Quant Interview: High Frequency

1. What is CAPM?

2. If I have a portfolio of long option that are Delta hedged, what daily P&L can be expected?

3. If on average the probability of seeing one car passing by per hour is $\kappa$, what is the probability of seeing one car passing by within 15 minutes?
Ans: $1-(1- \kappa)^{1/4}$

4. How many integers fulfill all 3 criteria below:
  • 3-digited
  • Odd
  • Does not contain any '5' in any place

See here for more interview questions/brainteasers

Thursday, March 29, 2012

Follow-up: Multi-curve Modeling

In [Mercurio 2009], two different approaches are proposed as attempts to resolve the new post-crisis market norm. (Recap: the issues include rate dependence on contract tenor, failure of textbook no-arb relationships between different rate securities)

The first approach focuses on the difference in counterparty risk for various contracts. For example, regarding the textbook case of replicating an FRA using a long and a short LIBOR deposits, we can introduce hazard rate and default time into the replication argument. That way, we end up with a forward LIBOR that is higher than the comparable FRA.

This approach, however, cannot be easily utilized in pricing, and more importantly the industry seems to favour 'segmenting market rates,' i.e. having multiple curves in existence simultaneously.

Digression: Bootstrapping
This is a description of how zero curve bootstrapping is done in general setting. (i.e. not limited to post-crisis multi-curve method)

A single kind of contract is unlikely to cover the entire range of maturities, hence different securities are required for different sections of the curve. What actually got to be chosen for curve construction depends on currency, but in general:
  • The shortest end is built from cash/money market deposit. Since there is only a single bullet payment in a deposit transaction, the 'bootstrapping' is trivially done by day count (and perhaps compounding) adjustment.
  • The middle section is built out of FRA or ED future contracts. Once again, since there is only one cash flow the bootstrapping is straight forward. Note however that if future contracts are used, a convexity adjustment is required so that the adjusted rate is comparable to that of a forward contract. (the convexity comes from the relative advantage of holding an interest rate future over forward, because MTM profit/loss can be reinvested/covered at a higher lower/rate)
  • Finally, the far end of the curve is built out of swap. In this case we have to proceed in an order of ascending maturity because there are more than one payments in a swap. Suppose the rates are known up to (t-1). Then, with the market swap rate, S(t), and the discount factor up to (t-1), P(0,T_i), the discount factor and hence the rate for t can be found using the swap rate formula.
End of Digression

In the multi curve case, the only difference from the general procedure above is that we would only use one family of securities in building a curve of a certain tenor. (e.g. 3m deposit, 3m FRA with various maturities and 3m LIBOR fixing swaps with various number of payments to build the 3m tenor curve)

Finally, as an aside, note that curve interpolation is a tricky business, especially if you want to also calculate the instantaneous forward curve which is very sensitive to local curve fluctuations.

Wednesday, March 21, 2012

Multi-curve Pricing: Short Notes

Issue:
After Mid 2007, a lot of the good-o textbook wisdom failed to hold, mainly in two aspects:
  1. Some rates use to match one another almost exactly (i.e. zero spread), for example deposit rate vs overnight swap rate; now the spread is much larger.
  2. Swaps with different settlement frequencies have very large rate spread, i.e. the size of the swap rate depends on the fixing.
Proposed remedies:
  1. Use separate curves for discounting and forwarding
  2. Treat LIBOR's with different fixings as independent underlyings

Questions:
Even in the good-o textbook context, shall we expect LIBOR's with different tenors to have zero spread? Or is it just that tenor used to be irrelevant in the old narrative?

Reference:
Henrard 2009, "Irony in Discounting: The Crisis"
Bianchetti 2009, "Two Curves, One Price"
Mercurio 2009, "Interest Rates and the Credit Crunch: New Formulas and Market Models"

Monday, March 5, 2012

Credit Flattener and Steepener: Duration and Convexity Exposures

Flattener/Steepener are long/short strategies that bet on the relative movements of long vs. short maturity ends on a curve. The curve can be interest rate, variance or credit spread. For the sake of discussion, we consider a credit spread flattener.

The three main exposures are TIME, CURVE SHIFT and DEFAULT. Here we focus on CURVE SHIFT. Surely, we can mitigate the risk by duration hedging (even so we will be left with convexity risk, see below). However, notional matching has the advantage of zero default exposure (at least until the shorter leg expires).

In a notional-matched flattener, the investor speculate on flattening credit curve by selling (buying) CDS protection at the long (short) end. If the curve steepens instead, we would of course have a loss. What if the curve tightens by a parallel shift?

The mark-to-market as the spread moves is calculated by multiplying spread change to risky DV01, which, to recap, is the CDS spread numeraire. Obviously, DV01 of longer leg > DV01 of shorter leg. Hence a parallel upward shift (widening) of the curve affects the long leg more. But widening spread is bad for protection seller. Therefore a flattener position is harmed by widening spread (because the benefit on the short end < the loss on the long end).

The previous paragraph assumes that DV01 remains constant when the shift is small enough, and it considers only the relative sizes of DV01's. Not surprisingly, DV01 itself does not stay constant as the curve shifts further and hence there is convexity effect, which concerns the relative sensitivities of DV01's. Turns out DV01 decreases as spread widens, and the DV01 of the long end is more sensitive to curve shift than the short end. It follows then, that a flattener has positive convexity (when spread widens => DV01 drops => bad effect at long end diminishes => good for investor) while steepener has negative convexity.

Reference: JP Morgan 'Credit Derivatives Handbook'

Tuesday, February 28, 2012

Quick Notes on Haug's Article (Know Your Weapon I)

Concerning vanilla options and good-O' Black- Scholes:
  1. Delta (the absolute value of which) can be greater than unity
  2. As a corollary, ITM put can have absolute Delta lower than 0.5 and OTM call can have Delta greater than 0.5
  3. Gamma and Vega attain their max NOT at-the-money-forward
  4. Ordinary way of computing Gamma has a saddle point; there's a peak at the long expiry zero underlying boundary
  5. As a consequence, GammaP might be more useful than Gamma in describing gamma risk
Ref: Haug, Know Your Weapon Part I

Saturday, February 11, 2012

Black-Scholes Pricing in F#

First, get Math.NET Library (Open source).

F# code:

\\ begin
#light

open MathNet.Numerics.FSharp
open MathNet.Numerics.Distributions

let d12 (S0,r,y,sigma,K,T,d1_d2) = (log (S0/K)+(r-y+(if d1_d2 = 1.0 then 1.0 else -1.0))*(sigma*sigma / 2.0)*(T))/(sigma * (sqrt(T)))

let normal = new Normal(0.0, 1.0)

let bsPrice (S0, r, y, sigma, K, T) = exp (-y*T) * S0 * normal.CumulativeDistribution(d12 (S0,r,y,sigma,K,T,1.0))-exp (-r*T) *K * normal.CumulativeDistribution(d12 (S0,r,y,sigma,K,T,2.0))

printfn "Price = %F" (bsPrice (1.0, 0.0, 0.0, 0.2, 1.0, 1.0))

open System
Console.ReadKey(true)
\\ end