pytafast module

pytafast.ACOS(inReal)

Vector ACOS.

pytafast.AD(inHigh, inLow, inClose, inVolume)[source]

Chaikin A/D Line.

pytafast.ADD(inReal0, inReal1)

ADD indicator.

pytafast.ADOSC(inHigh, inLow, inClose, inVolume, fastperiod=3, slowperiod=10)[source]

Chaikin A/D Oscillator.

pytafast.ADX(inHigh, inLow, inClose, timeperiod=14)

ADX indicator.

pytafast.ADXR(inHigh, inLow, inClose, timeperiod=14)

ADXR indicator.

pytafast.ALMA(inReal, timeperiod=9, offset=0.85, sigma=6.0)[source]

Arnaud Legoux Moving Average.

pytafast.APO(inReal, fastperiod=12, slowperiod=26, matype=0)[source]

Absolute Price Oscillator.

pytafast.AROON(inHigh, inLow, timeperiod=14)[source]

Aroon. Returns: (aroondown, aroonup)

pytafast.AROONOSC(inHigh, inLow, timeperiod=14)

AROONOSC indicator.

pytafast.ASIN(inReal)

Vector ASIN.

pytafast.ATAN(inReal)

Vector ATAN.

pytafast.ATR(inHigh, inLow, inClose, timeperiod=14)

ATR indicator.

pytafast.AVGDEV(inReal, timeperiod=14)

AVGDEV indicator.

pytafast.AVGPRICE(inOpen, inHigh, inLow, inClose)[source]

Average Price.

pytafast.BBANDS(inReal, timeperiod=5, nbdevup=2.0, nbdevdn=2.0, matype=MAType.SMA)[source]

Bollinger Bands. Returns: (upperband, middleband, lowerband)

pytafast.BETA(inReal0, inReal1, timeperiod=5)

BETA indicator.

pytafast.BOP(inOpen, inHigh, inLow, inClose)[source]

Balance Of Power.

pytafast.CCI(inHigh, inLow, inClose, timeperiod=14)

CCI indicator.

