[Rquantlib-devel] Is DiscountCurve() supposed to work?

Benjamin J. J. Voigt bvoigt at gmail.com
Wed Oct 29 02:50:49 CET 2014


Hi,

running the following example (mac 10.9.*) I get a crash, both on stable
and github sources. Is there a known reason for this and how do I prevent
the error?

R-Code:
savepar <- par(mfrow = c(3, 3))

params <- list(tradeDate = c(2, 15, 2002), settleDate = c(2,
    19, 2002), dt = 0.01, interpWhat = "discount", interpHow = "loglinear")

tsQuotes <- list(d1w = 0.0382, d1m = 0.0372, fut1 = 96.2875,
    fut2 = 96.7875, fut3 = 96.9875, fut4 = 96.6875, fut5 = 96.4875,
    fut6 = 96.3875, fut7 = 96.2875, fut8 = 96.0875, s3y = 0.0398,
    s5y = 0.0443, s10y = 0.05165, s15y = 0.055175)

times <- seq(0, 10, 0.1)

DiscountCurve(params, tsQuotes, times)


R-Error:
 *** caught segfault ***
address 0x20, cause 'memory not mapped'

Traceback:
 1: .Call("RQuantLib_discountCurveEngine", PACKAGE = "RQuantLib",
rparams, tslist, times)
 2: discountCurveEngine(params, tsQuotes, times)
 3: DiscountCurve.default(params, tsQuotes, times)
 4: DiscountCurve(params, tsQuotes, times)


I am not in a hurry, just might need to think of doing this on my own, but
pricing bonds on a flat curve is not quite what regular users would like to
do when thinking about QuantLib.

Happy to provide more details if required.

Regards,
Ben

-- 
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rquantlib-devel/attachments/20141029/60e51a95/attachment.html>


More information about the Rquantlib-devel mailing list