ta-lib

移植 Python 量化交易 TA-Lib 库到函数计算

隐身守侯 提交于 2019-12-24 15:35:28
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> TA-Lib ,全称“Technical Analysis Library”, 即技术分析库,是 Python 金融量化的高级库,涵盖了 150 多种股票、期货交易软件中常用的技术分析指标,如 MACD、RSI、KDJ、动量指标、布林带等等。 TA-Lib 可分为 10 个子板块: Overlap Studies(重叠指标) Momentum Indicators(动量指标) Volume Indicators(交易量指标) Cycle Indicators(周期指标) Price Transform(价格变换) Volatility Indicators(波动率指标) Pattern Recognition(模式识别) Statistic Functions(统计函数) Math Transform(数学变换) Math Operators(数学运算) 本文介绍通过 Funcraft 的模板将 Python 量化交易库 TA-lib 移植到 函数计算 。 依赖工具 本项目是在 MacOS 下开发的,涉及到的工具是平台无关的,对于 Linux 和 Windows 桌面系统应该也同样适用。在开始本例之前请确保如下工具已经正确的安装,更新到最新版本,并进行正确的配置。 Docker Funcraft 对于

MACD Function Returning Incorrect Values

♀尐吖头ヾ 提交于 2019-12-17 19:24:00
问题 I am trying to use PHPs trader functions (available as a PECL extension) to calculate the moving average convergence/divergence (MACD) of various securities. However, the values returned do not seem to match my calculations. Consider the following array of close prices for a stock: $close = array ( 0 => 459.99, 1 => 448.85, 2 => 446.06, 3 => 450.81, 4 => 442.8, 5 => 448.97, 6 => 444.57, 7 => 441.4, 8 => 430.47, 9 => 420.05, 10 => 431.14, 11 => 425.66, 12 => 430.58, 13 => 431.72, 14 => 437.87,

C# Ta-Lib Exponential Moving average(EMA) calculation

谁都会走 提交于 2019-12-12 04:32:44
问题 I am using the Ta-lib library in my C# project to calculate Exponential moving averages. I have to calculate EMA for 20 periods. I did my calculation on a spreadsheet (Excel) and I got the correct result; while using the same data points with ta-lib library I am getting wrong result. I am using close price from the attached image. Core.Ema(startIdx, endIdx, close, 20, out outBegIdx, out outNBElement, smoothClose); after running ta-lib function my result is 113.783380952381 0 0 0 0 0 0 0 0 0 0

install python talib library in azure kudu

佐手、 提交于 2019-12-11 17:23:16
问题 I keep failing to install talib library in Azure's Kudu Debug console. From D:\home\python364x86 I ran python -m pip install Ta-Lib but got this error Command "D:\home\python364x86\python.exe -u -c "import setuptools, tokenize; file ='D:\local\Temp\pip-build-az9dvnof\talib\setup.py';f=getattr(tokenize, 'open', open)( file );code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file , 'exec'))" install --record D:\local\Temp\pip-1737i4ol-record\install-record.txt --single-version

How to install TA-lib in google colab?

爷,独闯天下 提交于 2019-12-11 13:40:55
问题 I'm trying to install TA-Lib package in google colab notebook but without success. I tried this guide and also Installing TA-Lib on python x64 I get this error: import platform print (platform.architecture()) import sys print(sys.version) !pip install C:/ta-lib/TA_Lib-0.4.17-cp36-cp36m-win_amd64.whl ######### ('64bit', '') 3.6.3 (default, Oct 3 2017, 21:45:48) [GCC 7.2.0] Requirement 'C:/ta-lib/TA_Lib-0.4.17-cp36-cp36m-win_amd64.whl' looks like a filename, but the file does not exist TA_Lib-0

Installing TA-Lib on python x64

若如初见. 提交于 2019-12-10 18:35:49
问题 I'm trying to install TA-Lib on Python, i'm using a x64 version so i can't install Ta-Lib using pip. I'm following these steps to run it but i have not clear the step 4: "Build the library nmake". I have opened the prompt but i don't really know how to build nmake , can anyone help me? 回答1: nmake is the make version of the Microsoft Compiler Collection. You probably don't have Visual Studio installed. See here: https://www.lfd.uci.edu/~gohlke/pythonlibs/ You have several precompiled packages,

Pyalgotrade - TA-LIB - Indicator Returns “NONE”

懵懂的女人 提交于 2019-12-08 13:04:18
问题 I'm working with Pyalgotrade to test a trading strategy in python. Pyalgotrade allows for the use of a library called TA-LIB,which is a technical analysis library. For some reason, when I use the PPO indicator it returns "None". The indicator takes in a few arguments:(http://gbeced.github.io/pyalgotrade/docs/v0.12/html/talib.html) I provided a snippet of the output which for now is only the closing stock price of the day and what was supposed to be the output from this indicator. 'DDD' is the

How to run Ta-Lib on multiple columns of a Pandas dataframe?

寵の児 提交于 2019-12-07 16:23:28
问题 I have a data frame with the price of several securities as columns and I can't find a solution to run TA-Lib in one shot because it needs numpy.ndarray. How can I run TA-Lib over multiple securities and get a data frame in return? import talib as ta d = {'security1': [1,2,8,9,8,5], 'security2': [3,8,5,4,3,5]} df = pd.DataFrame(data=d) df Out[518]: security1 security2 0 1 3 1 2 8 2 8 5 3 9 4 4 8 3 5 5 5 ta.EMA(df, 2) TypeError: Argument 'real' has incorrect type (expected numpy.ndarray, got

Python TA-Lib install problems

可紊 提交于 2019-12-01 06:26:55
Frustratingly having a lot of difficult installing the TA-Lib package in python. https://pypi.python.org/pypi/TA-Lib I have read through all the forum posts I can find on this but no such luck for my particular problem.. Windows 10 Python 3.5.2 Anaconda 4.2.0 Cython 0.24.1 Microsoft Visual Studio 14.0 I have downloaded and extracted ta-lib-0.4.0-msvc.zip to C:/TA-Lib (common problems seem to be people not installing the underlying TA-Lib file http://www.ta-lib.org/hdr_dw.html ) If someone could help me solve this I would be very appreciative! Using 'pip install ta-lib' I get the following: C:

[问题解决] talib/_ta_lib.c:526:28: fatal error: ta-lib/ta_defs.h: 没有那个文件或目录

你。 提交于 2019-11-30 18:04:56
获取源码库 sudo wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz 解压进入目录 tar -zxvf ta-lib-0.4.0-src.tar.gz cd ta-lib/ 编译安装 sudo ./configure --prefix=/usr sudo make sudo make install 重新安装python的TA-Lib库 pip install TA-Lib 来源: https://my.oschina.net/gain/blog/3113115