Technical Analysis Library using Pandas and Numpy

Overview

CircleCI Documentation Status Coverage Status Code style: black Linter: Prospector PyPI PyPI - Downloads Donate PayPal

Technical Analysis Library in Python

It is a Technical Analysis library useful to do feature engineering from financial time series datasets (Open, Close, High, Low, Volume). It is built on Pandas and Numpy.

Bollinger Bands graph example

The library has implemented 42 indicators:

Volume

  • Money Flow Index (MFI)
  • Accumulation/Distribution Index (ADI)
  • On-Balance Volume (OBV)
  • Chaikin Money Flow (CMF)
  • Force Index (FI)
  • Ease of Movement (EoM, EMV)
  • Volume-price Trend (VPT)
  • Negative Volume Index (NVI)
  • Volume Weighted Average Price (VWAP)

Volatility

  • Average True Range (ATR)
  • Bollinger Bands (BB)
  • Keltner Channel (KC)
  • Donchian Channel (DC)
  • Ulcer Index (UI)

Trend

  • Simple Moving Average (SMA)
  • Exponential Moving Average (EMA)
  • Weighted Moving Average (WMA)
  • Moving Average Convergence Divergence (MACD)
  • Average Directional Movement Index (ADX)
  • Vortex Indicator (VI)
  • Trix (TRIX)
  • Mass Index (MI)
  • Commodity Channel Index (CCI)
  • Detrended Price Oscillator (DPO)
  • KST Oscillator (KST)
  • Ichimoku Kinkō Hyō (Ichimoku)
  • Parabolic Stop And Reverse (Parabolic SAR)
  • Schaff Trend Cycle (STC)

Momentum

  • Relative Strength Index (RSI)
  • Stochastic RSI (SRSI)
  • True strength index (TSI)
  • Ultimate Oscillator (UO)
  • Stochastic Oscillator (SR)
  • Williams %R (WR)
  • Awesome Oscillator (AO)
  • Kaufman's Adaptive Moving Average (KAMA)
  • Rate of Change (ROC)
  • Percentage Price Oscillator (PPO)
  • Percentage Volume Oscillator (PVO)

Others

  • Daily Return (DR)
  • Daily Log Return (DLR)
  • Cumulative Return (CR)

Documentation

https://technical-analysis-library-in-python.readthedocs.io/en/latest/

Motivation to use

How to use (Python 3)

$ pip install --upgrade ta

To use this library you should have a financial time series dataset including Timestamp, Open, High, Low, Close and Volume columns.

You should clean or fill NaN values in your dataset before add technical analysis features.

You can get code examples in examples_to_use folder.

You can visualize the features in this notebook.

Example adding all features

import pandas as pd
from ta import add_all_ta_features
from ta.utils import dropna


# Load datas
df = pd.read_csv('ta/tests/data/datas.csv', sep=',')

# Clean NaN values
df = dropna(df)

# Add all ta features
df = add_all_ta_features(
    df, open="Open", high="High", low="Low", close="Close", volume="Volume_BTC")

Example adding particular feature

import pandas as pd
from ta.utils import dropna
from ta.volatility import BollingerBands


# Load datas
df = pd.read_csv('ta/tests/data/datas.csv', sep=',')

# Clean NaN values
df = dropna(df)

# Initialize Bollinger Bands Indicator
indicator_bb = BollingerBands(close=df["Close"], window=20, window_dev=2)

# Add Bollinger Bands features
df['bb_bbm'] = indicator_bb.bollinger_mavg()
df['bb_bbh'] = indicator_bb.bollinger_hband()
df['bb_bbl'] = indicator_bb.bollinger_lband()

# Add Bollinger Band high indicator
df['bb_bbhi'] = indicator_bb.bollinger_hband_indicator()

# Add Bollinger Band low indicator
df['bb_bbli'] = indicator_bb.bollinger_lband_indicator()

# Add Width Size Bollinger Bands
df['bb_bbw'] = indicator_bb.bollinger_wband()

# Add Percentage Bollinger Bands
df['bb_bbp'] = indicator_bb.bollinger_pband()

Deploy and develop (for developers)

