You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
Some functions (especially ones which use Pandas.Series and DataFrame instead on numpy arrays) are very slow.
I have OHLCV dataset with 26k records and I'm having such execution times with default parameters:
WMA - 25.37s
HMA - 75.044s
SAR - 14.03s
CCI - 64.758s
SQZMI - 6.877s
MFI - 7.054s
IFT_RSI - 25.08s
Could be that there are other slow functions, but I tested the same dataset on just these ones and performance was pretty good: SMA, EMA, DEMA, TEMA, ZLEMA, VWAP, SMMA, BBANDS, KC, DO, TP, CHANDELIER, APZ, TRIX, KST, TSI, ER, MACD, VW_MACD, EV_MACD, MOM, AO, CHAIKIN, RSI, STOCHRSI, STC, CMO, QSTICK, WTO, ATR, VORTEX, COPP are under 0.1s;
KAMA and UO just a bit more than 1s.
I did some experiments and at least in a case of WMA and IFT_RSI I've got time about 0.3s for a really small adjustment in code: weights = pd.Series(np.arange(1, period + 1)) replace with weights = np.arange(1, period + 1)
For CCI adding raw=True increases speed drastically (about x60-x70): mad = tp_rolling.apply(lambda s: abs(s - s.mean()).mean(), raw=True)
The text was updated successfully, but these errors were encountered:
I really like your project, but I'm too lazy to contribute normally by making pull request, sorry for that...
So, just as an idea for optimizing MFI, SQZMI and SAR:
MFI:
Some functions (especially ones which use Pandas.Series and DataFrame instead on numpy arrays) are very slow.
I have OHLCV dataset with 26k records and I'm having such execution times with default parameters:
WMA - 25.37s
HMA - 75.044s
SAR - 14.03s
CCI - 64.758s
SQZMI - 6.877s
MFI - 7.054s
IFT_RSI - 25.08s
Could be that there are other slow functions, but I tested the same dataset on just these ones and performance was pretty good: SMA, EMA, DEMA, TEMA, ZLEMA, VWAP, SMMA, BBANDS, KC, DO, TP, CHANDELIER, APZ, TRIX, KST, TSI, ER, MACD, VW_MACD, EV_MACD, MOM, AO, CHAIKIN, RSI, STOCHRSI, STC, CMO, QSTICK, WTO, ATR, VORTEX, COPP are under 0.1s;
KAMA and UO just a bit more than 1s.
I did some experiments and at least in a case of WMA and IFT_RSI I've got time about 0.3s for a really small adjustment in code:
weights = pd.Series(np.arange(1, period + 1))
replace withweights = np.arange(1, period + 1)
For CCI adding
raw=True
increases speed drastically (about x60-x70):mad = tp_rolling.apply(lambda s: abs(s - s.mean()).mean(), raw=True)
The text was updated successfully, but these errors were encountered: