3
$\begingroup$

I'm just curious what is the "industry standard" for implementing a binomial tree (if "standards" exist in this case). For simplicity, let's just talk about the simplest trees with recombining nodes.

Personally, I've been using 2d arrays/matrices, in particular upper-triangular matrices to implement binomial trees. I'm using Python so numpy.ndarray becomes the obvious way to go. I'm not seeing any big problem with this (you are welcome to point out the disadvantages of using ndarray for this job in your opinion).

Besides 2d arrays, what are the other efficient ways/data structures to implement the binomial tree? It would be especially appreciated if anyone can kindly provide their "industry inisights" to this problem. Thanks!

$\endgroup$
  • 3
    $\begingroup$ Two 1 dimensional arrays are usually sufficient: cnew and cold. At each iteration you use the entries in cold to compute cnew, this corresponds to one step back in time in the tree. Then you copy from cnew to cold in preparation for the next iteration. $\endgroup$ – Alex C Feb 5 at 17:07
  • $\begingroup$ @AlexC fair point. If we only need the price, we actually don't have to store the whole tree. $\endgroup$ – Vim Feb 5 at 17:10
  • $\begingroup$ On the other hand, good luck debugging a problem if you have erased all the intermediate results ;) $\endgroup$ – Alex C Feb 5 at 17:50
  • $\begingroup$ Usually 1d array is sufficient for binomial tree if you do one pass only $\endgroup$ – Ezy Feb 5 at 20:26
  • 1
    $\begingroup$ Perhaps 'Implementing Binomial Trees' (ssrn.com/abstract=1341181) is useful. The paper explains that 1d arrays suffice, as already mentioned by Alex C. It also discusses how to get (some) Greeks directly from the tree, and vectorization. (Disclosure: I am one of the authors.) $\endgroup$ – Enrico Schumann Feb 6 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.