FX cross volatility surface generation, again
Posted: June 4th, 2014, 8:07 am
Hi all,I migrated this question here as I have explainded there, the question is finally not a numerical one. Nevertheless, I will restate all the stuff, to make the current question self-containded.I have a triangle of currencies : cur1-cur2 and cur1-cur3. I have all the implied volatility quotations for cur1-cur2 and cur1-cur3. From this, I generate the implied volatility surfaces for cur1-cur2 and cur1-cur3 (the method is ok). Now, I would like to construct the implied volatility surface for cur2-cur3, the so-called cross volatility surface. (Assuming that the pair cur2-cur3 is illiquid, I have no quotation of implied vol for cur2-cur3. I only have a correlation term structure. See later.)There are of course several methods to construct this cross vol surface, and the one I am using is the one with copula. (This wasn't my choice, and I have to stick to it...) More precisely : the cur2-cur3 rate [$]S_T^{2,3}[$] at expiry [$]T[$] is equal to [$]\frac{S_T^{1,3}}{S_T^{1,2}}[$] so that the price of a call of expiry $T$ and strike $K$ on cur2-cur3 is equal to [$]\mathbf{E}^{\mathbf{Q}_1}\left[ e^{-r_1 T} \left( \frac{S_T^{1,3}}{S_T^{1,2}} - K \right)_{+} \right][$] where [$]\mathbf{Q}_1[$] is the risk neutral measure for the cur1 currency, and [$]r_1[$] is the risk-free rate for the cur1 "economy".Now we can write that[$]\mathbf{E}^{\mathbf{Q}_1}\left[ e^{-r_1 T} \left( \frac{S_T^{1,3}}{S_T^{1,2}} - K \right)_{+} \right] =\int \int_{\mathbf{R}_{+}^2} e^{-r_1 T} \left( \frac{x}{y} - K \right)_{+} \varphi(x,y) dx dy[$]where [$]\varphi[$] is the risk-neutral density (under measure [$]\mathbf{Q}_1[$], that is) of the vector [$]\left( S_T^{1,3}, S_T^{1,2} \right)[$].Now of course, I have no quotations on cur2-cur3 so that I know nothing on the cur2-cur3 implied vol, and therefore I know nothing on [$]\varphi[$].First of all, knowing the cur1-cur2 (resp. cur1-cur3) implied vol allows me to calculate the risk-neutral density (under measure [$]\mathbf{Q}_1[$], that is) of the random variable [$]S_T^{1,2}[$] (resp. [$]S_T^{1,3}[$]). Indeed, for [$]i\in\left\{2,3\right\}[$] let us note [$]\widehat{\sigma}_i (T,K)[$] the implied vol surface for the pair cur1-cur i, [$]\textrm{Call}_{0,i}^{\textrm{Mkt}, \textrm{Eur.}}(T,K)[$] the "market price" of a call of strike K and expiry T on the rate [$]S_T^{1,i}[$] and [$]\textrm{Call}_{0,i}^{\textrm{BS}, \textrm{Eur.}}(T,K,\sigma)[$] the corresponding Black-Scholes price (for a vol [$]\sigma[$]) so that we have[$]\textrm{Call}_{0,i}^{\textrm{Mkt}, \textrm{Eur.}}(T,K) = \textrm{Call}_{0,i}^{\textrm{BS}, \textrm{Eur.}}\left(T,K,\widehat{\sigma}_i (T,K)\right)[$]Now, we have[$]\textrm{Call}_{0,i}^{\textrm{Mkt}, \textrm{Eur.}}(T,K) = e^{-r_1 T}\mathbf{E}^{\mathbf{Q}_1}\left[ \left( S_T^{1,i} - K \right)_{+} \right][$]and deriving with respect to K yields[$]\frac{\partial\textrm{Call}_{0,i}^{\textrm{Mkt}, \textrm{Eur.}}}{\partial K}(T,K) = - e^{-r_1 T} \left( 1 - F_i (K) \right)[$] where [$]F_i[$] is the cumulative function of the random variable [$]S_T^{1,i}[$], so that deriving a second time with respect to K gives[$]\frac{\partial^2 \textrm{Call}_{0,i}^{\textrm{Mkt}, \textrm{Eur.}}}{\partial K^2}(T,K) = - e^{-r_1 T} \left( - {\varphi}_i (K) \right)[$] where [$]{\varphi}_i[$] is the density function of the random variable [$]S_T^{1,i}[$]. (Indeed, the density of a "nice" random variable is the derivative of the cumulative function of the random variable.)This gives [$]{\varphi}_i (K) = e^{r_1 T} \frac{\partial^2 \textrm{Call}_{0,i}^{\textrm{Mkt}, \textrm{Eur.}}}{\partial K^2}(T,K)[$].Thus, to calculate [$]{\varphi}_i (K)[$] I just have to differentiate two times the relation [$]\textrm{Call}_{0,i}^{\textrm{Mkt}, \textrm{Eur.}}(T,K) = \textrm{Call}_{0,i}^{\textrm{BS}, \textrm{Eur.}}\left(T,K,\widehat{\sigma}_i (T,K)\right)[$]. This will make appear [$]\widehat{\sigma}_i (T,K)[$] and its first and second derivatives with respect to K, which we will calculate as central finite difference. Up to this, we have a close formula for [$]{\varphi}_i[$]. This is the computation that I will use to calculate densities of cur1-cur i rates when needed.So now, I have the densities of rates [$]S_T^{1,2}[$] and [$]S_T^{1,3}[$]. How could I related this to the risk-neutral density (under measure [$]\mathbf{Q}_1[$], that is) of the vector [$]\left( S_T^{1,3}, S_T^{1,2} \right)[$], that is, to [$]\varphi[$] ? Here comes the copula.As I have a correlation term structure, I have the correlation [$]\rho[$] between [$]S_T^{1,2}[$] and [$]S_T^{1,3}[$]. Let [$]c[$] denote the copula function for correlation [$]\rho[$] to my 2D density problem, that is, the unique continuous function [$]c[$] (that depends on [$]\rho[$], of course) such that[$]\varphi_{2,\rho} (x,y) = c\left( {\varphi}_3 (x), {\varphi}_2 (y) \right)[$]where [$]\varphi_{2,\rho}[$] is the density function of a random vector [$](A,B)[$] where random variables $A$ and $B$ have correlation [$]\rho[$] and where [$]A[$] (resp. [$]B[$]) is a "log-normal random variable" of rate [$]r_1[$] and volatility [$]\widehat{\sigma}_2 (T,F_2)[$] (resp. [$]\widehat{\sigma}_3 (T,F_3)[$]) where [$]F_2[$] (resp. [$]F_3[$]) is the forward for cur1-cur2 (resp. cur1-cur3). The function [$]c[$] is obviously related to the gaussian copula, by a well-known formula.Now, I postulate that[$]\varphi (x,y) = c\left( {\varphi}_3 (x), {\varphi}_2 (y) \right)[$] which allows me to finally write[$]\mathbf{E}^{\mathbf{Q}_1}\left[ e^{-r_1 T} \left( \frac{S_T^{1,3}}{S_T^{1,2}} - K \right)_{+} \right] =\int \int_{\mathbf{R}_{+}^2} e^{-r_1 T} \left( \frac{x}{y} - K \right)_{+} c\left( {\varphi}_3 (x), {\varphi}_2 (y) \right) dx dy[$]To calculate the implied volatility for the pair cur2-cur3 (the cross vol) [$]\widehat{\sigma} (T,K)[$], I just have to compute the integral from the right-hand side of the previous equation, and to invert the Black-Scholes formula. (For the inversion, I use Jäckel's well-known "by implication" numerical routine.)To compute the integral, I do the following thing. First of all I determine intervals [$]\left[ K_{min}^i, K_{max}^i \right][$] such that the probability of [$]S_T^{1,i}[$] lying in [$]\left[ K_{min}^i, K_{max}^i \right][$] is close to 1. In fact, I choose[$]K_{min}^i = F_i e^{- 8 \widehat{\sigma}_i (T,F_i) \sqrt{T}}[$][$]K_{max}^i = F_i e^{+ 8 \widehat{\sigma}_i (T,F_i) \sqrt{T}}[$]Then I say that [$]\int \int_{\mathbf{R}_{+}^2} e^{-r_1 T} \left( \frac{x}{y} - K \right)_{+} c\left( {\varphi}_3 (x), {\varphi}_2 (y) \right) dx dy[$] is the same as (that is, in theory, very close to) [$]\int_{K_{min}^3}^{K_{max}^3} \int_{K_{min}^2}^{K_{max}^2} e^{-r_1 T} \left( \frac{x}{y} - K \right)_{+} c\left( {\varphi}_3 (x), {\varphi}_2 (y) \right) dx dy[$].Finally, I calculate the inner integral with a 400 points trapezoidal rule, and then the outer integral with a 400 points trapezoidal rule as well. (Being quick is not my first problem.)This is the method I used to calculate the cross implied vol. Now, I have to check an obvious non-arbitrage relation to have the most trivial consistency in my method : swapping cur1-cur2 and cur1-cur3 should give to me two implied vol surfaces that are symmetric up to the transformation [$]K\mapsto \frac{1}{K}[$]. (See the link I was referring to in the beginning.)I check it with the following data :for cur1-cur2 :MAT ATM RR25 BF25 RR10 BF101W 0.0045 -0.00025 0.0015 -0.0005 0.005251M 0.0045 -0.00025 0.0015 -0.0005 0.005252M 0.0045 -0.001 0.002 -0.002 0.006253M 0.005 -0.00175 0.00225 -0.003 0.0076M 0.006 -0.0035 0.0025 -0.0065 0.00851Y 0.0075 -0.0065 0.00375 -0.012 0.01225for cur1-cur3MAT ATM RR25 BF25 RR10 BF101W 0.10675 0.00275 0.00125 0.00525 0.004251M 0.0805 0.00275 0.00125 0.00525 0.004252M 0.0805 0.00575 0.0015 0.00875 0.004253M 0.0805 0.00675 0.002 0.01125 0.005256M 0.08075 0.01 0.00225 0.017 0.006251Y 0.0805 0.012 0.0025 0.0215 0.007The comparison between the two smiles (for 1M) up to the [$]K\mapsto \frac{1}{K}[$] symmetry are in the attached zip containing an excel file. The first graph (BAD) is the result with previous methods and parameters. The second (GOOD) is when I choose[$]K_{min}^i = F_i e^{- 42 \widehat{\sigma}_i (T,F_i) \sqrt{T}}[$][$]K_{max}^i = F_i e^{+ 42 \widehat{\sigma}_i (T,F_i) \sqrt{T}}[$]and still keep 400 * 400 points for the 2D integration. The third one (BETTER) is when I choose [$]K_{min}^i = F_i e^{- 42 \widehat{\sigma}_i (T,F_i) \sqrt{T}}[$][$]K_{max}^i = F_i e^{+ 42 \widehat{\sigma}_i (T,F_i) \sqrt{T}}[$]with 800 * 800 points.In the first, one smile is way too much smiled while the other is flat. In the third one two smiles are almost the same, as they should be be non-arbitrage. In the second, they "start to ressemble each other", but do oscillate around their supposed real shapes.This means the following things : 1) the initial choice of bound was very poor, missing almost all the masses of the two densities. (In fact, the problem is - see the graph - only for the first serie, that is the cur1-cur2 implied vol, which is, as you can see in the data a very very low smil, in the style of HKD-USD smiles.) 2) the second choice (extreme ! 42 stdev instead of 8, which was already big) leads to "ressembling" smiles, but with oscillations. This means that a good percentage (that is, representative) of mass of densities is caught with the new bounds, but that this new (wider) interval is too wide for only 400 points. This is confirmed by the third graph, with wider intervals for densities, and 800 * 800 points.Now, my problem is the following : what would be a good criterion to the choice of bounds of integration for the two densities ? Two requirements being : the bounds should be wide enough to capture almost all the mass of the densities, and, the bound should not be to wide enough such that a reasonable number of step (for the quadrature rules) would be sufficient.I came up with the following : determine intervals [$]\left[ K_{min}^i, K_{max}^i \right][$] such that [$]\int_{K_{min}^i}^{K_{max}^i} \varphi_i (t) dt[$] is close to 1. In fact as [$]\int_{0}^{+\infty} \varphi_i (t) dt[$] does not sum to 1 dued to numerical computations of the [$]\varphi_i (t)[$] I could first calculate [$]\int_{L_{min}^i}^{L_{max}^i} \varphi_i (t) dt[$] for small [$]L_{min}^i[$] and big [$]L_{max}^i[$], say that this is the total sum, and then choose [$]K_{min}^i[$] and [$]L_{max}^i[$] such that [$]\int_{K_{min}^i}^{K_{max}^i} \varphi_i (t) dt[$] is bigger to 99.999% of [$]\int_{L_{min}^i}^{L_{max}^i} \varphi_i (t) dt[$].The problem then is that checking this consumes way too much time (and then 60 to 70% of the time is consumed in the computation in values of the densities [$]\varphi_i[$], even if I first calculate values of [$]\varphi_i[$] on a grid, and then interpolate.I should add the following comment : changing to other quadrature rules than trapezoidal doesn't change the results. What surprise me a lot is that if I use for instance a Gauss-Legendre quadrature for the inner integral, I still have to used a lot of points to calculate the inner integrals (that is, way more than 20-30 points as in a usual Gauss-Legendre quadrature). I suspect that this means that the outer integral is a really instable function of all the inner integrals, dued to the shape of my cur1-cur2 smile.Thx in avance to all that will have the courage to read this entire post ;-)Help would be greatly appreciated !R