Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
performance boost to WMA and IFT_RSI
Browse files Browse the repository at this point in the history
  • Loading branch information
peerchemist committed Oct 21, 2020
1 parent cc3385b commit e65409f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions finta/finta.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def WMA(cls, ohlc: DataFrame, period: int = 9, column: str = "close") -> Series:
"""

d = (period * (period + 1)) / 2 # denominator
weights = pd.Series(np.arange(1, period + 1))
weights = np.arange(1, period + 1)

def linear(w):
def _compute(x):
Expand Down Expand Up @@ -694,7 +694,7 @@ def IFT_RSI(

# v2 = WMA(wma_period) of v1
d = (wma_period * (wma_period + 1)) / 2 # denominator
weights = pd.Series(np.arange(1, wma_period + 1))
weights = np.arange(1, wma_period + 1)

def linear(w):
def _compute(x):
Expand Down

0 comments on commit e65409f

Please sign in to comment.