cc2008 | 8 Jul 19:08

HestonDAXCalibration with dividends


Hi, 
 I've modified parts of the test-suite/hestonmodel.cpp to incorporate
dividends. Specifically, I've changed the testDAXCalibration method to
include some descrete divident values (paid at the same dates in the
program) as follows (full source code attached):

vector<Real> dividends;

for (i = 0; i < 8; ++i) {

        dates.push_back(settlementDate + t[i]);

        rates.push_back(r[i]);

        dividends.push_back(0.1); 

}

 Handle<YieldTermStructure> dividendTS(
  			    boost::shared_ptr<YieldTermStructure>(
  			    new ZeroCurve(dates, dividends, dayCounter))); 

When I run the program, it aborts. On Linux, I get the following trace using
gdb.
Continuing.
Testing Heston model calibration using DAX volatility data...

Program received signal SIGABRT, Aborted.
0x0000002a9643f479 in raise () from /lib64/tls/libc.so.6
(gdb) where
#0  0x0000002a9643f479 in raise () from /lib64/tls/libc.so.6
#1  0x0000002a96440abf in abort () from /lib64/tls/libc.so.6
#2  0x0000002a9606fca6 in __cxxabiv1::__terminate ()
   from /usr/lib64/libstdc++.so.5
#3  0x0000002a9606fcd3 in std::terminate () from /usr/lib64/libstdc++.so.5
#4  0x0000002a9606fdc3 in __cxa_throw () from /usr/lib64/libstdc++.so.5
#5  0x0000000000489b6e in InterpolatedZeroCurve (this=<value optimized out>, 
    dates=<value optimized out>, yields=<value optimized out>, 
    dayCounter=<value optimized out>, interpolator=<value optimized out>)
    at /QuantLib-0.8.1/ql/termstructures/yieldcurves/zerocurve.hpp:150
#6  0x000000000043d370 in main (argc=<value optimized out>, 
    argv=<value optimized out>) at HestonDAXCalibration.cpp:73

Could someone point out what I'm doing wrong. Thank you very much. 

http://www.nabble.com/file/p18343830/HestonDAXCalibration.cpp
HestonDAXCalibration.cpp 
--

-- 
View this message in context: http://www.nabble.com/HestonDAXCalibration-with-dividends-tp18343830p18343830.html
Sent from the quantlib-users mailing list archive at Nabble.com.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08

Gmane