Quant Interview


Go Back   Quantitative Finance Forums - quantitative methods, technical analysis, automated trading systems > Software Development > C and C++
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 05-02-2008, 05:32 PM   #1
raypendergraph
 
Posts: n/a
BOPM algorithm comparison question

I am trying to compare and contrast different methods of implementing the binomial options pricing model. To do this I have studied implementations from a few differnt people. Even though the formulas, algorithms and languages are different (Mathematica, C++, Java, etc.) I have been able to reconcile their differences and obtain the same results or at least account for differences.

Long story short, using the BOPM source code (C++) from Bernt Odegaard's "Financial Numerical Recipies in C++" work I have been getting slightly different results than from the other implementations. I think what he is doing here is making clever use of the tree by stepping all the way through the "down" side of the tree and then calculating upward the prices for the entire last period from this, all the way up to the highest node on the last period.

It's this part of the whole implementation i am wondering about.An array for period n is calculated by starting with the lowest node in the last period n (down^n) and working upward to up^n by multiplying the last node by up^2 starting with the down^n. This generates a last period in the simulation with different prices than the other models. The first price in the period (down^n) is correct but the results start to deviate from there. This seems to make the tree "wider" than other models because the up^n node is more expensive

Code:
double uu = u*u;
...
for (int i=1; i<=no_periods; ++i) prices[i] = uu*prices[i-1];
I tried applying (current/down*up) to the nodes to replace the (up^2) calculation and this seemed to make the model produce the same price tree of the others. The pricing trees were identical to the other models I used.

Is he trying to accomplish something slightly different here? Does anyone know if this application of (up^2) to a node in a period to get the next highest node in that period is discussed anywhere? I know a lot of people have studied this algorithm/code so what am I missing?

Last edited by raypendergraph : 05-02-2008 at 05:36 PM.
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 07:20 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.