[关闭]
@Channelchan 2017-11-25T15:37:43.000000Z 字数 742 阅读 28805

TA_Lib


什么是技术分析?

量化是技术分析最好的体现

定义: '技术分析是指以市场行为为研究对象,以判断市场趋势并跟随趋势的周期性变化来进行股票及一切金融衍生物交易决策的方法的总和。'


TA_Lib提供什么样的函数?

  1. 重叠研究(Overlap Studies)
  2. 动能指标(Momentum Indicators)
  3. 周期指标(Cycle Indicators)
  4. 成交量指标(Volume Indicators)
  5. 波动率指标(Volatility Indicators)
  6. 数学操作(Math Operators)
  7. 数学变换(Math Transform)
  8. 统计功能(Statistic Functions)
  9. 价格转换(Price Transform)
  10. 形态识别(Pattern Recognition)

TA_Lib需要什么样的数据格式?

  1. 'numpy.ndarray'
  2. dataframe

常用代码

  1. import talib as ta
  2. import tushare as ts
  3. data = ts.get_k_data('600036', start='2016-01-01', end='2016-01-31', ktype='D',autype='qfq')
  4. #读取'numpy.ndarray'
  5. ta.MA(data.close.values, 2)
  6. #直接读取DataFrame,默认读取cloumns名为close的数据。
  7. ta.abstract.MA(data, 2)

Github: https://github.com/mrjbq7/ta-lib

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注