Axel Vogt

5936 Reputation

20 Badges

20 years, 251 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are Posts that have been published by Axel Vogt

The most trivial task in option pricing is to compute values through the Black-Scholes formula: type in the formula, feed Maple with data, done. The same in computational environments like C programs or Excel (assuming a good implementation of the cumulative normal function). Really? And the limiting cases? Or coming close to them? How about small volatility (say below 10% like in FX trading?) or short expiry times (say some weeks)? No problem to back-out volatility from prices to fit models? First I give an example that using the common formula even Maple quickly runs into numerical errors. That can be avoided by decomposing calls and puts into their so-called intrinsic value (the discounted pay-off) and their premium (that's wht has to be payed beyond that, the actual 'speculation').
Heston's model is formulated in the language of stochastic processes (not my case at all) and translated to a PDE, where it is solved in Fourier space in closed form. The actual price of an option then is given by a Fourier inversion. The model gives a mean reverting behaviour for volatility and allows to reproduce 'volatility smiles' - both are stylish facts observable in markets (which the classical Black-Scholes model does not cover). Here I show ways, how evaluation can be done within Maple in reasonable time: the involved integrands are very time consuming for numerical evaluation, but that can be simplified a lot using the codegen packag.
Following an idea of Peter Jäckel ("Probably the most complicated trivial issue in financial mathematics: how to compute Black's implied volatility robustly, simply, efficiently, and fast") it is shown, how an initial guess has to be taken to backout volatility from given option prices - with an astonishing good quality. The original uses more numerical computations, which I replace by Lambert's W function, Maple is of great help for that. In a second part the guess is refined to a numerical solution using Newton's method, where only some steps are needed to achieve machine precision: Through Lambert's function and an appropriate scaling about 3 steps are enough by using a higher order method.
The motivation for this worksheet comes through a discussion about coding a complex Gamma function for MPFR (which covers the real case) using a library for complex numbers. The suggestion was to use a general solution due to Spouge - it seems to be quite simple and it works in MPFR for the real case, some according code is given by Wilder. However I did not understand all the steps in Wilder's code (well, MPFR needs ugly looking code, not my personal taste) and more irritating I was not able to get reasonable results with Maple (no, I have not tried to use MPFR and am afraid of difficulties in doing that on Windows) in a systematic way.
The (new) volatility index from the CBOE is computed from option prices without using a specific model. Understanding that as a special case one can derive a formula to get higher moments from quoted prices in a completely model free way and thus gets reasonable approximate values for mean, variance, skewness and kurtosis without constructing an implicit density. Besides interesting in its own these figures can serve for estimating pricing models by providing initial guessing for parameters. The Maple sheet shows, how to find the formula based on a result of Carr and Madan. Then the essential steps and procedures are given which allow to compile
First 11 12 13 14 15 16 17 Page 13 of 18