Mathematica in finance. Having more to say, please consider to be our guest blogger.

May
29

To be honest, I can't call myself a fan of Mathematica, as you can notice by the number of posts under Mathematica category of this blog. No specific or big reasons, but just because my first job required Matlab & C++, my second job required R & S+ & Matlab, my master & PhD universities don't have Mathematica installed, that's it. I personally came across this software a few times either due to the codes I could find on my interested topics having only Mathematica version, or the request by my friends & colleagues for analysis.

That's why I only got to know the existence of

It can be used for:

That's why I only got to know the existence of

**Mathematica Home Edition**today despite the fact it has been in the market for over one year! What is**Mathematica Home Edition**? as the webpage shows:Mathematica Home Edition gives home users Mathematica's powerful technology, developed over 20 years and used by Nobel-winning scientists and leading corporations. It provides access to curated data, makes it easy to create and share interactive applications, and a whole lot more.

It can be used for:

Apr
28

This post is writen by Jovan, one of our contributors currently studying MFE, thanks, Jovan.

A couple of weeks ago one of my friends had an interview at a local hedge fund and he had to prepare Greeks of exotics, so we decided to plot them. In Uwe Wystup’s book, Options in FX markets there is a nice and very clear analytical solution, and mathematica 7 is good in symbolic so the code just takes the derivatives and plots them. Also to check the solution of down and out call we plotted the down and in call and their payoff combines into a regular call so that there wasn’t a mistake. If you do not have mathematica there is a mathematica free file viewer form Wolfram.

Together with the codes there is a mini manipulate idea where you can see the interaction of the Greeks with other input parameters such as a Barrier where you see that the delta explodes when you are close to expiry and to the barriers. Uwe Wystup suggests that then one should do a barrier shift to prevent this so that one should rehedge your portfolio based on that shifted barrier. If you are interested to see this please download the attached Mathematica files and check it out.

A couple of weeks ago one of my friends had an interview at a local hedge fund and he had to prepare Greeks of exotics, so we decided to plot them. In Uwe Wystup’s book, Options in FX markets there is a nice and very clear analytical solution, and mathematica 7 is good in symbolic so the code just takes the derivatives and plots them. Also to check the solution of down and out call we plotted the down and in call and their payoff combines into a regular call so that there wasn’t a mistake. If you do not have mathematica there is a mathematica free file viewer form Wolfram.

Together with the codes there is a mini manipulate idea where you can see the interaction of the Greeks with other input parameters such as a Barrier where you see that the delta explodes when you are close to expiry and to the barriers. Uwe Wystup suggests that then one should do a barrier shift to prevent this so that one should rehedge your portfolio based on that shifted barrier. If you are interested to see this please download the attached Mathematica files and check it out.

Download

Dec
17

Stable densities in four different parameterizations:

S(α,β,γ,δ;0) parameterization (top left), the "standard" S(α,β,γ,δ;1) parameterization (top right), S(α,β,γ,δ;2) parameterization (bottom left), S(α,β,γ,δ;3) parameterization (bottom right). The values of α are indicated on the plots, skewness is indicated by color: β=0 (black), β=0.25 (red), β=0.5 (green), β=0.75 (yellow), β=1 (blue). In all cases, scale γ=1 and location δ=0. Note the discontinuity in the standard 1-parameterization near alpha=1.

download stable distribution software at http://www.mathestate.com/tools/Financial/sw/Software.html

S(α,β,γ,δ;0) parameterization (top left), the "standard" S(α,β,γ,δ;1) parameterization (top right), S(α,β,γ,δ;2) parameterization (bottom left), S(α,β,γ,δ;3) parameterization (bottom right). The values of α are indicated on the plots, skewness is indicated by color: β=0 (black), β=0.25 (red), β=0.5 (green), β=0.75 (yellow), β=1 (blue). In all cases, scale γ=1 and location δ=0. Note the discontinuity in the standard 1-parameterization near alpha=1.

download stable distribution software at http://www.mathestate.com/tools/Financial/sw/Software.html

Nov
13

Quasi monte carlo method is popular for derivative pricing, Sobol sequences is among the most widely-used low-discrepancy sequences, and most efficient one I have ever used. The biggest challenge for generating sobol sequences is to construct primitive polynomials, here is a Mathematic file showing the algorithm to construct primitive polynomials for multi-dimensional Sobol sequences , have fun.

http://leippold.googlepages.com/matlab

http://leippold.googlepages.com/matlab

Sep
28

Asian options are securities with payoff which depends on the average of the underlying stock price over certain time interval. Since no general analytical solution for the price of the Asian option is known, a variety of techniques have been developed to analyze arithmetic average Asian options.

A simple and numerically stable 2-term partial differential equation characterizing the price of any type of arithmetically averaged Asian option is given. The approach includes both continuously and discretely sampled options and it is easily extended to handle continuous or discrete dividend yields.

The paper "Unified Asian Pricing", Risk, Vol. 15, No. 6, 113-116 and its Mathematica nb file can be downloaded at http://www.stat.columbia.edu/~vecer/.

A simple and numerically stable 2-term partial differential equation characterizing the price of any type of arithmetically averaged Asian option is given. The approach includes both continuously and discretely sampled options and it is easily extended to handle continuous or discrete dividend yields.

The paper "Unified Asian Pricing", Risk, Vol. 15, No. 6, 113-116 and its Mathematica nb file can be downloaded at http://www.stat.columbia.edu/~vecer/.