Re : Hull White Tree

Posted by keztenpens on
URL: http://quantlib.414.s1.nabble.com/Hull-White-Tree-tp5052p5053.html

Hi,

You have to perform a dynamic cast to the required type :
boost::shared_ptr<ShortRateTree> shortRateTree = 
boost::dynamic_pointer_cast<
<ShortRateTree>(hw->tree());


----- Message d'origine ----
De : Guowen Han <[hidden email]>
À : [hidden email]
Envoyé le : Mercredi, 20 Septembre 2006, 5h47mn 43s
Objet : [Quantlib-users] Hull White Tree

Hi Group,
 
In the Hull White class, as of the document, the member function tree() returns a trinomial tree. However the prototype is boost::shared_ptr<NumericMethod>, it does not have member functions such as discount(), probability(). Can someone tell me how to access the trinomial tree structure?
 
Thanks.
 
Guowen
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users