For a class in derivatives pricing I would like to find a way to quickly and efficiently draw recombining binomial trees. The class involved quite a few of those trees and it would be immensely helpful to come up with a way that would allow me to semi-automate the process.
Here's an example (excuse the low resolution; it's the best I've been able to find):
I want to achieve this look by specifying only the number of periods (i.e. horizontal levels); the probability p
of going upwards from any node; and the possible values for all nodes. The probabilities p
and 1-p
should then automatically be displayed above the connecting lines upwards and downwards respectively (as shown in the example). All values for the nodes themselves should be entered manually and their number of course depends on the number of levels.
I am of aware of the possibility of specifying node locations manually in order to achieve the recombining tree but my experience does not suffice to build something to automate this. My question is not about drawing recombining trees in general; it is about finding a way to do it very quickly, as I use LaTeX for my lecture notes.
Best Answer
This calculates the probabilities for a given value of
p
. You just need to putmy binomial=<value>
at the start of the tree to select the appropriate style with the appropriate value ofp
. I've used0.25
as an example. You also specify the content of the nodes manually, as you requested.EDIT
Figured out how to turn this into a proper style thanks to Sašo Živanović.