• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

quantlib 0.8 question

Joined
5/22/08
Messages
2
Points
11
Hi, i am using the quantlib 0.8 market model implementation. I use two MultiProductMultiStep - Instances for two collection of instruments. If I add any one of them (but only one!) to MultiProductComposite, finalize and simulate, everythings fine. But if I add both of them, I get an "vector subscript out of range" exception. Think this must be a quantlib bug, because adding only one collection works fine. Anyone has a hint for me?
Thx a lot in advance
Peter
 
ok, found the bug in my own code....
(( the nextTimeStep() - implementation in your own products must return true for all steps _greater_ or equal than the last necessary step. if you only have one component it suffices to return true for the last step (because the evolver stops then), if you have more than one component there might be time steps after that very step (because of other components needing this step)... ))
Thx for thinking about that anyway
Peter
 
i agree that this is sub-optimal. I'll try to find some time to fix it.
 
The current version (from SVN) has

if (isInSubset_[n][currentIndex_] && !i->done) {

which would suggest that once a product has terminated then it won't be called again.

Was it different in release 0.8?
 
Back
Top