Statistics Toolbox 7.2
MATLAB Used to Build and Test New Option-Pricing Model
|
Challenge
In 1998, a downturn in the Thai property market precipitated the collapse of the Far Eastern markets and a near disaster in international stock markets. In order to account for such huge, unpredictable movements in the market, Gkamas sought an option-pricing technique that, unlike Black-Scholes, did not assume that stock volatility is constant. He planned to test the performance of the new model using data from LIFFE (the London International Financial Futures and Options Exchange).
This project required computing software capable of handling large volumes of data. (The LIFFE database includes daily closing prices, exercise prices, Black-Scholes implied volatilities, and implied index futures prices for the FTSE 100 European call option contract.)
The formulae for calculating the price of a security under stochastic volatility involve sophisticated mathematics such as numerically integrating two functions dependent on the real part of a complex number. Gkamas needed easy-to-use software that would enable him to perform such complex calculations rapidly.
"The main strengths of MATLAB are its ability to handle large matrices and to perform complex calculations extremely quickly. I particularly like the vectorized operation and the way that I can avoid For-loops. MATLAB also makes it very easy to build the math models, which saves a huge amount of time."Dimitrios Gkamas
Manchester Business School, England
Solution
On the advice of Manchester University's computing center, Gkamas chose MATLAB. This powerful technical computing environment allowed him not only to develop mathematical algorithms and compute them fast but also to visualize them as a series of full-color 3-D plots. MATLAB was also chosen for its ease of use: Gkamas was quickly able to master MATLAB without formal training.
Much of his work simply involved taking published stochastic volatility formulae and entering them into MATLAB. The LIFFE data, supplied as Excel files, had to be sorted and cleansed before it could be used, and for this, Gkamas wrote Excel macros. To export the data, another macro was written to output the cleansed data as a simple text file, and a separate function was written in MATLAB to read in the data and export the results. This kept the data transfer simple and reliable.
Gkamas says that MATLAB allowed him to implement "every known closed-form solution or numerical algorithm for pricing derivatives in the area in which I am interested."
Using only the functions available in MATLAB and the MATLAB toolboxes, he was able to perform both complex financial econometric analysis and in-depth hypothesis testing. He used the Optimization Toolbox to minimize the difference between the sum of the squares of the errors between the actual and theoretical option prices. He did this in order to calibrate the models against the market data. He was then able to estimate the implied parameters and examine their evolution over time. The Statistics Toolbox was used to carry out conventional statistical analyses of the voluminous data, looking at values such as means and variances.
Now in the third year of his research, Gkamas intends to use MATLAB to develop a graphical user interface for the existing models.
Gkamas's stochastic volatility models have generated great interest among investment banks and other financial institutions, and Gkamas is increasingly being called upon to offer consultancy to the financial world.
He concludes, "MATLAB is an excellent tool for research in the field of computational finance and option pricing, as well as being a good teaching tool. The computing center told me that MATLAB was the best program in terms of the balance between computational capabilities and ease of use. Having used it for three years, I would agree with that assessment wholeheartedly."
Results
- Fast assimilation of powerful tools. Gkamas needed to learn MATLAB quickly in order to complete the project on time. As he points out, "I am not a programmer and do not have a degree in computer sciences, but I find that MATLAB is easy to use with no need for any formal training."
- Visualization of key metrics. MATLAB proved to be excellent for visualizing the option prices and hedge sensitivities using 2-D and 3-D plots. For example, Gkamas created a 3-D plot indicating the relationship between Black-Scholes implied volatility, moneyness, and time. "Showing the FTSE 100 implicit volatility surface graphically makes it immediately obvious what challenges the various stochastic volatility models must meet," he says.
- Research with commercial applicability. Gkamas plans to expand his research to include exotic derivatives. (A commercial application would be relatively simple to develop using the MATLAB Compiler and the MATLAB C/C++ Math Library. These tools enable automatic generation of DLLs, save programming time, and increase calculation speed by a factor of four or more.)
Store