|
From: animesh s. <ani...@gm...> - 2010-07-03 21:53:03
|
I am trying to create an instance of fd class using this call FiniteDifferenceModel<CrankNicolson<TridiagonalOperator> > Obviously this is not possible since the constructor is (const operator_type& L, const bc_set& bcs, const std::vector<Time>& stoppingTimes = std::vector<Time>()) What I understand is stoppingTimes is an array for maturities. In case of plain vanilla or simple up out call it might be single maturity say 1 year. So that information can be easily sent through. The other two fields operator_type and bc_set are wierdos. Tough to get at first glance :) . Since the documentation is obsolete I tried opening up lots of header files and lots of cpp files to wrap around the code in my head. (Frankly speaking I come from C Linux Kernel Coding world so C++ is a mess to me!). Anyway if someone has followed my problem till this point do read on! Again operator_type and bc_set are members of Evolver class which can be something like CrankNicolson. So I rushed to it's header file cranknicolson.hpp to get some clues. But still I can't figure out what's operator_type or bc_set. My best guess was TridiagonalOperator class, but still that didn't work. Since most of the FD engines given in the sample examples are of useless from trading perspective I was creating more practicle ones which can be used more from static hedging perspective. So it would be really helpful if someone can help me understand at least how to initialize the generic FiniteDifferenceModel class. I guess I should send this to dev's list, but well will wait...if I don't get the reply I will forward coz i guess questions are not that simple ;) Thanks for reading, Animesh Saxena (Associate) Exotic Derivatives NOMURA |