pytafast.CDL2CROWS(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDL2CROWS

pytafast.CDL3BLACKCROWS(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDL3BLACKCROWS

pytafast.CDL3INSIDE(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDL3INSIDE

pytafast.CDL3LINESTRIKE(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDL3LINESTRIKE

pytafast.CDL3OUTSIDE(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDL3OUTSIDE

pytafast.CDL3STARSINSOUTH(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDL3STARSINSOUTH

pytafast.CDL3WHITESOLDIERS(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDL3WHITESOLDIERS

pytafast.CDLABANDONEDBABY(inOpen, inHigh, inLow, inClose, penetration=0.3)

Candlestick Pattern: CDLABANDONEDBABY

pytafast.CDLADVANCEBLOCK(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLADVANCEBLOCK

pytafast.CDLBELTHOLD(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLBELTHOLD

pytafast.CDLBREAKAWAY(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLBREAKAWAY

pytafast.CDLCLOSINGMARUBOZU(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLCLOSINGMARUBOZU

pytafast.CDLCONCEALBABYSWALL(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLCONCEALBABYSWALL

pytafast.CDLCOUNTERATTACK(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLCOUNTERATTACK

pytafast.CDLDARKCLOUDCOVER(inOpen, inHigh, inLow, inClose, penetration=0.5)

Candlestick Pattern: CDLDARKCLOUDCOVER

pytafast.CDLDOJI(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLDOJI

pytafast.CDLDOJISTAR(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLDOJISTAR

pytafast.CDLDRAGONFLYDOJI(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLDRAGONFLYDOJI

pytafast.CDLENGULFING(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLENGULFING

pytafast.CDLEVENINGDOJISTAR(inOpen, inHigh, inLow, inClose, penetration=0.3)

Candlestick Pattern: CDLEVENINGDOJISTAR

pytafast.CDLEVENINGSTAR(inOpen, inHigh, inLow, inClose, penetration=0.3)

Candlestick Pattern: CDLEVENINGSTAR

pytafast.CDLGAPSIDESIDEWHITE(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLGAPSIDESIDEWHITE

pytafast.CDLGRAVESTONEDOJI(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLGRAVESTONEDOJI

pytafast.CDLHAMMER(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLHAMMER

pytafast.CDLHANGINGMAN(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLHANGINGMAN

pytafast.CDLHARAMI(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLHARAMI

pytafast.CDLHARAMICROSS(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLHARAMICROSS

pytafast.CDLHIGHWAVE(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLHIGHWAVE

pytafast.CDLHIKKAKE(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLHIKKAKE

pytafast.CDLHIKKAKEMOD(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLHIKKAKEMOD

pytafast.CDLHOMINGPIGEON(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLHOMINGPIGEON

pytafast.CDLIDENTICAL3CROWS(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLIDENTICAL3CROWS

pytafast.CDLINNECK(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLINNECK

pytafast.CDLINVERTEDHAMMER(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLINVERTEDHAMMER

pytafast.CDLKICKING(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLKICKING

pytafast.CDLKICKINGBYLENGTH(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLKICKINGBYLENGTH

pytafast.CDLLADDERBOTTOM(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLLADDERBOTTOM

pytafast.CDLLONGLEGGEDDOJI(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLLONGLEGGEDDOJI

pytafast.CDLLONGLINE(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLLONGLINE

pytafast.CDLMARUBOZU(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLMARUBOZU

pytafast.CDLMATCHINGLOW(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLMATCHINGLOW

pytafast.CDLMATHOLD(inOpen, inHigh, inLow, inClose, penetration=0.5)

Candlestick Pattern: CDLMATHOLD

pytafast.CDLMORNINGDOJISTAR(inOpen, inHigh, inLow, inClose, penetration=0.3)

Candlestick Pattern: CDLMORNINGDOJISTAR

pytafast.CDLMORNINGSTAR(inOpen, inHigh, inLow, inClose, penetration=0.3)

Candlestick Pattern: CDLMORNINGSTAR

pytafast.CDLONNECK(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLONNECK

pytafast.CDLPIERCING(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLPIERCING

pytafast.CDLRICKSHAWMAN(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLRICKSHAWMAN

pytafast.CDLRISEFALL3METHODS(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLRISEFALL3METHODS

pytafast.CDLSEPARATINGLINES(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLSEPARATINGLINES

pytafast.CDLSHOOTINGSTAR(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLSHOOTINGSTAR

pytafast.CDLSHORTLINE(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLSHORTLINE

pytafast.CDLSPINNINGTOP(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLSPINNINGTOP

pytafast.CDLSTALLEDPATTERN(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLSTALLEDPATTERN

pytafast.CDLSTICKSANDWICH(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLSTICKSANDWICH

pytafast.CDLTAKURI(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLTAKURI

pytafast.CDLTASUKIGAP(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLTASUKIGAP

pytafast.CDLTHRUSTING(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLTHRUSTING

pytafast.CDLTRISTAR(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLTRISTAR

pytafast.CDLUNIQUE3RIVER(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLUNIQUE3RIVER

pytafast.CDLUPSIDEGAP2CROWS(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLUPSIDEGAP2CROWS

pytafast.CDLXSIDEGAP3METHODS(inOpen, inHigh, inLow, inClose)

Candlestick Pattern: CDLXSIDEGAP3METHODS

pytafast.CEIL(inReal)

Vector CEIL.

pytafast.CMF(inHigh, inLow, inClose, inVolume, timeperiod=20)[source]

Chaikin Money Flow.

pytafast.CMO(inReal, timeperiod=14)

CMO indicator.

pytafast.CORREL(inReal0, inReal1, timeperiod=30)

CORREL indicator.

pytafast.COS(inReal)

Vector COS.

pytafast.COSH(inReal)

Vector COSH.

class pytafast.Chart(df, date_col='Date', open_col='Open', high_col='High', low_col='Low', close_col='Close', vol_col='Volume')[source]

Bases: object

A quantmod-inspired chaining chart builder for pytafast using Plotly.

THEMES = {'dark': 'plotly_dark', 'ggplot2': 'ggplot2', 'light': 'plotly_white', 'seaborn': 'seaborn', 'simple': 'simple_white'}
add_candlestick(name='Price')[source]
Return type:

TypeVar(T, bound= Chart)

add_hline(y, color='gray', dash='dash')[source]
Return type:

TypeVar(T, bound= Chart)

add_indicator(indicator_fn, *args, plotter=None, **kwargs)[source]

Generic API to compute and add an indicator to the chart. If plotter is not specified, it will look up the default plotter for the indicator in the registry.

Return type:

TypeVar(T, bound= Chart)

add_last(color='red')[source]
Return type:

TypeVar(T, bound= Chart)

add_line(name='Close Price', color=None)[source]
Return type:

TypeVar(T, bound= Chart)

add_points(x, y, name='Points', color='black', symbol='circle', size=8)[source]
Return type:

TypeVar(T, bound= Chart)

add_shading(start, end, color='rgba(128, 128, 128, 0.2)')[source]
Return type:

TypeVar(T, bound= Chart)

add_text(x, y, text, color='black', position='top center')[source]
Return type:

TypeVar(T, bound= Chart)

add_vline(x, color='gray', dash='dash')[source]
Return type:

TypeVar(T, bound= Chart)

add_volume(height=0.15)[source]
Return type:

TypeVar(T, bound= Chart)

render()[source]
Return type:

Any

save_html(filename='chart.html')[source]
Return type:

None

save_image(filename='chart.png', w=1200, h=800)[source]
Return type:

None

set_theme(theme_name)[source]

Set the chart theme (light, dark, ggplot2, seaborn).

Return type:

TypeVar(T, bound= Chart)

show()[source]
Return type:

None

pytafast.DEMA(inReal, timeperiod=30)

DEMA indicator.

pytafast.DIV(inReal0, inReal1)

DIV indicator.

pytafast.DPO(inReal, timeperiod=10)[source]

Detrended Price Oscillator.

pytafast.DX(inHigh, inLow, inClose, timeperiod=14)

DX indicator.

pytafast.DonchianChannel(inHigh, inLow, timeperiod=10)[source]

Donchian Channel. Returns: (upper, middle, lower)

pytafast.EMA(inReal, timeperiod=30)

EMA indicator.

pytafast.EMV(inHigh, inLow, inVolume, timeperiod=9, vol_divisor=10000.0)[source]

Arms’ Ease of Movement Value. Returns: (emv, smoothed_emv)

pytafast.EVWMA(inReal, inVolume, timeperiod=30)[source]

Elastic Volume Weighted Moving Average.

pytafast.EXP(inReal)

Vector EXP.

pytafast.FLOOR(inReal)

Vector FLOOR.

pytafast.GMMA(inReal)[source]

Guppy Multiple Moving Average. Returns a tuple of 12 EMA series.

pytafast.HMA(inReal, timeperiod=20)[source]

Hull Moving Average.

pytafast.HT_DCPERIOD(inReal)

HT_DCPERIOD indicator.

pytafast.HT_DCPHASE(inReal)

HT_DCPHASE indicator.

pytafast.HT_PHASOR(inReal)[source]

Hilbert Transform - Phasor Components.

pytafast.HT_SINE(inReal)[source]

Hilbert Transform - SineWave.

pytafast.HT_TRENDLINE(inReal)

HT_TRENDLINE indicator.

pytafast.HT_TRENDMODE(inReal)

HT_TRENDMODE indicator.

pytafast.KAMA(inReal, timeperiod=30)

KAMA indicator.

pytafast.KST(inReal, nROC1=10, nROC2=15, nROC3=20, nROC4=30, nAvg1=10, nAvg2=10, nAvg3=10, nAvg4=15, nSig=9)[source]

Know Sure Thing (KST). Returns: (kst, signal)

pytafast.LINEARREG(inReal, timeperiod=14)

LINEARREG indicator.

pytafast.LINEARREG_ANGLE(inReal, timeperiod=14)

LINEARREG_ANGLE indicator.

pytafast.LINEARREG_INTERCEPT(inReal, timeperiod=14)

LINEARREG_INTERCEPT indicator.

pytafast.LINEARREG_SLOPE(inReal, timeperiod=14)

LINEARREG_SLOPE indicator.

pytafast.LN(inReal)

Vector LN.

pytafast.LOG10(inReal)

Vector LOG10.

pytafast.MA(inReal, timeperiod=30, matype=0)[source]

Moving Average (generic).

pytafast.MACD(inReal, fastperiod=12, slowperiod=26, signalperiod=9)[source]

Moving Average Convergence/Divergence. Returns: (macd, signal, hist)

pytafast.MACDEXT(inReal, fastperiod=12, fastmatype=0, slowperiod=26, slowmatype=0, signalperiod=9, signalmatype=0)[source]

MACD with controllable MA type.

pytafast.MACDFIX(inReal, signalperiod=9)[source]

MACD Fix 12/26.

pytafast.MAMA(inReal, fastlimit=0.5, slowlimit=0.05)[source]

MESA Adaptive Moving Average. Returns: (mama, fama)

class pytafast.MAType(*values)

Bases: Enum

DEMA = 3
EMA = 1
KAMA = 6
MAMA = 7
SMA = 0
T3 = 8
TEMA = 4
TRIMA = 5
WMA = 2
pytafast.MAX(inReal, timeperiod=30)

MAX indicator.

pytafast.MEDPRICE(inReal0, inReal1)

MEDPRICE indicator.

pytafast.MFI(inHigh, inLow, inClose, inVolume, timeperiod=14)[source]

Money Flow Index.

pytafast.MIDPOINT(inReal, timeperiod=14)

MIDPOINT indicator.

pytafast.MIDPRICE(inHigh, inLow, timeperiod=14)

MIDPRICE indicator.

pytafast.MIN(inReal, timeperiod=30)

MIN indicator.

pytafast.MINMAX(inReal, timeperiod=30)[source]

Lowest and highest values over a specified period.

pytafast.MINMAXINDEX(inReal, timeperiod=30)[source]

Indexes of lowest and highest values over a specified period.

pytafast.MINUS_DI(inHigh, inLow, inClose, timeperiod=14)

MINUS_DI indicator.

pytafast.MINUS_DM(inHigh, inLow, timeperiod=14)

MINUS_DM indicator.

pytafast.MOM(inReal, timeperiod=10)

MOM indicator.

pytafast.MULT(inReal0, inReal1)

MULT indicator.

pytafast.NATR(inHigh, inLow, inClose, timeperiod=14)

NATR indicator.

pytafast.OBV(inReal0, inReal1)

OBV indicator.

pytafast.PLUS_DI(inHigh, inLow, inClose, timeperiod=14)

PLUS_DI indicator.

pytafast.PLUS_DM(inHigh, inLow, timeperiod=14)

PLUS_DM indicator.

pytafast.PPO(inReal, fastperiod=12, slowperiod=26, matype=0)[source]

Percentage Price Oscillator.

pytafast.ROC(inReal, timeperiod=10)

ROC indicator.

pytafast.ROCP(inReal, timeperiod=10)

ROCP indicator.

pytafast.ROCR(inReal, timeperiod=10)

ROCR indicator.

pytafast.ROCR100(inReal, timeperiod=10)

ROCR100 indicator.

pytafast.RSI(inReal, timeperiod=14)

RSI indicator.

pytafast.SAR(inHigh, inLow, acceleration=0.02, maximum=0.2)[source]

Parabolic SAR.

pytafast.SIN(inReal)

Vector SIN.

pytafast.SINH(inReal)

Vector SINH.

pytafast.SMA(inReal, timeperiod=30)

SMA indicator.

pytafast.SMI(inHigh, inLow, inClose, n=13, nFast=2, nSlow=25, nSig=9)[source]

Stochastic Momentum Index. Returns: (smi, signal)

pytafast.SNR(inHigh, inLow, inClose, timeperiod=14)[source]

Signal to Noise Ratio.

pytafast.SQRT(inReal)

Vector SQRT.

pytafast.STDDEV(inReal, timeperiod=5, nbdev=1.0)[source]

Standard Deviation.

pytafast.STOCH(inHigh, inLow, inClose, fastk_period=5, slowk_period=3, slowk_matype=MAType.SMA, slowd_period=3, slowd_matype=MAType.SMA)[source]

Stochastic. Returns: (slowk, slowd)

pytafast.STOCHF(inHigh, inLow, inClose, fastk_period=5, fastd_period=3, fastd_matype=0)[source]

Stochastic Fast.

pytafast.STOCHRSI(inReal, timeperiod=14, fastk_period=5, fastd_period=3, fastd_matype=0)[source]

Stochastic RSI.

pytafast.SUB(inReal0, inReal1)

SUB indicator.

pytafast.SUM(inReal, timeperiod=30)

SUM indicator.

pytafast.T3(inReal, timeperiod=5, vfactor=0.7)[source]

Triple Exponential Moving Average (T3).

exception pytafast.TALibError

Bases: Exception

pytafast.TAN(inReal)

Vector TAN.

pytafast.TANH(inReal)

Vector TANH.

pytafast.TEMA(inReal, timeperiod=30)

TEMA indicator.

pytafast.TRANGE(inHigh, inLow, inClose)[source]

True Range.

pytafast.TRIMA(inReal, timeperiod=30)

TRIMA indicator.

pytafast.TRIX(inReal, timeperiod=30)

TRIX indicator.

pytafast.TSF(inReal, timeperiod=14)

TSF indicator.

pytafast.TYPPRICE(inHigh, inLow, inClose)[source]

Typical Price.

pytafast.ULTOSC(inHigh, inLow, inClose, timeperiod1=7, timeperiod2=14, timeperiod3=28)[source]

Ultimate Oscillator.

pytafast.VAR(inReal, timeperiod=5, nbdev=1.0)[source]

Variance.

pytafast.VHF(inReal, timeperiod=28)[source]

Vertical Horizontal Filter.

pytafast.WCLPRICE(inHigh, inLow, inClose)[source]

Weighted Close Price.

pytafast.WILLR(inHigh, inLow, inClose, timeperiod=14)

WILLR indicator.

pytafast.WMA(inReal, timeperiod=30)

WMA indicator.

pytafast.ZIGZAG(inHigh, inLow, change=10.0, percent=True)[source]

ZigZag indicator.

pytafast.ZLEMA(inReal, timeperiod=30)[source]

Zero Lag Exponential Moving Average.

pytafast.keltnerChannels(inHigh, inLow, inClose, timeperiod=20, atr_mult=2.0)[source]

Keltner Channels. Returns: (upper, middle, lower)