# PSOR american call/put option implementation in C++, VBA or any languages

#### glkev

Does anyone have code (in any language) to implement the American put/call option pricing using PSOR described in Paul Wilmott's "The mathematics of financial derivatives" page 173?

#### Andy Nguyen

Not everyone has that book so if you want help, you would better served if you can post the reference source, for example the copy of that page.

#### Bastian Gross

##### German Mathquant
This site should be helpfully: Quantcode

#### hsert

hi,
I am a student in financial engineering and I have to find the matlab codes of american put option with monte carlo and asian call option with binomial tree. Can you help me? Can you write or show the link where I can find the codes?

#### msy

Hi,
I am in a similiar situation - need vba code for Asian option pricing using Binomial tree and monte carlo - any help would be much appriciated.

#### Joe Wong

See Chapter 7 of "The Complete Guide to Option Pricing Formulas" by Espen Gaarder Haug (2nd Edition) for Hull White trinomial trees for Asian Option (the CD accompanies the book contains the VBA code).

See Chapter 26 of "Options, Futures, and other Derivatives" by John Hull (7th Edition) for Least Squares Monte Carlo implementation for American put option. Quantcode website should have some sample codes that you can borrow. It should not be too bad implementing this yourself if you are using Matlab.

#### Daniel Duffy

##### C++ author, trainer
What is the performance of PSOR (it is an iterative method)?

#### Daniel Duffy

##### C++ author, trainer
Matty,
The penalty method makes the PDE semilinear and this a term like f(V, epsilon). My experience is that you need a second-order scheme in time for the BS PDE part and that epsilon must be chosen with care. Are you using the standard penalty term f()?

And you need to decide how to do time integration as you now have a nonlinear term (implicit, semi-implicit etc.) See Nielssen JCF 2002. When semi-implicit, your delta_T is dependent on that epsilon. At code level, it means a modification of the code in the linear case.

//
Aside:
Actually, I have found Brennan-Schwartz to be very good. I have documented some results here for my ADE scheme

http://www.datasimfinancial.com/forum/viewtopic.php?t=289

ADE is fast (no LU stuff needed) and is easily parallelised.

If you are interested in comparing the different methods for early exercise then this might be interesting

hth

#### Daniel Duffy

##### C++ author, trainer
Your'e welcome.
The nonlinear term is not too nasty so Newton should be Ok if you have a good start value.
I have found that Steffensen's method is also robust.

#### Daniel Duffy

##### C++ author, trainer
PSOR is iterative, which means it *can* be slow depending on the spectrum (eigenvalues) of A.

Just out of interest, did you try Brennan-Schwartz? It's fast and easy to implement.

Matty,
is this the method from Nocedal?

http://ziena.com/papers/case_options.pdf

Looking at the numbers, 2.1 secs is NOT fast. I vaguely remember ~0.2 seconds using ADE and Brennan Schwarz.

//
Some articles tend to have the adjective 'fast' as the first word in the title. Even if fast, it seems strange...

---------- Post added at 07:56 AM ---------- Previous post was at 07:46 AM ----------

Here is a post I made from another forum last year, hth

I have done a number of tests against published results and other methods (e.g. penalty). Until now, I reckon that ADE with domain transformation and with checking of the intrinsic value constraint is up there in the first few.

Example: CEV model with beta = 2/3.
machine is Window XP (Dell vostro 1710) hobby laptop 1.8 Ghz, 2GB RAM. Duo core (and I use them).
In release mode the ADE model prices to the penny (2, 3 decimal places) in interval [45, 130] milliseconds. Using OpenMP multithreading gives a speedup of roughly 60%.

The nice thing is I do not need to define any nonlinear penalty functions, front fixing or domain truncation tricks. These methods I tried were much slower.

I may have posted this article already, but here it is on SSRN (ADE methods and with early exercise as well).

http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1552926

#### Daniel Duffy

##### C++ author, trainer
Matty,
I think that when you get into ADE it will not disappoint. It's kind of state-of-art and new even though it predates ADI and Splitting methods.

regards
Daniel

Hello,

Thank you

Replies
15
Views
1K
Replies
1
Views
365
Replies
7
Views
2K
Replies
7
Views
2K
Replies
8
Views
4K