Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaelzhang/s-deviation
Utility to calculate standard deviation.
https://github.com/kaelzhang/s-deviation
fintech math math-library standard-deviation
Last synced: 20 days ago
JSON representation
Utility to calculate standard deviation.
- Host: GitHub
- URL: https://github.com/kaelzhang/s-deviation
- Owner: kaelzhang
- License: other
- Created: 2015-12-15T07:50:54.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-03-02T03:16:37.000Z (almost 4 years ago)
- Last Synced: 2024-12-06T05:16:35.256Z (28 days ago)
- Topics: fintech, math, math-library, standard-deviation
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/kaelzhang/s-deviation.svg?branch=master)](https://travis-ci.org/kaelzhang/s-deviation)
[![Coverage](https://codecov.io/gh/kaelzhang/s-deviation/branch/master/graph/badge.svg)](https://codecov.io/gh/kaelzhang/s-deviation)# WARNING
This module is lack of maintainance.
If you are familiar with python programming maybe you could check [**stock-pandas**](https://github.com/kaelzhang/stock-pandas) which provides powerful statistic indicators support, and is backed by [`numpy`](https://numpy.org/) and [`pandas`](https://pandas.pydata.org/).
The performance of [**stock-pandas**](https://github.com/kaelzhang/stock-pandas) is many times higher than JavaScript libraries, and can be directly used by machine learning programs.
****
# s-deviation
Math utility to calculate [standard deviations](https://en.wikipedia.org/wiki/Standard_deviation), especially for fintech.
## Install
```sh
$ npm install s-deviation
```## Usage
```js
import sd from 's-deviation'sd([1, 2, 4, 8], 2) // [<1 empty item>, 0.5, 1, 2]
sd([1, 2, 3, 4, 5, 6], 4)
// [
// <3 empty items>,
// 1.118033988749895,
// 1.118033988749895,
// 1.118033988749895
// ]
```## sd(datum, size)
- **datum** `Array.` the collection of data
- **size** `Number` the sample size ofReturns `Array.` the array of standard deviations.
## Related Modules
- [bollinger-bands](https://www.npmjs.com/package/bollinger-bands): Fintach math utility to calculate bollinger bands.
- [s-deviation](https://www.npmjs.com/package/s-deviation): Math utility to calculate standard deviations.
- [moving-averages](https://www.npmjs.com/package/moving-averages): The complete collection of utility methods for [Moving average](https://en.wikipedia.org/wiki/Moving_average).## License
MIT