fisher#

fisher(high, low, length=None, signal=None, offset=None, **kwargs)[source]#

Fisher Transform (FISHT)

Attempts to identify significant price reversals by normalizing prices over a user-specified number of periods. A reversal signal is suggested when the the two lines cross.

Sources:

TradingView (Correlation >99%)

Calculation:
Default Inputs:

length=9, signal=1

HL2 = hl2(high, low) HHL2 = HL2.rolling(length).max() LHL2 = HL2.rolling(length).min()

HLR = HHL2 - LHL2 HLR[HLR < 0.001] = 0.001

position = ((HL2 - LHL2) / HLR) - 0.5

v = 0 m = high.size FISHER = [npNaN for _ in range(0, length - 1)] + [0] for i in range(length, m):

v = 0.66 * position[i] + 0.67 * v if v < -0.99: v = -0.999 if v > 0.99: v = 0.999 FISHER.append(0.5 * (nplog((1 + v) / (1 - v)) + FISHER[i - 1]))

SIGNAL = FISHER.shift(signal)

Args:

high (pd.Series): Series of ‘high’s low (pd.Series): Series of ‘low’s length (int): Fisher period. Default: 9 signal (int): Fisher Signal period. Default: 1 offset (int): How many periods to offset the result. Default: 0

Kwargs:

fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method

Returns:

pd.Series: New feature generated.