QuantLua

Lua/QuantLib Scipting


The language

The language used in this simulation is Lua, a compact easy language. Below are the links to understanding the languange and how it is used within this simulator.

This implementation has been extended via Quantlib and Penlight.


Navigating scripts

The script navigator is accessed via the Calculator tab, or through "attaching" a script to a portfolio.

The scripts are organized in a heierachical structure. Subfolders of scripts are marked with chevron at the right. The scripts size and version are shown below the name. Tapping a script brings up the script editor.

Tapping a folder shows the list of scripts in that folder. The parent folder is accessed by tapping the first row in light blue.

At the top right is a folder button which provides the following script management functions:


Editing scripts

The script editor screen is divided in two parts. The top is for editing, and the bottom is for the output (usually via the Lua print function). At the top right is the button to end editing or run a script. When a script is running the simulation clock on the bottom left turns brown. This button also stops a running script.

Tapping on a row on the bottom give you the choice to copy that row to the clipboard. Swiping gives the choice to erase that row or the entire output.

The function clear() programmatically clears the output window.