title | author | date |
---|---|---|
jhTAlib |
Joost Hoeks |
2019-03-17 |
Technical Analysis Library Time-Series
You can use and import it for your:
-
Technical Analysis Software
-
Charting Software
-
Backtest Software
-
Trading Robot Software
-
Trading Software in general
Work in progress...
From PyPI:
$ [sudo] pip3 install jhtalib
From source:
$ git clone https://github.com/joosthoeks/jhTAlib.git
$ cd jhTAlib
$ [sudo] pip3 install -e .
From PyPI:
$ [sudo] pip3 install --upgrade jhtalib
From source:
$ cd jhTAlib
$ git pull [upstream master]
$ cd example/
$ python3 example-1-plot.py
or
https://colab.research.google.com/github/joosthoeks/jhTAlib/blob/master/example/example-1-plot.ipynb
$ python3 example-2-plot.py
or
https://colab.research.google.com/github/joosthoeks/jhTAlib/blob/master/example/example-2-plot.ipynb
$ python3 example-3-plot.py
or
https://colab.research.google.com/github/joosthoeks/jhTAlib/blob/master/example/example-3-plot.ipynb
$ python3 example-4-plot-quandl.py
or
$ python3 example-5-plot-quandl.py
or
$ python3 example-6-plot-quandl.py
or
$ python3 example-7-quandl-2-df.py
or
$ python3 example-8-alphavantage-2-df.py
or
$ python3 example-9-cryptocompare-2-df.py
or
DF NumPy Pandas
$ cd test/
$ python3 test.py
import jhtalib as jhta
dict of lists = jhta.ATH(df, price='High')
dict of lists = jhta.LMC(df, price='Low')
-
dict of lists = jhta.PP(df)
-
https://en.wikipedia.org/wiki/Pivot_point_(technical_analysis)
dict of lists = jhta.FIBOPR(df, price='Close')
dict of lists = jhta.GANNPR(df, price='Close')
-
jdn = jhta.JDN(utc_year, utc_month, utc_day)
-
jd = jhta.JD(utc_year, utc_month, utc_day, utc_hour, utc_minute, utc_second)
-
list = jhta.TS(df, n, price='Close')
-
https://www.fmlabs.com/reference/default.htm?url=TrendScore.htm
dict of tuples = jhta.CSV2DF(csv_file_path)
dict of tuples = jhta.CSVURL2DF(csv_file_url)
csv file = jhta.DF2CSV(df, csv_file_path)
dict of tuples = jhta.DF2DFREV(df)
dict of tuples = jhta.DF2DFWIN(df, start=0, end=10)
dict of tuples = jhta.DF_HEAD(df, n=5)
dict of tuples = jhta.DF_TAIL(df, n=5)
dict of tuples = jhta.DF2HEIKIN_ASHI(df)
-
list = jhta.ASI(df, L)
-
book: New Concepts in Technical Trading Systems
-
list = jhta.SI(df, L)
-
book: New Concepts in Technical Trading Systems
list = jhta.JH_SAVGP(df)
list = jhta.JH_SAVGPS(df)
list = jhta.JH_SCO(df)
list = jhta.JH_SCOS(df)
list = jhta.JH_SMEDP(df)
list = jhta.JH_SMEDPS(df)
list = jhta.JH_SPP(df, price='Close')
list = jhta.JH_SPPS(df, price='Close')
list = jhta.JH_STYPP(df)
list = jhta.JH_STYPPS(df)
list = jhta.JH_SWCLP(df)
list = jhta.JH_SWCLPS(df)
-
list = jhta.NORMALIZE(df, price_max='High', price_min='Low', price='Close')
-
https://machinelearningmastery.com/normalize-standardize-time-series-data-python/
-
list = jhta.STANDARDIZE(df, price='Close')
-
https://machinelearningmastery.com/normalize-standardize-time-series-data-python/
list = jhta.SPREAD(df1, df2, price1='Close', price2='Close')
-
list = jhta.CP(df1, df2, price1='Close', price2='Close')
-
https://www.fmlabs.com/reference/default.htm?url=CompPerformance.htm
-
list = jhta.CRSI(df1, df2, n, price1='Close', price2='Close')
-
list = jhta.CS(df1, df2, price1='Close', price2='Close')
-
https://www.fmlabs.com/reference/default.htm?url=CompStrength.htm
-
float = jhta.HR(hit_trades_int, total_trades_int)
-
float = jhta.PLR(mean_trade_profit_float, mean_trade_loss_float)
-
float = jhta.EV(hitrade_float, mean_trade_profit_float, mean_trade_loss_float)
-
int = jhta.POR(hitrade_float, profit_loss_ratio_float)
-
book: Computer Analysis of the Futures Markets
print = jhta.INFO(df, price='Close')
print = jhta.INFO_TRADES(profit_trades_list, loss_trades_list)
list = jhta.EXP(df, price='Close')
list = jhta.LOG(df, price='Close')
list = jhta.LOG10(df, price='Close')
list = jhta.SQRT(df, price='Close')
list = jhta.ACOS(df, price='Close')
list = jhta.ASIN(df, price='Close')
list = jhta.ATAN(df, price='Close')
list = jhta.COS(df, price='Close')
list = jhta.SIN(df, price='Close')
list = jhta.TAN(df, price='Close')
list = jhta.ACOSH(df, price='Close')
list = jhta.ASINH(df, price='Close')
list = jhta.ATANH(df, price='Close')
list = jhta.COSH(df, price='Close')
list = jhta.SINH(df, price='Close')
list = jhta.TANH(df, price='Close')
float = jhta.PI()
float = jhta.E()
float = jhta.TAU()
float = jhta.PHI()
list = jhta.CEIL(df, price='Close')
list = jhta.FLOOR(df, price='Close')
list = jhta.DEGREES(df, price='Close')
list = jhta.RADIANS(df, price='Close')
list = jhta.ADD(df)
list = jhta.DIV(df)
list = jhta.MAX(df, n, price='Close')
list = jhta.MIN(df, n, price='Close')
list = jhta.MULT(df)
list = jhta.SUB(df)
list = jhta.SUM(df, n, price='Close')
-
list = jhta.APO(df, n_fast, n_slow, price='Close')
-
https://www.fmlabs.com/reference/default.htm?url=PriceOscillator.htm
-
list = jhta.IMI(df)
-
list = jhta.MOM(df, n, price='Close')
-
https://www.fmlabs.com/reference/default.htm?url=Momentum.htm
list = jhta.ROC(df, n, price='Close')
list = jhta.ROCP(df, n, price='Close')
list = jhta.ROCR(df, n, price='Close')
-
list = jhta.ROCR100(df, n, price='Close')
-
https://www.fmlabs.com/reference/default.htm?url=RateOfChange.htm
-
list = jhta.RSI(df, n, price='Close')
-
list = jhta.STOCH(df, n, price='Close')
-
https://www.fmlabs.com/reference/default.htm?url=Stochastic.htm
-
list = jhta.WILLR(df, n)
-
https://www.fmlabs.com/reference/default.htm?url=WilliamsR.htm
-
dict of lists = jhta.BBANDS(df, n, f=2)
-
https://www.fmlabs.com/reference/default.htm?url=Bollinger.htm
-
list = jhta.BBANDW(df, n, f=2)
-
https://www.fmlabs.com/reference/default.htm?url=BollingerWidth.htm
-
dict of lists = jhta.ENVP(df, pct=.01, price='Close')
-
https://www.fmlabs.com/reference/default.htm?url=EnvelopePct.htm
-
list = jhta.MIDPOINT(df, n, price='Close')
-
list = jhta.MIDPRICE(df, n)
-
list = jhta.MMR(df, n=200, price='Close')
-
list = jhta.SAR(df, af_step=.02, af_max=.2)
-
book: New Concepts in Technical Trading Systems
-
list = jhta.SMA(df, n, price='Close')
-
https://www.fmlabs.com/reference/default.htm?url=SimpleMA.htm
-
list = jhta.TRIMA(df, n, price='Close')
-
https://www.fmlabs.com/reference/default.htm?url=TriangularMA.htm
-
list = jhta.AVGPRICE(df)
-
https://www.fmlabs.com/reference/default.htm?url=AvgPrices.htm
-
list = jhta.MEDPRICE(df)
-
https://www.fmlabs.com/reference/default.htm?url=MedianPrices.htm
-
list = jhta.TYPPRICE(df)
-
https://www.fmlabs.com/reference/default.htm?url=TypicalPrices.htm
-
list = jhta.WCLPRICE(df)
-
https://www.fmlabs.com/reference/default.htm?url=WeightedCloses.htm
list = jhta.MEAN(df, n, price='Close')
list = jhta.HARMONIC_MEAN(df, n, price='Close')
list = jhta.MEDIAN(df, n, price='Close')
list = jhta.MEDIAN_LOW(df, n, price='Close')
list = jhta.MEDIAN_HIGH(df, n, price='Close')
list = jhta.MEDIAN_GROUPED(df, n, price='Close', interval=1)
list = jhta.MODE(df, n, price='Close')
list = jhta.PSTDEV(df, n, price='Close', mu=None)
list = jhta.PVARIANCE(df, n, price='Close', mu=None)
list = jhta.STDEV(df, n, price='Close', xbar=None)
list = jhta.VARIANCE(df, n, price='Close', xbar=None)
-
float = jhta.COV(list1, list2)
-
https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Covariance
-
list = jhta.COVARIANCE(df1, df2, n, price1='Close', price2='Close')
-
https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Covariance
float = jhta.COR(list1, list2)
list = jhta.CORRELATION(df1, df2, n, price1='Close', price2='Close')
float = jhta.PCOR(list1, list2)
list = jhta.PCORRELATION(df1, df2, n, price1='Close', price2='Close')
-
float = jhta.BETA(list1, list2)
-
list = jhta.BETAS(df1, df2, n, price1='Close', price2='Close')
-
list = jhta.LSR(df, price='Close', predictions_int=0)
-
https://www.mathsisfun.com/data/least-squares-regression.html
-
list = jhta.SLR(df, price='Close', predictions_int=0)
-
https://machinelearningmastery.com/implement-simple-linear-regression-scratch-python/
-
list = jhta.ATR(df, n)
-
list = jhta.TRANGE(df)
-
list = jhta.AD(df)
-
https://www.fmlabs.com/reference/default.htm?url=AccumDist.htm
-
list = jhta.OBV(df)