Some Recent Articles

15 03 2010

Here are some recent Articles I have written for the Iron Warrior. I write a bi-weekly piece on Research at Waterloo.


Some Useful Option Pricing Code

15 03 2010

I have recently started to do alot more coding in my financial modeling (all in MATLAB). Since I was having a pretty tough time finding examples online, I have decided to post some of my work online.

Please note that most of this code is experimental, and should only be used as a guide for vectorization of code in MATLAB.

This code is basic stuff using binomial trees to help get familiar with European options pricing.

You can download the M-files here.


deltaBinomial: returns matricies containing binomial trees in the upper-right. S-> stock price, V-> european option value, delta-> delta hedging ratio, t -> time vector.

interpBinomial: does linear interpolation of the delta hedge matrix. The input vector simuS is a vector of simulated prices (for example, using monte-carlo). Returns the delta hedging ratio for the simulated price vector.

dVarRCVaR: Calculates the VaR and CVaR given a loss vector L, and a confidence level b.

milstein: options pricing using milstein’s method.