On building an integrated QuantLib/Lua platform on the world's most popular computer.
Showing posts with label quantlib. Show all posts
Showing posts with label quantlib. Show all posts
Sunday, April 4, 2010
QuantLib-Python + R-Python
Is it possible to have these three objects work seamlessly? Can I move the SWIG objects pointed to in Python to R?
Saturday, April 3, 2010
Fixed QuantLib R error
Needed to chage the Date function in QuantLib.R.
The simple function: todaysDate <- Date(15, "May", 1998)
refused to run because Date (line 2088) was buggy.
Date needed to be changed. It called functions
extends(argtypes[1], 'integer')
That integer should be changed to numeric in all three cases.
The simple function: todaysDate <- Date(15, "May", 1998)
refused to run because Date (line 2088) was buggy.
Date needed to be changed. It called functions
extends(argtypes[1], 'integer')
That integer should be changed to numeric in all three cases.
Tuesday, March 9, 2010
Monday, March 8, 2010
Notes on using QuantLib-Python
I have a few notes on using QuantLib in python and (roughly) showing how it all works. I am hoping this will be useful to someone else other than me.
Wednesday, March 3, 2010
QuantLib wikipedia page
The QuantLib wikipedia page is coming up slowly. Just need more time to list all it can do.
Saturday, February 27, 2010
QuantLib R
Things seemed to go well but somehow Date is not working. I do not understand R enough to know what's wrong.
Date(15,'May',1998) produces the error
Error in Date(15, "May", 1998) : could not find function "f"
I'm running QuantLib 1.0, R version 2.10.1.
I've looked at the QuantLib.R file and the problem seems to be at lines about 2087--2108 with the following code.
`Date` <- function(...) {
argtypes <- mapply(class, list(...))
argv <- list(...)
argc <- length(argtypes)
# dispatch functions 4
if (argc == 0) {
f <- Date__SWIG_0
} else if (argc == 1) {
if (extends(argtypes[1], 'integer')) {
f <- Date__SWIG_2
}
} else if (argc == 2) {
if (extends(argtypes[1], 'character') && extends(argtypes[2], 'character')) {
f <- Date__SWIG_3
}
} else if (argc == 3) {
if (extends(argtypes[1], 'integer') && extends(argtypes[2], 'character') && extends(argtype\
s[3], 'integer')) {
f <- Date__SWIG_1
}
}
f(...)
}
Somehow f failes to be defined here.
Error in Date(15, "May", 1998) : could not find function "f"
I'm running QuantLib 1.0, R version 2.10.1.
I've looked at the QuantLib.R file and the problem seems to be at lines about 2087--2108 with the following code.
`Date` <- function(...) {
argtypes <- mapply(class, list(...))
argv <- list(...)
argc <- length(argtypes)
# dispatch functions 4
if (argc == 0) {
f <- Date__SWIG_0
} else if (argc == 1) {
if (extends(argtypes[1], 'integer')) {
f <- Date__SWIG_2
}
} else if (argc == 2) {
if (extends(argtypes[1], 'character') && extends(argtypes[2], 'character')) {
f <- Date__SWIG_3
}
} else if (argc == 3) {
if (extends(argtypes[1], 'integer') && extends(argtypes[2], 'character') && extends(argtype\
s[3], 'integer')) {
f <- Date__SWIG_1
}
}
f(...)
}
Somehow f failes to be defined here.
QuantLib python
Installed QuantLib-Python. Was relatively easy. I just followed the instructions for each package. Everything was installed in /usr/local, and /Library/Python/2.5/site-packages/QuantLib
1. Installed boost
2. Installed Quantlib
3. Installed QuantLib-SWIG (the python part)
Things seem to be going swimmingly.
Subscribe to:
Posts (Atom)