Quantitative finance collector
C++ Matlab VBA/Excel Java Mathematica R/Splus Net Code Site Other
Nov 3

Using Quadrature method for option valuation

Posted by abiao at 16:58 | Code » Matlab | Comments(5) | Reads(9220)
Reading an interesting paper "universal option valuation using quadrature methods", which provides an alternative method to value options. Compared with lattice (binomial and trinomial trees), finite difference, and Monte Carlo techniques,  quadrature method (QUAD) possesses exceptional accuracy and speed, while isn't harder to implement. Basically what we need to do is to write down the problem in an integral function and to solve the function with techniques like Simpson's rule or Gauss Quadature, ect.

For s short comparison, a simple QUAD code to price a vanilla European call option is as follows, please refer to the original paper for the meaning of symbols:
%using QUAD to calculate a vanila european call
x0 = log(s/k);
kappa = 2*(r-d)/vol^2-1;
dt = t;
ymax = 3;
A = 1/(sqrt(2*vol^2*pi*dt))*exp(-(kappa*x0/2)-(vol^2*kappa^2*dt/8)-r*dt);
q = quadl(@myquad,0,ymax,[],[],x0,dt,vol,kappa,k); %Matlab embedded quadrature
callprice = A*q;

function f = myquad(x,x0,dt,vol,kappa,k)
B = exp(-((x0-x).^2./(2*vol^2*dt))+kappa*x/2);
f = B.*max(exp(x)-1,0)*k;

Here I arbitrarily set ymax=3, which is enough for this simple example, the result for a European call option with strike price 9, stock price 10, volatility 20%, risk free rate 2%, dividend 1%, time to maturity 2 years is 1.71429100893328, with 0.005681 seconds elapsed time using my humble laptop, in contrast with the embedded Black Scholes matlab function value 1.71429100824415, and 100 time steps binomial tree value 1.71422035929822. QUAD performs quite good, isn't it?

The exotic option pricing is left for further experiment, have a nice evening.
PS: i was seriously drunken last weekend, my poor stomach.

all shortcut keys Email Homepage
If you want to move a files form one folder to another then you should try the windows shortcut keys. shortcut keys of computer a to z These windows shortcut keys helps you to move a folder from one place to another.shortcut keys of computer a to z
samuelddarden Email
Its difficult to find informative and accurate info but here I found… Mobile legend bang bang
MarkWarren Email
If I can write the scientific articulation for the alternative's result, numerical quadrature can esteem it. Perceiving an alternative's result can be cheap assignment unequivocally more straightforward than inferring the differential condition that decides its value.
A technique for numerical quadrature over a limited interim is portrayed. This technique is appropriate if the integrand is a scientific capacity, normal inside the circle need assignment help - Assignmentspot in the mind boggling plane having the combination interim as width. The strategy is iterative in nature and depends on capacity esteems at similarly divided focuses on this circle. It is adaptable enough to consider certain straightforward nonanalytic singularities in the integrand lying on the interim of joining or its expansion
windows 10 download Email Homepage
Nice post this website provides us all the information of windows 10 operating system.
Pages: 1/1 First page 1 Final page
Add a comment
Enable HTML
Enable UBB
Enable Emots
Nickname   Password   Optional
Site URI   Email   [Register]