bollinger-bands icon indicating copy to clipboard operation
bollinger-bands copied to clipboard

Incremental calculation

Open tredondo opened this issue 4 years ago • 4 comments

Is it possible to incrementally feed one point to the function and get the next result?

Like this, https://github.com/anandanand84/technicalindicators#nextvalue

tredondo avatar Apr 05 '20 16:04 tredondo

Im not going to introduce new features to this package because the performance of JavaScript is really bad especially for science mathematics.

I have migrated all my JavaScript projects for fintech to Python.

If you have interests, maybe you could check https://github.com/kaelzhang/stock-pandas, which is based on pandas and numpy

kaelzhang avatar Apr 06 '20 02:04 kaelzhang

To support incremental calculation, there must be a manager to maintain kline data which is obviously not the duty of this package.

pandas is born to manage series data, and numpy is born to do mathematical calculation with N-dimensional arrays.

They implement science calculation by visiting memory addresses directly which has much much much much higher performance than JavaScript.

kaelzhang avatar Apr 06 '20 02:04 kaelzhang

Understandable.

Maybe @deviavir would be interested in implementing this, since he published an absolutely identical package on NPM?

tredondo avatar Apr 07 '20 17:04 tredondo

Off-topic: it's ages ago, but iirc I published that to grab a new version to use in zenbot. If you look at the homepage on that NPM package you'll see that it all links back to this repo.

DeviaVir avatar Apr 07 '20 17:04 DeviaVir