Some thoughts about CDO tranche pricing
June 26, 2009, 11:10 am[ more.. ]
Option Pricing Using Numerically Evaluated Characteristic Functions
May 17, 2009, 9:19 pmAs you may have seen from my last presentation in Paris, recently I was working on numerical techniques that allow efficient pricing of European options in case we incorporate several risk factors into our stochastic model.
As a model validation quant I was looking for a flexible framework to incorporate various risk factors into my model and test their contribution to derivatives prices and hedging ratios. I found the affine jump-diffuision processes to be a broad family that incorporates stochastic volatility models, jump models and mean-reversion models. This family provides me good building blocks for model developments.
In some affine cases the characteristic function exists closed-form. However, in most cases that interest me, I need to solve the matrix Riccati equations numerically. I was looking for a robust and stable method to solve the corresponding ODEs. I presented my results in Paris.
Beside solving the ODEs, what is equally important is to find the appropriate characteristic method to carry out the inverse Fourier inversion. I extended and adjusted the direct integration technique to find efficiency, stability and harmony between the two integrations: the integration of the ODEs and the spectral integration representing the Fourier inversion.
<suspended>
November 30, 2007, 12:33 amDue to various reasons I have suspended to write posts to this blog. Those who are interested may follow the status of my researches through the "My papers" blog.
Stratified sampling
November 25, 2007, 11:01 pmI found in the literature that the nice conditional technique that I developed recently to improve the Sobol integration is strongly related to the variance reduction technique called stratified sampling. Earlier, I have not work with this technique, thus, now I took the time to read more about it from the following two books:
Peter Jäckel: Monte Carlo methods in finance
Paul Glasserman: Monte Carlo Methods in Financial Engineering
Master thesis: C++ implementation of credit models
November 21, 2007, 12:55 pmCoaching Stefan at his master thesis, I showed him how to use MS Visual Studio and Subversion to develop C++ projects in a team.
I subscribed him to the FinQuantXL toolkit project as a developer.
Improve the integration quality when using Sobol numbers
November 16, 2007, 10:39 pmI was analysing and reseaching techniques that improve the MC convergence when using Sobol quasi random numbers.
As it is well known, the Sobol numbers do not cover the unit interval [0,1] equally. They cover the unit interval with the numbers (k / 2^n) | (1 <= k <= (2^n - 1)). These low discrepancy numbers put less weight on the two tails, though the impact of this weight difference decreases as n converges to infinity.
However, in case of large volatility or long maturity the convergence of MC simulations to price derivatives can be very slow even using these low discrepancy numbers.
In finance, the quasi uniform Sobol numbers are usually used first to generate the Wiener process for the return path, then from the return path to obtain the spot path, and then to calculate the expected value of the payoff based on the spot path.
Even in case of Black-Scholes assumptions pricing a European plain vanilla by MC may far underestimate the theoretical price. Since the Sobol numbers do not put enough weight on the tails, both the volatility of the returns and the simulated forward price are underestimated. Both these two effects imply negative bias in simulated European plain vanilla option prices.
I developed and analysed techniques that correct the weights on the tails, thus they improve the integration when using Sobol numbers. These techniques were the following:
- For the Gaussian randoms instead of NORMINV(k / 2^n) I used renormalized Sobol samples: NORMINV((k - 0.5) / (2^n - 1)).
- I adjusted the volatility and the intercept of the return to meet the theoretical first moment of the price and meet the theoretical second moment of the return.
- Same technique, but as Gaussian randoms I used not the normal inverse of the Sobol numbers, but the conditional expectations of the Gaussian when they are in a given probability range. For instance, it means that instead of NORMINV(k / 2^n) I used E[x | (k - 1) / (2^n -1) <= NORMCDF(x) < k / (2^n -1)].
- I adjusted the volatility and the intercept of the return to meet the theoretical first as well as the second moments of the price. (Here, I needed some numerical search to get the adjusted volatility.)
- Same technique, but using conditional expectations for the Gaussians.
- I used conditional expectations for the Gaussians without any volatility or intercept correction.
- I used conditional expectations but not for the Gaussians, but for the price. It means that I used the Sobol numbers to create probability ranges and for these probability ranges I calculated the expected value of the lognormal distribution.
- I used the Extreme MC technique (external) that weights the conventional MC option price with an other simulated option price that is calculated for the tails.
My experiance is that the clear winner to improve the integration quality is the technique that apply the conditional expectation directly on the lognormal distribution.
Applying this technique, the MC price for a 10-year ATM call with 100% annual volatility matches the theoretical option price exactly. Even doing only 1023 MC simulations the price error is less than 0.01bp!
Moreover, this was the technique that performed the best in the multidimensional case: this technique produced the return correlations closest to the theoretical correlations.
Further advantage of this technique comparing to all the others, that for instance a local volatility MC pricing can be carried out without any exponential function call! This allows to make the simulations extremely fast. The technique can easily be used also when the calculations are distributed on a grid.
Barrier options with MC
November 12, 2007, 11:37 pmAlthough this was not a research day, as part of my work I implemented a MC pricer for continuous monitored barrier options while assuming jump-diffusion process for the underlying price.
I applied the following techniques to speed up the convergence of the MC price:
- Conditional MC technique to simulate the jump arrivals.
- Brownian Bridge technique to simulate the diffusion part of the process.
- Brownian Bridge formula to approximate the barrier hit probability between the time discretization points.
With specific parametrization, I tested the MC pricer against the closed-form Black-Scholes barrier formula and the quasi closed-from Merton jump-diffusion plain vanilla formula. Thanks to the applied techniques the convergence of the MC price was fairly good.
I consider this experience extremely helpful for my current researches with structural equity models.
Structural equity models
November 11, 2007, 11:52 pmI read the following papers to know more about structural equity models and consider how equity-credit hybrids, like the convertibles, should be priced.
Sepp (2006) Extended CreditGrades Model with Stochastic Volatility and Jumps
Albanese and Vidler (2007) A Structural Model for Credit-Equity Derivatives and Bespoke CDOs
From model risk point of view, I intend to compare a structural model, the local volatility model and a stochastic volatility model. Obviously, in each case with the possibility of jump to default.
My expectation is that comparing to the stochastic volatility prices the local volatility prices will be closer to the structural model prices. For me, this would mean some argument for the local volatility model and against the stochastic volatility model. Though, the latter is recently more popular.
Volatility modelling
November 7, 2007, 9:57 pmI spent this day preparing the following lecture of my QFM course. This session will be about volatility modelling and planed for the end of November.
I intend to start the lecture analysing the relationship between risk preferences and the numeraires. I believe that making this relationship clear helps to understand what the object of the volatility modelling is, and to see that volatility modelling as such does not exist. ![]()
Nevertheless, we build different models to match the risk preferences with the underlying behaviours. These are the building blocks to price exotics. Therefore, I plan to introduce these models and their connections to the risk preferences.
My opinion is that at each model special attention has to be paid to separate the market incorporated information from the model implied assumptions. The assumptions have to be chosen carefully based on expert knowledge. Nonetheless, assumptions cause model risk.
Among others, I read the following papers either:
Kienitz (2007) Stochastic Processes in Finance - Part I
Stauton (2007) Convolution for Levy
Tankov (2007) Lévy Processes in Finance and Risk Management
Henrotte (2006) How Exotic Is the Variance Swap?
Haug (2007) The Illusion of Risk-Free and the Deeper Meaning of Risk-Neutral Valuation
CDO pricing by Lévy processes II
November 4, 2007, 10:59 pmUnfortunately, in October I could spend only three days with researches, though I would like to recuperate some days in November by organizing a project to implement end test on the market some CDO pricing models with my colleagues.
As part of the project preparation, on the weekend I was working with the following papers and book chapters:
Baxter (2007) Gamma process dynamic modelling of credit
Ales Cerny (2004) Introduction to Fast Fourier Transform in Finance
Fabozzi (2004) Bond Markets, Analysis, and Strategies. 5th ed. Ch15 Collateralized Debt Obligations and Ch26 Credit Derivatives
CDO pricing by Lévy processes
October 19, 2007, 8:39 pmOn the last research occasion I attended a research seminar held by Viktoriya Masol (Eurandom, KULeuven) concerning CDO pricing by Lévy Base Correlations and covered the background theory by three articles and one chapter from the Hull book, namely:
Hull, 5th ed., Ch27, Credit Derivatives
JPMorgan (2004) Credit Correlation: A Guide
Joshi and Stacey (2005) Intensity Gamma: A New Approach to Pricing Portfolio Credit Derivatives
Garcia et al. (2007) Lévy Base Correlation
Statistical and risk neutral measures
October 18, 2007, 7:53 pmToday I trained three of my colleagues who have strong quantitative background and are coming from non-financial fields.
The one day session incorporated the topics of:
- futures and forward prices,
- financial principles, arbitrage pricing, payoff replication,
- repos, dividends, storage costs, marginal convenience yield, inventories,
- vanilla, quanto and compo assets and their distribution
- difference between the statistical and the risk neutral measures
- variance swaps as futures on realized variance
- statistical and risk neutral measure in case of correlation and variance swaps
- how to use subversion (SVN) as version control system to manage C++ projects in a team
Volatility indices
October 5, 2007, 8:26 pmI investigated the volatility indices and the possibilities how to incorporate them into the underlying price process modelling.
In Bloomberg I found the following market data with history:
S&P500: VIX, UXA (futures) (9M ahead), options (3M, 3Q ahead)
DJE50: V2X, A3A (futures) (4M ahead), no options
DAX: VDAX, no futures, no options
NASDAQ: VXN, options (3M, 2Q ahead)
BEL20: VBEL, no futures, no options
AEX: VAEX, no futures, no options
I downloaded historical quotes of S&P500 and VIX as well as the current option surface quoted on VIX.
I read the following papers either:
Ren, Madan and Qian Qian (2007) Calibrating and pricing with embedded local volatility models
Carr and Wu (2006) A Tale of Two Indices
Variance swaps
October 4, 2007, 6:15 pmI read papers about variance and volatility swaps and how they could be incorporated into the underlying price process modelling.
Bossu, Strasser and Guichard (2005) Just what you need to know about variance swaps
CBOE (2006) VIX options quick reference quide
CBOE (2003) The new CBOE volatility index
From Bloomberg I downloaded VIX, VDAX, S&P500, DAX historical quotes and also today's vanilla quotes on VIX, VDAX, S&P500, DAX.
Moreover, to reproduce the examples in the Ayache paper (Ayache (2007) Dial 33 for your local cleaner ) I obtained vanilla prices from Bloomberg, variance swaps from brokers and credit spreads from Markit for the following companies:
DAIMLERCHRYSLER AG-REG (DAI GY, DAIGN.DE, DCX)
DEUTSCHE TELEKOM AG-REG (DTE GR, DTEGN.DE, DT)
ENI SPA (ENI IM, ENI.MI, ENI)
E.ON AG (EOA GR, EONG.DE, EON)
ING GROEP NV-CVA (INGA NA, ING.AS, INTNED)
NOKIA OYJ (NOK1V FH, NOK1V.HE, NOKIA)
NOVARTIS AG-REG (NOVN VX, NOVN.VX, NOVART)
SAP AG (SAP GR, SAPG.DE, SAP AG)
Subversion + XLW
September 28, 2007, 9:57 pmAt the college where I am a senior member by now I installed a Subversion version control server in order to manage and track my coding developments in a clever and more advanced way.
I set up my C++ project and finally called FinQuantXL. At this time it is located at:
http://heller.bke.hu/svn/finquantxl/trunk/FinQuantXL
The project is linked to the Boost, Loki, QuantLib and XLW2.1 external libraries.
Market data management developments for C++ lib
September 20, 2007, 8:09 pmI spent this development day with OO C++ programming in order to manage historical market data in contexts.
QFM course, first lesson
September 19, 2007, 8:08 pmToday, I was working on the syllabus of my QFM course.
I was preparing myself and the study materials for the lectures.
Alternative implementations for option pricers based on FFT
September 6, 2007, 6:16 pmBasically I started to implement four kinds of option pricers based on FFT. The corresponding algorithms are presented in:
Carr and Madan (1999) Option Valuation Using the Fast Fourier Transform
Lewis (2001) A Simple Option Formula for General Jump-Diffusion and Other Exponential Levy Processes
Sepp (2003) Pricing European-Style Options under Jump Diffusion Processes with Stochastic Volatility - Applications of Fourier Transform
Kyriakos (2004) Option Pricing Using the Fractional FFT
The following step is planed to derive the FRFT application on the Sepp's Black-Scholes-style formula.
FFT implementation in C++
September 6, 2007, 1:39 pmI investigated two FFT implementations: the FFTW that is used also by MATLAB and the GFFT which was recently developed by Vlodymyr Myrnyy:
Myrnyy (2007) A Simple and Efficient FFT Implementation in C++
As it is shown in the above article, the GFFT implementation mostly overperforms FFTW thanks to its C++ template metaprogramming style. I implemented GFFT and I confirm that it performs well. I use it both for FFT and IFFT calculations.
Different FFT approaches to price options
September 5, 2007, 10:52 pmI read the slides of Andrey Itkin about different FFT approaches to price options:
Itkin (2005) Pricing options with VG model using FFT
The article presents different FFT option pricing formulas and shows how one is performing better and more stable than the others, though the slides are a bit confusing and the references to the different approaches are not clearly stated. Nevertheless, it is true that even myself I have already experienced numerical stability problems using the Carr-Madan FFT option pricing formula. Thus based on Itkin's results it is worthwhile to investigate alternative FFT option pricing formulas.
Stochastic process simulation by Fourier inversion
September 5, 2007, 11:37 amBrowsing the Wilmott forum I found a reference to Brodie and Kaya (2006) Exact Simulation of Stochastic Volatility and Other Affine Jump Diffusion Processes. The reason I was keen on reading this article was that I recently worked with the efficient simulation of jump-diffusion processes.
The paper of Brodie and Kaya suggests a method for the exact simulation of the stock price and variance under Heston’s stochastic volatility model and other affine jump diffusion processes. Reading the convergence results I was highly surprised by the slow convergence of the Euler discretization, though even the exact discretization proposed in this paper was slower than I expected. I did not go deeply to understand the numerical methods presented in the paper, but I wonder whether the Fourier inversion needed by the exact method could be computed distributively. For this kind of calculations grid computing may be necessary.
Although I will not be able to apply the presented exact method directly on my jumps simulation problem with local volatilities, I read several useful tricks for later model developments like:
- the exact method itself as alternative to the simulations by time discretization,
- conditional Monte-Carlo where only the variance process is discretized and the spot process is simulated only on fixing dates.
Matrix operations in C++
August 23, 2007, 7:51 pmRunning the Longstaff & Schwartz Least Squares Minimization Monte-Carlo one has to carry out matrix inversions.
For these calculations at the beginning I tried to use my eigenvalue decomposition class translated from JAMA. However, the EVD way of matrix inversion assumes positive semi-definiteness that I could not assure all the time.
Next step I tried to use the Gauss elimination from the Numerical Recipes in C. However, this algorithm was quite slow and I had numerical problems, because the inversion multiplied by the original matrix did not give in all cases the identity matrix. The deviations were sometimes quite big.
Looking in the literature I found that the best way for matrix inversion is to carry out an LU decomposition, then invert separately the triangular matrices L and U. This algorithm results in execution times proportional to n^3, rather than n! which can be attained by the Gauss elimination.
Moreover, if we note the matrix with the basis functions of the LSM by X, then the matrix X'X that has to be inverted is a Hermitian matrix. On Hermitian matrices one can use the orthogonal similarity transformation as well, that can produce real tridiagonal forms quicker than the LU decomposition.
An alternative way to avoid the inversion problem is to use the conjugate gradient method on the normal equations (X' X b = X' y).
In order to avoid reinventing the wheel, the issue was to find a proper C++ library that contains these algorithms. As most useful algorithms I found the following libraries:
http://perso.orange.fr/jean-pierre.moreau/c_matrices.html
Several matrix based algorithms in C++ by Jean-Pierre Moreau.
http://svn.boost.org/trac/boost
Boost started to develop its own matrix class and implement the main BLAS functionalities.
http://www.alglib.net/
The library contains several matrix based algorithms in C++ based on the old LAPACK. The original Russian version gives even more functionalities. It contains the orthogonal similarity transformation to reduce a Hermitian matrix to the real tridiagonal form.
http://www.intel.com/cd/software/products/asmo-na/eng/307757.htm
Intel MKL is an optimized BLAS and LAPACK interpretation in C++. Moreover it has efficient FFT implementation as well. However, the library is not free.
In the end, I chose Boost and ALGLIB for my implementations.
Articles from the Wilmott journal
August 22, 2007, 12:00 pmI enjoyed the following readings from the Wilmott journal:
Espen Haug: Space-time Finance
Ed Thorp: The Distribution of Stock Price Changes – Part 2
Kent Osband: When God changes his dice
Elie Ayache: Dial 33 for your local cleaner
The latter was especially interesting, since it forms not only critics against the widely used local volatility model, but it is the first article that presents detailed market examples either. Although the original SABR paper (Hagan et al.) argued against the local volatility model, their example was meaningless if somebody believed in sticky-strikeness and not sticky-moneyness.
Skipped PhD day
July 26, 2007, 9:23 pmDue to my present tasks instead of my PhD I had to work on my project.
Training in QFM for colleagues
July 25, 2007, 7:19 pmI gave a training in QFM to my colleagues. I spent the morning with preparation and the afternoon with the training.