vwap

Calculate the Volume-Weighted Average Price (VWAP)

  • vwap

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
vwap
1900.0.24 years ago4 years agoMinified + gzip package size for vwap in KB

Readme

vwap
Calculate the Volume-Weighted Average Price (VWAP)

Install

npm install vwap

Usage

const vwap = require('vwap')

// input: [[volume, price], [volume, price], ...]
const p = vwap([[5, 10], [13, 8.5], [10, 11]])

console.log(p) // 9.660714285714286

Test

npm test

License

MIT