Sample code for building a binomial/trinomial tree

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Sample code for building a binomial/trinomial tree

Richard Fu

Hi,

 

I wonder if anyone has sample code that instantiates StochasticProccess1D and builds binomial or trinomial trees?  Thanks!

 

 

Richard

 

________________________________________
CONFIDENTIALITY NOTICE

This email transmission, and any documents, files or previous email messages attached to it may contain information that is confidential or legally privileged.

If you are not the intended recipient,or a person responsible for delivering it to the intended recipient, you are hereby notified that you must not read this transmission and that any disclosure, copying, printing, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED.

If you have received this transmission in error, please immediately notify the sender by telephone or return email and delete the original transmission and its attachments without reading or saving in any manner. Thank you.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Sample code for building a binomial/trinomial tree

Luigi Ballabio
Hello Richard,
    the code for binomial and trinomial trees is in the `ql/methods/lattices` folder.  For an example of code instantiating a binomial tree, you can look at the BinomialVanillaEngine class in `ql/pricingengines/vanilla/binomialengine.hpp`.  For a trinomial tree, you can look at any of the models in `ql/models/shortrate`.

Luigi


On Fri, Jun 2, 2017 at 3:48 PM Richard Fu <[hidden email]> wrote:

Hi,

 

I wonder if anyone has sample code that instantiates StochasticProccess1D and builds binomial or trinomial trees?  Thanks!

 

 

Richard

 

________________________________________
CONFIDENTIALITY NOTICE

This email transmission, and any documents, files or previous email messages attached to it may contain information that is confidential or legally privileged.

If you are not the intended recipient,or a person responsible for delivering it to the intended recipient, you are hereby notified that you must not read this transmission and that any disclosure, copying, printing, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED.

If you have received this transmission in error, please immediately notify the sender by telephone or return email and delete the original transmission and its attachments without reading or saving in any manner. Thank you.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev