femtotrader / pandas_talib Goto Github PK
View Code? Open in Web Editor NEWA Python Pandas implementation of technical analysis indicators
License: MIT License
A Python Pandas implementation of technical analysis indicators
License: MIT License
Create unit tests to compare results of this Pandas implementation of TA-Lib with results of TA-Lib Python wrapper
Here is the log:
$pip install pandas_talib
Collecting pandas-talib
Could not find a version that satisfies the requirement pandas-talib (from versions: )
No matching distribution found for pandas-talib
When I tried to install pandas_tali using the command "pip install pandas_talib" I get the following error:
" Could not find a version that satisfies the requirement pandas_talib (from versions: )
No matching distribution found for pandas_talib"
Could anyone help?
Hi,
I was reviewing the code. I found some pep8 violations in the code (which I'm fixing).
I recommend to add this https://landscape.io
Also I recommend to view this video https://www.youtube.com/watch?v=wf-BqAjZb8M
I was excited to see pandas_talib, as it's obviously needed, until I went to install it.
I will not, under any condition, install 107 packages (weighing 132 Mbytes compressed) and a language I don't have or like, to convert a 2940 byte README file into rst: 45bytes compressed installation for each byte converted! No matter what the problem is, pandoc is not the solution.
Please either convert the readme file to RST by hand, or if you really want to make the setup.py file overly-engineered, with additional setup dependencies that are unnecessary, try creole with:
https://github.com/jedie/python-creole/wiki/Use-In-Setup
It's purely Pythonic, has no Haskell, and is 106 packages weighing 132 Mbytes lighter!!!
:-)
Two mode should exists:
For now, there is only "join results with input DataFrame"
There is some while
loops.
Move to for
loops (with enumerate
) or ideally (if possible) remove loops using Numpy / Pandas
$ nosetests -s -v tests.test_pandas_talib:test_indicator_ROC
raises
Arrays are not almost equal to 7 decimals
x and y nan location mismatch:
x: array([ nan, nan, -1.6632517e-02, -1.7376779e-03,
-8.6422326e-04, -6.5179861e-03, -1.9357306e-02, -1.4724111e-03,
2.5237212e-02, 4.0374865e-02, 1.4385414e-02, -2.9944823e-02,...
y: array([ nan, nan, nan, -2.3665359e+00,
4.5841804e-01, -1.3623165e+00, -1.3147031e+00, -1.4223587e+00,
1.8396280e+00, 4.5821285e+00, 3.4569644e+00, -1.0468660e+00,...
Provide help, docstring...
see also TA-Lib/ta-lib-python#67
see #1
For continuous integration with Travis-CI apt package ta-lib
should be allowed
https://github.com/travis-ci/apt-package-whitelist#package-approval-process
What is current status of TA-Lib Debian package ?
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=437177
see
Hi everyone,,
I am confused by the results. It seems there are multiple versions of MACD calculation to me. If not, why are they different? Please helps
print(p_df.head())
c
timestamp
2017-04-19 2852.0
2017-04-20 2889.0
2017-04-21 2928.0
2017-04-24 2928.0
2017-04-25 2949.0
p_arr = np.array(p)
from pandas_talib import pandas_talib as pdta
macd1 = pdta.MACD(p_df, 12, 26, price='c')
print(macd1.tail(10))
c MACD_12_26 MACDsign_12_26 MACDdiff_12_26
timestamp
2017-10-17 3738.0 -27.479893 -44.220449 16.740556
2017-10-18 3688.0 -27.154199 -40.807199 13.653000
2017-10-19 3604.0 -33.289945 -39.303748 6.013803
2017-10-20 3776.0 -23.997889 -36.242576 12.244687
2017-10-23 3699.0 -22.586382 -33.511337 10.924955
2017-10-24 3740.0 -17.952636 -30.399597 12.446961
2017-10-25 3705.0 -16.909496 -27.701577 10.792081
2017-10-26 3649.0 -20.366536 -26.234569 5.868032
2017-10-27 3577.0 -28.586273 -26.704910 -1.881363
2017-10-30 3571.0 -35.179075 -28.399743 -6.779332
import talib
macd2 = np.vstack(talib.MACD(p_arr, 12, 26, 9))
macd2 = pd.DataFrame(macd2.T, index=p_df.index, columns=['macd','macdsignal','macdhist'])
macd2 = p_df.join(macd2)
print(macd2.tail(10))
c macd macdsignal macdhist
timestamp
2017-10-17 3738.0 -27.384079 -44.076077 16.691997
2017-10-18 3688.0 -27.065785 -40.674018 13.608233
2017-10-19 3604.0 -33.208822 -39.180979 5.972157
2017-10-20 3776.0 -23.922497 -36.129283 12.206786
2017-10-23 3699.0 -22.516715 -33.406769 10.890054
2017-10-24 3740.0 -17.888063 -30.303028 12.414965
2017-10-25 3705.0 -16.849797 -27.612382 10.762585
2017-10-26 3649.0 -20.311556 -26.152217 5.840661
2017-10-27 3577.0 -28.535880 -26.628949 -1.906930
2017-10-30 3571.0 -35.132875 -28.329735 -6.803141
Tests are failing at line 85, at the tail of test_indicator_ATR.
I am new to your library and how should I use it. I didn't find any documentation regarding that
is this the correct
import pandas_talib
mom=MOM(df_aapl,3)
rsi= RSI(df_aapl,3)
ma=MA(df_aapl,3)
except momentum indicator all other indicators dosent work and giving error
Merging code with other projects might be considered
this is the code im using
from get_data import get_klines
import numpy
import pandas_ta as ta
ticker ='BTCUSDT'
interval = '15m'
depth = "20 hours ago UTC+3"
df =get_klines (ticker ,interval,depth)
print(df)
data = df.ta.vp(df['Close'],df['Volume'],width=10)
print(data)
the error
File "c:/Users/DELL/Desktop/begging/test.py", line 14, in
data = df.ta.vp(df['Close'],df['Volume'],width=10)
TypeError: vp() got multiple values for argument 'width'
anyhelp
When i try to import I get the following error:
ValueError Traceback (most recent call last)
in
----> 1 import talib as ta
~\anaconda3\lib\site-packages\talib_init_.py in
50 return wrapper
51
---> 52 from ._ta_lib import (
53 _ta_initialize, _ta_shutdown, MA_Type, ta_version,
54 _ta_set_unstable_period as set_unstable_period,
talib_ta_lib.pyx in init talib._ta_lib()
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
I am running Python 3.8.5 and Numpy version 1.19.5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.