vsaveris / trading-technical-indicators

Trading Technical Indicators python library
https://www.trading-technical-indicators.org/
MIT License
121 stars 34 forks source link

Optimize indicators with long calculation times. #3

Closed vsaveris closed 3 years ago

vsaveris commented 3 years ago

Tasks:

The task is targeting planned release: 0.2 stable-release (01-01-2021)

Technical Indicators calculation times, for 3169 trading days.

vsaveris commented 3 years ago

DirectionalMovementIndex optimized and calculation time dropped from 4.58 seconds to 0.47 seconds.

vsaveris commented 3 years ago

Linear regression optimization (using statsmodels instead of scikit-learn). Below indicators calculations improved:

vsaveris commented 3 years ago

RelativeStrengthIndex optimized from Calculation time = 1.06 seconds to 0.35 seconds

vsaveris commented 3 years ago

CommodityChannelIndex optimized from Calculation time = 0.94 seconds to 0.80 seconds

vsaveris commented 3 years ago

ParabolicSAR optimized from Calculation time = 2.72 seconds to 0.18 seconds.

vsaveris commented 3 years ago

ProjectionBands optimized from Calculation time = 2.97 seconds to 1.02 seconds ProjectionOscillator optimized from Calculation time = 2.95 seconds to 1.01 seconds

vsaveris commented 3 years ago

Regression tests executed after finishing all the code updates:

Ran 1558 tests in 152.756s

OK

91% lines coverage

Updates ready for release (stable release 0.2).