@terces/gluon
v0.0.1-snapshot
Published
Finance Compute Engine
Downloads
2
Readme
Gluon
Finance Compute Engine
Install
$ npm i @terces/gluon
Usage
Ex-Post
Returns
import { computeReturns, TimeSeries } from '@terces/gluon';
...
const prices: TimeSeries = [{
date: new Date("2020-01-01"),
value: 14.65
},{
date: new Date("2020-01-02"),
value: 15.49
},{
date: new Date("2020-01-03"),
value: 16.65
}];
const returns = computeReturns(prices);
Performances
import { computePerformances, TimeSeries } from '@terces/gluon';
...
const returns: TimeSeries = [{
date: new Date("2020-01-02"),
value: 0.021392
},{
date: new Date("2020-01-01"),
value: 0.021492
},{
date: new Date("2020-01-03"),
value: 0.021292
}];
// if input series is not sorted, for one time compute only, you can set sorted to false
const performancesBase100 = computePerformances(returns, 100, false);
Author
Terceser - GitHub
License
TODO
- ExPost measures
- ExAnte
- Beta
- Rolling Correlation
- Use a lib like decimaljs to fix floating point precision