talib 中文文档(三):talib 方法大全

talib 中文文档(三):talib 方法大全,第1张

talib 中文文档(三):talib 方法大全 Function API Examples

Similar to TA-Lib, the function interface provides a lightweight wrapper of
the exposed TA-Lib indicators.
类似于TA库,对函数接口进行了一个轻量级的封装,用于公开的ta-lib的指标。


Each function returns an output array and have default values for their
parameters, unless specified as keyword arguments. Typically, these functions
will have an initial "lookback" period (a required number of observations
before an output is generated) set to NaN.
每个函数都默认需要输入数组,并为它们提供默认值。


参数,除非指定为关键字参数。


通常,这些函数 会有一个初步的“lookback”时期(观测所需数量 在生成一个输出之前),设置为“NaN”。


All of the following examples use the function API:
所有的API函数的使用,都需引入库文件:

import numpy
import talib

close = numpy.random.random(100)

计算收盘价的一个简单移动平均数SMA:

output = talib.SMA(close)

计算布林线,三指数移动平均:

from talib import MA_Type

upper, middle, lower = talib.BBANDS(close, matype=MA_Type.T3)

计算收盘价的动量,时间为5:

output = talib.MOM(close, timeperiod=5)

方法类型分组:

  • Overlap Studies
  • Momentum Indicators
  • Volume Indicators
  • Volatility Indicators
  • Pattern Recognition
  • Cycle Indicators
  • Statistic Functions
  • Price Transform
  • Math Transform
  • Math Operators

作者:HuaRongSAO
链接:https://www.jianshu.com/p/0e1dc3fbbbe2
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/586329.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-12
下一篇 2022-04-12

发表评论

登录后才能评论

评论列表(0条)

保存