16:642:612-02 Selected Topics in Applied Mathematics – Computational Finance
(Spring 2007)
Home
page of the course at Rutgers University web site
University Academic Calendar
Quantitative Finance Software on the Web
Prof.
Paul
M. N. Feehan course 16:642:621
Notation:
QMDF
- Domingo Tavella, Quantitative Methods in Derivatives Pricing: An Introduction
to Computational Finance, Wiley 2002, ISBN 0471394475.
IDM - L. Clewlow and C. Strickland, Implementing Derivative Models, Wiley,
1998
MDC - J. London, Modeling Derivatives in C++, Wiley, 2004
#include <cmath> //
mathematical C library Code 1: Price of European call option using the Black Scholes formula |
Answer the following questions:
Find a price
of the European call and put options with S=100, K=100, T=1yr, r=0.05,
q=0.02, \sigma=0.2.
Compare the
results obtained with Matlab and your code.
If you experiance problems with writing C++ code at this time, write these functions in Matlab!
#include <cmath> //
standard mathematical library using namespace std; double option price call european binomial (
Code 2. Binomial European, one period |
#include <vector> using namespace std; vector< vector<double> > binomial tree( Code 3: Building a binomial tree. |
In terms of computational eficiency the approcach of code 2 will not be optimal, since it requires a lot of calls to the pow() functional call. More e cient would be to carry out the tree building by doing the multiplication from the previous node, for example the j th vector is the j-1 th vector times u, and then one need to add one more node by multiplying the lowest element by d. Therefore, implement such an alternative tree building procedure.
Implement a function that computes European option call and put prices using binomial tree.
Run the test from the previous exercise to compute European option call and put prices as well as greeks. Compare results with the closed form solution. Explain the difference.
Do same in Matlab using financial toolbox, get knowledge about function binprice.