QuantLib in Pure JavaScript
This project is still at very early stage, DO Expect Bugs
Template classes, enumerations will be added for later
Getting started
npm install quantlib.js
or
bower install quantlib.js
Usage
Load the library
- Browser
$ql
will be created after loading js file
- Node.js
var $ql = require('quantlib.js');
Class
class names are same as QuantLib project.
use new
to create object
// create a new Matrix objectvar m1 = "rows":6 "columns":9 ;
> m1Matrix
Function Overloading
Function names are same as QuantLib, and all functions takes one parameter: opts
If function has no paramter, just call it without paramter, otherwise pass a JSON
object to the function, in this object put paramter: value
elements, the paramter name must match QuantLib functions.
Inheritance
// Calendar is TARGET's base classvar tgt = ;var d = "d":19"m":3"y":2014;// calling menthods from base classtgt;tgt;