I am writing a paper and need to create a png or jpeg file for binomial option price tree.

In the past I would have used the tikZ package in LaTeX, but that won't work in this case.

So I want a different package than LaTeX/Tikz to draw this graph, possibly in R, python, ....

Can you help?

  • $\begingroup$ Hi TJB, welcome to quant.SE! I would transfer this to tex.stackexchange.com but you have to show more work or they will just close it. So I will close it here and suggest you try again there. $\endgroup$
    – Bob Jansen
    Commented Sep 4, 2014 at 23:18
  • $\begingroup$ See above, here its off topic, they will probably close for lack of detail. $\endgroup$
    – Bob Jansen
    Commented Sep 4, 2014 at 23:20
  • 2
    $\begingroup$ I am trying to avoid using LaTeX for this project. Instead I would like to know how to do it with R, Python, Matlab, Gnuplot or anything of the kind. Where should I go with that question? $\endgroup$
    – TJB
    Commented Sep 4, 2014 at 23:21
  • $\begingroup$ Aha, so you want to create nice graphics in something else than Tikz? I misunderstood, doubting this one is really on-topic but I'll let the community decide as it might be of interest. For now, have you looked at GraphViz? $\endgroup$
    – Bob Jansen
    Commented Sep 4, 2014 at 23:26
  • $\begingroup$ @BobJansen I'll take a look at GraphViz. Thanks! $\endgroup$
    – TJB
    Commented Sep 4, 2014 at 23:30

1 Answer 1


In R you can use fOptions package to draw Binomial Tree graphs.

Here is a simple code snippet

#Install the package and load it

#Calculate the value of the option and plot
optionVals<-BinomialTreeOption(TypeFlag="ce",S=100,X=100,Time=3,r=0.05,b=0,sigma=0.2,n=3,title="example binomial tree")

The output is given below (I don't know maybe it can be done more beautifully, this is the default).

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.