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

Saturday, March 20, 2010

Installing MayaVi2

Spent hours installing mayavi from enthought. Everything installed but it refuses to run. With command

from enthought.tvtk.tools import mlab
fig = mlab.figure()

it gives error

ImportError: No module named carbon_render_window

No idea how to fix it yet. It seems to come from tvtk.

Friday, March 19, 2010

Fibonacci observation

The highly inefficient fibonacci algorithm is still quite interesting.

When computing fib(n), for k less than n fib(k) is called fib(n-k) times, except when k is 0. This is called n-2 times. The total number of calls for fib(n) is

[sum (for k less than n) fib(k)]+fib(n-2)

Quick python script to check:


def fib(n):
if d.has_key(n):
if n==0: return 1
if n==1: return 1
return fib(n-1)+fib(n-2)

Saturday, March 13, 2010

NumPy, matplotlib

Installed numpy and matplotlib. Unfortunately I upgraded my python to 2.6, so I have to recompile QuantLib-SWIG. I'd forgotten it took this long as the main file is 200k lines.

And it fails with the architecture problem, much like my matplotlib failed.

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.