利用python炒股talib_TaLib在股票技术分析中的应用

1、TaLib与技术分析技术分析是股票分析十分有效直接的手段,在实际投资中我们常常需要计算各种简单或复杂的技术指标来分析参考

对于技术指标的定义基本都大同小异,很多都是通用的且模块化的东西

对于不会写代码或者不想自己写函数计算这些技术指标的人而言,强大的Talib给我们带来了福音

只需要调用Talib的函数,输入简单的参数就可以得到自己想要的结果

2、初看Talib

先简单看看Talib都给我们提供了那些计算技术指标的函数,按技术指标的类型列示如下:

Overlap Studies Functions

BBANDS - Bollinger Bands

upperband, middleband, lowerband = BBANDS(close, timeperiod=5, nbdevup=2, nbdevdn=2, matype=0)

DEMA - Double Exponential Moving Average

real = DEMA(close, timeperiod=30)

EMA - Exponential Moving Average

real = EMA(close, timeperiod=30)

HT_TRENDLINE - Hilbert Transform - Instantaneous Trendline

real = HT_TRENDLINE(close)

KAMA - Kaufman Adaptive Moving Average

real = KAMA(close, timeperiod=30)

MA - Moving average

real = MA(close, timeperiod=30, matype=0)

MAMA - MESA Adaptive Moving Average

mama, fama = MAMA(close, fastlimit=0, slowlimit=0)

MAVP - Moving average with variable period

real = MAVP(close, periods, minperiod=2, maxperiod=30, matype=0)

MIDPOINT - MidPoint over period

real = MIDPOINT(close, timeperiod=14)

MIDPRICE - Midpoint Price over period

real = MIDPRICE(high, low, timeperiod=14)

SAR - Parabolic SAR

real = SAR(high, low, acceleration=0, maximum=0)

SAREXT - Parabolic SAR - Extended

real = SAREXT(high, low, startvalue=0, offsetonreverse=0, accelerationinitlong=0,

accelerationlong=0, accelerationmaxlong=0, accelerationinitshort=0, accelerationshort=0, accelerationmaxshort=0)

SMA - Simple Moving Average

real = SMA(close, timeperiod=30)

T3 - Triple Exponential Moving Average (T3)

real = T3(close, timeperiod=5, vfactor=0)

TEMA - Triple Exponential Moving Average

real = TEMA(close, timeperiod=30)

TRIMA - Triangular Moving Average

real = TRIMA(close, timeperiod=30)

WMA - Weighted Moving Average

real = WMA(close, timeperiod=30)

Momentum Indicator Functions

ADX - Average Directional Movement Index

real = ADX(high, low, close, timeperiod=14)

ADXR - Average Directional Movement Index Rating

real = ADXR(high, low, close, ti

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值