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?