$ git clone https://github.com/bukosabino/ta.git
$ cd ta
$ pip install -r requirements-play.txt
$ make test

Sponsor

Logo OpenSistemas

Thank you to OpenSistemas! It is because of your contribution that I am able to continue the development of this open source library.

Based on

In Progress

  • Automated tests for all the indicators.

TODO

Changelog

Check the changelog of project.

Donation

If you think ta library help you, please consider buying me a coffee.

Credits

Developed by Darío López Padial (aka Bukosabino) and other contributors.

Please, let me know about any comment or feedback.

Also, I am a software engineer freelance focused on Data Science using Python tools such as Pandas, Scikit-Learn, Backtrader, Zipline or Catalyst. Don't hesitate to contact me if you need to develop something related with this library, Python, Technical Analysis, AlgoTrading, Machine Learning, etc.

Issues
  • Inaccurate Results with ADX

    Inaccurate Results with ADX

    Hi!

    Thanks for TA! Great job! It seems that i'm getting inaccurate data with ADX, at least data is different compared to cryptowatch and other sources. import krakenex import ta from pykrakenapi import KrakenAPI

    api = krakenex.API()
    k = KrakenAPI(api)
    df, last = k.get_ohlc_data("XXBTZEUR", ascending=True, interval=5)
    ohlc = ta.utils.dropna(df)
    print(ta.trend.adx(ohlc.high, ohlc.low, ohlc.close))
    

    and output is

    ...
    2018-09-25 17:35:00    22.381099
    Name: adx, Length: 720, dtype: float64
    

    while to ADX on website is for same interval/lenght is 12.54

    bug 
    opened by Zouuup 13
  • RSI has different results compared to Talib library

    RSI has different results compared to Talib library

    The RSI calculated from Ta library is different from the one that you get from Trading View. I compared the results between Ta library and Talib library and , Talib gives you the same results as in tradingview.

    bug 
    opened by asimsan 10
  • TypeError when defining MACD parameters

    TypeError when defining MACD parameters

    Hi, I am getting this error when using the parameter names 'window_slow', 'window_fast', and 'window_sign'. It works ok if I stop after the "close" parameter, but then I can't play with the window sizes. Is it something I've done wrong?

    --> 730 ind_MACD = ta.trend.MACD(close=df["close"], window_slow=26, window_fast=12, window_sign=9)

    TypeError: __init__() got an unexpected keyword argument 'window_slow'

    opened by MikeCas 9
  • API Requirements/Expectations

    API Requirements/Expectations

    Just curious on what sort of requirements or expectations you have regarding the API now and moving forward.

    • Limited to return a single Series? Is returning a DataFrame an option for indicators that return multiple series, such as MACD, BBANDs, et al?
    • Are the indicators to be decoupled and not rely on others for computation? For instance, MACD relying on SMAs?

    Thanks KJ

    opened by twopirllc 8
  • Error in MFI calculation

    Error in MFI calculation

    In your documentation, you have a link to MFI formula explanation and there you can see such text: "Money flow is positive when the typical price rises (buying pressure) and negative when the typical price declines (selling pressure)." So, you need to compare typical prices, not close prices.

    df.loc[(df['Close'] > df['Close'].shift(1, fill_value=df['Close'].mean())), 'Up_or_Down'] = 1
    df.loc[(df['Close'] < df['Close'].shift(1, fill_value=df['Close'].mean())), 'Up_or_Down'] = 2
    

    Here you need to make a comparison with tp.

    bug 
    opened by UnicornsExist 7
  • wrong cci calculation

    wrong cci calculation

    for cci calculation, we should use "mean absolute deviation (mad)" not standard deviation. please correct it. unfortunately, pandas rolling doesn't provide mad function. we have to find it by our own.

    here I'm posting my code which is used for cci calculation.

    pp = (data['CLOSE'] + data['LOW'] + data['HIGH'] )/3
    mad = lambda x : np.mean(np.abs(x-np.mean(x)))
    data['CCI']= (pp-pp.rolling(period).mean())/(0.015 * pp.rolling(period).apply(mad,True))
    
    bug 
    opened by angopinath 6
  • icichimoku future values missing?

    icichimoku future values missing?

    According to https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:ichimoku_cloud for icichimoku cloud the values are shifted forward. Where can I get these values, are they discarded?

    opened by bizso09 6
  • Parabolic Sar - feature-request

    Parabolic Sar - feature-request

    First: GREAT LIBRARY!!, @bukosabino! (better than all the others!!)

    And because of that I would be happy to find the parabolic sar from you in it. It's very complicated. I will try to code it for myself. If I'm ready with a good solution I will send it to you. But maybe you're faster! ;)

    enhancement 
    opened by TravelTrader 6
  • Add indicators and test data

    Add indicators and test data

    Adding Scheff Trend Cycle indicator Manually copy data from tradeview charts. Testing data round to 2 decimal places

    Adding Stoch RSI indicator, percentage volume oscillator, percentage price oscillator, ulcer index

    opened by lit26 5
  • New Indicator proposal: KAMA (Kaufman's Adaptive Moving Average)

    New Indicator proposal: KAMA (Kaufman's Adaptive Moving Average)

    Excellent job on developing all these indicators. Can you please add KAMA - Kaufman's Adaptive Moving Average (https://school.stockcharts.com/doku.php?id=technical_indicators:kaufman_s_adaptive_moving_average) ?

    It's an evolution of regular EMA (Esponential Moving Average).

    opened by ghost 5
  • Suggestion: Negative Volume Index can be computed without for loop

    Suggestion: Negative Volume Index can be computed without for loop

    Suggested implementation

    class NegativeVolumeIndexIndicator(IndicatorMixin):

    def __init__(self, close: pd.Series, volume: pd.Series, fillna: bool = False):
        self._close = close
        self._volume = volume
        self._fillna = fillna
        self._run()
    
    def _run(self):
        price_change = self._close.pct_change()
        vol_decrease = self._volume.shift(1) > self._volume
        nvi = np.where( 
            vol_decrease, 1+price_change , 1
         )
        nvi[0] = 1000.
        self._nvi = pd.Series(
            data=nvi.cumprod(), index=self._close.index, dtype="float64", name="nvi"
        )
    
    opened by cristiangreco94 0
  • Trix indicator fillna value is wrong

    Trix indicator fillna value is wrong

    Hello, there is probably an issue with Trix indicator, when used with fillna=True parameter, it fills the missing value with 100, but I believe it should be 0, because then it is extreme value, that is never reached with this indicator. See image bellow: image

    discussion 
    opened by Hokyjack 1
  • Definition mapping from feature name to the actual technical  indicator name?

    Definition mapping from feature name to the actual technical indicator name?

    Wondering if this already exists? If not happy to create if valuable.

    I'm looking for a mapping from the column names outputted, to the actual technical indicator it represents.

    examples: momentum_ao == "Momentum, Awesome Oscilator" momentum_kama == "Momentum, Kaufman’s Adaptive Moving Average (KAMA)"

    Can help quickly grasp what the features represent without having to refer back to documentation each time.

    Mark

    good first issue 
    opened by markdregan 1
  • Adjusted starting indices for adx_pos and adx_neg

    Adjusted starting indices for adx_pos and adx_neg

    Changed the starting index in rows 799 and 814 from 1 to 0. Otherwise, when printing the final adx together with adx_neg and adx_pos, it looked like the adx was computed based on one row too little. Computation was correct, just looked wrong.

    opened by WaldemarGrauberger 0
  • RSI, StochRSI, Bollinger Bands issue

    RSI, StochRSI, Bollinger Bands issue

    Hello, Greetings and thank you for implementing this library. I used your library and was able to compare live the values for RSI and Stochastic RSI (K,D) with other software. I noticed differences and I extracted data from TradingView and compared the results. As you can see RSI, K,D are Bollinger Bands are different. Best regards

    TradingView: RSI 49.0394593224667 K 11.5673529700911 D 21.3072238952219 Bollinger Band High 0.852205319882761 Bollinger Band Lower 0.851892680117259

      Close    rsi         k         d  bol_h     bol_l
    

    0 0.85138 NaN NaN NaN 0.0 NaN 1 0.85142 NaN NaN NaN 0.0 NaN 2 0.85135 NaN NaN NaN 0.0 NaN 3 0.85139 NaN NaN NaN 0.0 NaN 4 0.85129 NaN NaN NaN 0.0 NaN 5 0.85134 NaN NaN NaN 0.0 NaN 6 0.85146 NaN NaN NaN 0.0 NaN 7 0.85150 NaN NaN NaN 0.0 NaN 8 0.85165 NaN NaN NaN 0.0 NaN 9 0.85186 NaN NaN NaN 0.0 NaN 10 0.85148 NaN NaN NaN 0.0 NaN 11 0.85151 NaN NaN NaN 0.0 NaN 12 0.85152 NaN NaN NaN 0.0 NaN 13 0.85152 54.07 NaN NaN 0.0 NaN 14 0.85157 56.83 NaN NaN 0.0 NaN 15 0.85154 54.71 NaN NaN 0.0 NaN 16 0.85158 57.01 NaN NaN 0.0 NaN 17 0.85151 52.02 NaN NaN 0.0 NaN 18 0.85150 51.33 NaN NaN 0.0 NaN 19 0.85152 52.68 NaN NaN 0.0 0.851131 20 0.85153 53.38 NaN NaN 0.0 0.851147 21 0.85148 49.45 NaN NaN 0.0 0.851154 22 0.85141 44.50 NaN NaN 0.0 0.851167 23 0.85144 46.95 NaN NaN 0.0 0.851176 24 0.85156 55.42 NaN NaN 0.0 0.851225 25 0.85155 54.64 NaN NaN 0.0 0.851263 26 0.85189 70.11 NaN NaN 0.0 0.851204 27 0.85195 71.93 NaN NaN 0.0 0.851145 28 0.85215 76.96 NaN NaN 0.0 0.851032 29 0.85199 66.66 NaN NaN 0.0 0.851007 30 0.85194 63.79 NaN NaN 0.0 0.851000 31 0.85193 63.20 NaN NaN 0.0 0.850999 32 0.85199 65.27 NaN NaN 0.0 0.850994 33 0.85220 71.33 NaN NaN 0.0 0.850957 34 0.85211 66.01 NaN NaN 0.0 0.850948 35 0.85208 64.29 NaN NaN 0.0 0.850958 36 0.85209 64.62 NaN NaN 0.0 0.850967 37 0.85200 59.30 NaN NaN 0.0 0.851005 38 0.85204 60.84 NaN NaN 0.0 0.851050 39 0.85202 59.62 NaN NaN 0.0 0.851099 40 0.85195 55.44 0.475251 NaN 0.0 0.851155 41 0.85198 56.84 0.437024 NaN 0.0 0.851234 42 0.85204 59.57 0.421879 0.444718 0.0 0.851357 43 0.85213 63.32 0.437381 0.432095 0.0 0.851494 44 0.85214 63.72 0.445747 0.435002 0.0 0.851608 45 0.85209 60.16 0.362437 0.415188 0.0 0.851786 46 0.85215 62.85 0.325890 0.378025 0.0 0.851810 47 0.85203 54.89 0.176710 0.288346 0.0 0.851823 48 0.85213 59.49 0.192658 0.231753 0.0 0.851825 49 0.85194 49.22 0.085159 0.151509 0.0 0.851815

    opened by chdragan 1
  • VWAP implementation is of MWAP not VWAP

    VWAP implementation is of MWAP not VWAP

    Hi , First of all, Thank you for putting such a effort to implement TA lib.

    Issue: Approach to calculate VWAP is of MWAP i.e.. average price over a period of time. VWAP needs to be calculated for intraday only and its period should be 1 for first intraday candle, 2 for 2nd intraday candle n so on.

    bug 
    opened by twowheelsoul 1
  • Create a wheel version of TA

    Create a wheel version of TA

    Bloomberg BQuant platform only allows installation of the wheel version of a python library. Please, can you create a wheel version of TA library?

    good first issue 
    opened by cmj123 0
  • ADI calculation returns infinite

    ADI calculation returns infinite

    In the rare occasions that high = low, the ADI returns infinite. The fix for this is if high = low, we compare high with yesterday close to obtain the multiplier.

    opened by duc-phamh 0
  • Mistake in computing On-balance volume (OBV)

    Mistake in computing On-balance volume (OBV)

    https://github.com/bukosabino/ta/blob/84ced26e07cb676d1033703dfd81e1ee81285b07/ta/volume.py#L84

    There is a problem in computing OBV. Regarding the formula from wikipedia (and several other resources that I checked to make sure) when the close price is equal to previous close price, the amount that should be added to obv is 0 but here it adds volume.

    I know it's really rare that the close price equals the previous close price but it happens (I ran into a problem using GOOG).

    P.S. This is my first issue on the open source community, sorry for any inconvenience in advance. Also, I have the solution for this as well, if you let me do the work I'll appreciate it.

    opened by MRyderOC 0
  • Slice Copy error

    Slice Copy error

    Similar to Issue #122

    Code (were df is a pandas dataframe)

    ta.add_all_ta_features(
        df, 'BTC:open', 'BTC:high', 'BTC:low', 'BTC:close', 'BTC:volume'
    )
    

    Error:

    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_adi"] = AccDistIndexIndicator(
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\wrapper.py:94: SettingWithCopyWarning:
    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_obv"] = OnBalanceVolumeIndicator(
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\wrapper.py:99: SettingWithCopyWarning:
    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_cmf"] = ChaikinMoneyFlowIndicator(
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\wrapper.py:104: SettingWithCopyWarning:
    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_fi"] = ForceIndexIndicator(
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\wrapper.py:109: SettingWithCopyWarning: 
    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_mfi"] = MFIIndicator(
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\wrapper.py:122: SettingWithCopyWarning: 
    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_em"] = indicator_eom.ease_of_movement()
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\trend.py:768: RuntimeWarning: invalid value encountered in double_scalars
      dip[i] = 100 * (self._dip[i] / self._trs[i])
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\trend.py:772: RuntimeWarning: invalid value encountered in double_scalars
      din[i] = 100 * (self._din[i] / self._trs[i])
    

    Also tried:

    ta.add_all_ta_features(
        df,
        colprefix="LTC:",
        **{k: "LTC:" + k for k in ['open', 'high', 'low', 'close', 'volume']}
    )
    
    

    Error:

    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_adi"] = AccDistIndexIndicator(
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\wrapper.py:94: SettingWithCopyWarning: 
    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_obv"] = OnBalanceVolumeIndicator(
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\wrapper.py:99: SettingWithCopyWarning:
    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_cmf"] = ChaikinMoneyFlowIndicator(
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\wrapper.py:104: SettingWithCopyWarning:
    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_fi"] = ForceIndexIndicator(
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\wrapper.py:109: SettingWithCopyWarning: 
    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_mfi"] = MFIIndicator(
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\wrapper.py:122: SettingWithCopyWarning: 
    A value is trying to be set on a copy of a slice from a DataFrame.
    Try using .loc[row_indexer,col_indexer] = value instead
    
    See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
      df[f"{colprefix}volume_em"] = indicator_eom.ease_of_movement()
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\trend.py:768: RuntimeWarning: invalid value encountered in double_scalars
      dip[i] = 100 * (self._dip[i] / self._trs[i])
    C:\Users\UserName\.virtualenvs\A8wwRToZ\lib\site-packages\ta\trend.py:772: RuntimeWarning: invalid value encountered in double_scalars
      din[i] = 100 * (self._din[i] / self._trs[i])
    
    opened by varunpan 0
Owner
Darío López Padial
Join us now and share the software. You'll be free.
Darío López Padial
Github.com/CryptoSignal - #1 Quant Trading & Technical Analysis Bot - 2,100 + stars, 580 + forks

CryptoSignal - #1 Quant Trading & Technical Analysis Bot - 2,100 + stars, 580 + forks https://github.com/CryptoSignal/Crypto-Signal Development state:

Github.com/Signal - 2,100 + stars, 580 + forks 3.8k Feb 11, 2022
Yahoo! Finance market data downloader (+faster Pandas Datareader)

Yahoo! Finance market data downloader Ever since Yahoo! finance decommissioned their historical data API, many programs that relied on it to stop work

Ran Aroussi 6.6k Feb 9, 2022
Supply a wrapper ``StockDataFrame`` based on the ``pandas.DataFrame`` with inline stock statistics/indicators support.

Stock Statistics/Indicators Calculation Helper VERSION: 0.3.2 Introduction Supply a wrapper StockDataFrame based on the pandas.DataFrame with inline s

Cedric Zhuang 953 Feb 3, 2022
Performance analysis of predictive (alpha) stock factors

Alphalens Alphalens is a Python Library for performance analysis of predictive (alpha) stock factors. Alphalens works great with the Zipline open sour

Quantopian, Inc. 2.2k Feb 7, 2022
Zipline, a Pythonic Algorithmic Trading Library

Zipline is a Pythonic algorithmic trading library. It is an event-driven system for backtesting. Zipline is currently used in production as the backte

Quantopian, Inc. 14.9k Feb 5, 2022
ffn - a financial function library for Python

ffn - Financial Functions for Python Alpha release - please let me know if you find any bugs! If you are looking for a full backtesting framework, ple

Philippe Morissette 1.1k Feb 4, 2022
An Algorithmic Trading Library for Crypto-Assets in Python

Service Master Develop CI Badge Catalyst is an algorithmic trading library for crypto-assets written in Python. It allows trading strategies to be eas

Enigma 2.3k Feb 12, 2022
Python library for backtesting trading strategies & analyzing financial markets (formerly pythalesians)

finmarketpy (formerly pythalesians) finmarketpy is a Python based library that enables you to analyze market data and also to backtest trading strateg

Cuemacro 2.9k Feb 3, 2022
High-performance TensorFlow library for quantitative finance.

TF Quant Finance: TensorFlow based Quant Finance Library Table of contents Introduction Installation TensorFlow training Development roadmap Examples

Google 3k Feb 3, 2022
Python Backtesting library for trading strategies

backtrader Yahoo API Note: [2018-11-16] After some testing it would seem that data downloads can be again relied upon over the web interface (or API v

DRo 8.2k Feb 12, 2022
Python Algorithmic Trading Library

PyAlgoTrade PyAlgoTrade is an event driven algorithmic trading Python library. Although the initial focus was on backtesting, paper trading is now pos

Gabriel Becedillas 3.6k Feb 3, 2022
Q-Fin: A Python library for mathematical finance.

Q-Fin A Python library for mathematical finance. Installation https://pypi.org/project/QFin/ pip install qfin Bond Pricing Option Pricing Black-Schol

Roman Paolucci 74 Feb 1, 2022
Beibo is a Python library that uses several AI prediction models to predict stocks returns over a defined period of time.

Beibo is a Python library that uses several AI prediction models to predict stocks returns over a defined period of time.

Santosh 35 Jan 28, 2022
Find big moving stocks before they move using machine learning and anomaly detection

Surpriver - Find High Moving Stocks before they Move Find high moving stocks before they move using anomaly detection and machine learning. Surpriver

Tradytics 1.4k Feb 5, 2022
personal finance tracker, written in python 3 and using the wxPython GUI toolkit.

personal finance tracker, written in python 3 and using the wxPython GUI toolkit.

wenbin wu 20 Nov 15, 2021
Common financial risk and performance metrics. Used by zipline and pyfolio.

empyrical Common financial risk metrics. Table of Contents Installation Usage Support Contributing Testing Installation pip install empyrical Usage S

Quantopian, Inc. 893 Feb 4, 2022
Portfolio and risk analytics in Python

pyfolio pyfolio is a Python library for performance and risk analysis of financial portfolios developed by Quantopian Inc. It works well with the Zipl

Quantopian, Inc. 4.3k Feb 11, 2022
An open source reinforcement learning framework for training, evaluating, and deploying robust trading agents.

TensorTrade: Trade Efficiently with Reinforcement Learning TensorTrade is still in Beta, meaning it should be used very cautiously if used in producti

null 3.7k Jan 31, 2022