On building an integrated QuantLib/Lua platform on the world's most popular computer.

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

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.

Tuesday, February 23, 2010

I've started the wikipedia page for QuantLib. I hope it survives.

Building QuantLib on the Mac

My latest project is building QuantLib on the Mac using XCode.

It's now working, details are forthcoming very soon.

Another interesting addition to the project would be to recompile QuantLib for Mathematica to work on the Mac. Original Windows source is at http://www.nielses.dk/quantlib/mma/