# quantlib.js

> QuantLib in Pure JavaScript

Latest version **0.1.2** (published 2017-01-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install quantlib.js
pnpm add quantlib.js
yarn add quantlib.js
bun add quantlib.js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2017-01-23 |
| First published | 2017-01-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.12 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jerry Jin |
| Maintainers | jerryyangjin |
| Keywords | QuantLib |

## Links

- npm: https://www.npmjs.com/package/quantlib.js
- Repository: https://github.com/quantlibjs/quantlibjs
- Homepage: https://github.com/quantlibjs/quantlibjs#readme
- Issues: http://github.com/quantlibjs/quantlibjs/issues
- npm.io page: https://npm.io/package/quantlib.js

## Recent versions

- 0.1.2 (latest) — 2017-01-23
- 0.1.1 — 2017-01-20
- 0.1.0 — 2017-01-19

## README

# QuantLib in Pure JavaScript [![npm version](https://badge.fury.io/js/quantlib.js.svg)](https://www.npmjs.com/package/quantlib.js) [![Bower version](https://badge.fury.io/bo/quantlib.js.svg)](https://qunatlibjs.com) [![Twitter Follow](https://img.shields.io/twitter/follow/quantlibjs.svg?style=social&maxAge=3600)](https://twitter.com/quantlibjs)


> This project is still at very early stage, **DO Expect Bugs**

> Template classes, enumerations will be added for later

## Getting started

```sh
npm install quantlib.js
```

or

```sh
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](http://quantlib.org/) project.

use `new` to create object

```js
// create a new Matrix object
var m1 = new $ql.Matrix({
                          "rows":6,
                          "columns":9
                        });
```

```sh
> m1
Matrix { ptr: 13611328 }
> m1.rows();
6
> m1.columns();
9
```

#### 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

```js
// Calendar is TARGET's base class
var tgt = new $ql.TARGET();
var d = new $ql.Date({"d":19,"m":3,"y":2014});
// calling menthods from base class
tgt.isHoliday({"d":d});
tgt.isBusinessday({"d":d});
```

---
_Source: https://npm.io/package/quantlib.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
