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

Thursday, April 11, 2013

Call for testers!

I am in the process of testing the application QuantLua in preparation for release in the next few weeks. If you would like to test it then please contact me on tgwena(a)gmail.com and we can make arrangements.

Hurry! Space is limited (by Apple)

Monday, April 8, 2013

Life on the big(ger) screen (iPhone 5)

The iPhone 5 display provides more space for bigger, better graphs. Look at the examples below:



Sunday, March 24, 2013

iPhone 5 and instruction manual

Just completed porting to iPhone 5. Running on a dual core machine presented interesting challenges.

Also put up a draft of the instruction manual.


Sunday, February 3, 2013

Feature list.

This is a comprehensive summary of the features found in Financial Game (provisional name, subject to change)

1. A programmable simulation engine using historical stock prices




2. A comprehensive calculator with the following

      a. Programmable in Lua, a stable mature language well suited to financial calculations.




      b. Full access to the QuantLib financial library





     c. Extensive graphics capabilities, including line graphs, pie charts, bar graphs.



     d. Access to historical stock and currency data





Thursday, January 31, 2013

Running two historical simulations

Running two simulations of IBM starting from 1981 going through the 1987 crash.

The code for the first simulation:

local s=stock("ibm")

local p=currpf()

if s:price(-1)>s:price() and p/s<10 then

  _=p+10*s

end


if s:price(-1) <s:price() and p/s>0 then

  _=p-10*s

end

This code is run daily and does the following: Buy 10 IBM stock if yesterday's price is higher than today, otherwise sell if yesterday's price is lower. This is essentially bucking the trend. This is the blue line.

The second simulation does the opposite (this is the red line):

local s=stock("ibm")

local P=currpf()

if s:price()>s:price(-1) and P/s<10 then

  _=P+10*s

end


if s:price()<s:price(-1) and P/s>0 then

  _=P-10*s

end 

The results of the simulation are in the graph below:



A note on the code.

A stock object is created simply by saying 'stock(symbolstring)' e.g. 'stock("ibm")'. Adding or subtracting assets to a portfolio is done by a regular +, so the line

       _=P+10*s

simply adds ten shares of s to the portfolio P.

Dividing a portfolio by a stock give a count of how many shares are in that portfolio.
P/s is the count of the number of share in P.




Latest screenshot:


Sunday, January 27, 2013

Followers