On building an integrated QuantLib/Lua platform on the world's most popular computer.
Monday, July 26, 2010
Thursday, July 15, 2010
Day counter
The most extensive financial daycounter available on the iPhone. See images at
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.
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.
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:
d={}
def fib(n):
if d.has_key(n):
d[n]=d[n]+1
else:
d[n]=1
if n==0: return 1
if n==1: return 1
return fib(n-1)+fib(n-2)
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:
d={}
def fib(n):
if d.has_key(n):
d[n]=d[n]+1
else:
d[n]=1
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.
Labels:
matplotlib,
numpy,
python
Subscribe to:
Posts (Atom)