finta


Namefinta JSON
Version 1.3 PyPI version JSON
download
home_pagehttps://github.com/peerchemist/finta
SummaryCommon financial technical indicators implemented in Pandas.
upload_time2021-04-03 08:53:06
maintainer
docs_urlNone
authorPeerchemist
requires_python
licenseLGPLv3+
keywords technical analysis ta pandas finance numpy analysis
VCS
bugtrack_url
requirements pandas numpy
Travis-CI
coveralls test coverage No coveralls.
            # FinTA (Financial Technical Analysis)

[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)
[![PyPI](https://img.shields.io/pypi/v/finta.svg?style=flat-square)](https://pypi.python.org/pypi/finta/)
[![Downloads](https://pepy.tech/badge/finta/month)](https://pepy.tech/project/finta/month)
[![](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/download/releases/3.6.0/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![Build Status](https://travis-ci.org/peerchemist/finta.svg?branch=master)](https://travis-ci.org/peerchemist/finta)
[![Patrons](https://img.shields.io/liberapay/patrons/peerchemist.svg?logo=liberapay)](https://img.shields.io/liberapay/patrons/peerchemist.svg?logo=liberapay)

Common financial technical indicators implemented in Pandas.

![example](examples/plot.png)

*This is work in progress, bugs are expected and results of some indicators
may not be accurate.*

## Supported indicators:

Finta supports over 80 trading indicators:

```
* Simple Moving Average 'SMA'
* Simple Moving Median 'SMM'
* Smoothed Simple Moving Average 'SSMA'
* Exponential Moving Average 'EMA'
* Double Exponential Moving Average 'DEMA'
* Triple Exponential Moving Average 'TEMA'
* Triangular Moving Average 'TRIMA'
* Triple Exponential Moving Average Oscillator 'TRIX'
* Volume Adjusted Moving Average 'VAMA'
* Kaufman Efficiency Indicator 'ER'
* Kaufman's Adaptive Moving Average 'KAMA'
* Zero Lag Exponential Moving Average 'ZLEMA'
* Weighted Moving Average 'WMA'
* Hull Moving Average 'HMA'
* Elastic Volume Moving Average 'EVWMA'
* Volume Weighted Average Price 'VWAP'
* Smoothed Moving Average 'SMMA'
* Fractal Adaptive Moving Average 'FRAMA'
* Moving Average Convergence Divergence 'MACD'
* Percentage Price Oscillator 'PPO'
* Volume-Weighted MACD 'VW_MACD'
* Elastic-Volume weighted MACD 'EV_MACD'
* Market Momentum 'MOM'
* Rate-of-Change 'ROC'
* Relative Strenght Index 'RSI'
* Inverse Fisher Transform RSI 'IFT_RSI'
* True Range 'TR'
* Average True Range 'ATR'
* Stop-and-Reverse 'SAR'
* Bollinger Bands 'BBANDS'
* Bollinger Bands Width 'BBWIDTH'
* Momentum Breakout Bands 'MOBO'
* Percent B 'PERCENT_B'
* Keltner Channels 'KC'
* Donchian Channel 'DO'
* Directional Movement Indicator 'DMI'
* Average Directional Index 'ADX'
* Pivot Points 'PIVOT'
* Fibonacci Pivot Points 'PIVOT_FIB'
* Stochastic Oscillator %K 'STOCH'
* Stochastic oscillator %D 'STOCHD'
* Stochastic RSI 'STOCHRSI'
* Williams %R 'WILLIAMS'
* Ultimate Oscillator 'UO'
* Awesome Oscillator 'AO'
* Mass Index 'MI'
* Vortex Indicator 'VORTEX'
* Know Sure Thing 'KST'
* True Strength Index 'TSI'
* Typical Price 'TP'
* Accumulation-Distribution Line 'ADL'
* Chaikin Oscillator 'CHAIKIN'
* Money Flow Index 'MFI'
* On Balance Volume 'OBV'
* Weighter OBV 'WOBV'
* Volume Zone Oscillator 'VZO'
* Price Zone Oscillator 'PZO'
* Elder's Force Index 'EFI'
* Cummulative Force Index 'CFI'
* Bull power and Bear Power 'EBBP'
* Ease of Movement 'EMV'
* Commodity Channel Index 'CCI'
* Coppock Curve 'COPP'
* Buy and Sell Pressure 'BASP'
* Normalized BASP 'BASPN'
* Chande Momentum Oscillator 'CMO'
* Chandelier Exit 'CHANDELIER'
* Qstick 'QSTICK'
* Twiggs Money Index 'TMF'
* Wave Trend Oscillator 'WTO'
* Fisher Transform 'FISH'
* Ichimoku Cloud 'ICHIMOKU'
* Adaptive Price Zone 'APZ'
* Squeeze Momentum Indicator 'SQZMI'
* Volume Price Trend 'VPT'
* Finite Volume Element 'FVE'
* Volume Flow Indicator 'VFI'
* Moving Standard deviation 'MSD'
* Schaff Trend Cycle 'STC'
```

## Dependencies:

-   python (3.6+)
-   pandas (1.0.0+)

TA class is very well documented and there should be no trouble
exploring it and using with your data. Each class method expects proper `ohlc` DataFrame as input.

## Install:

`pip install finta`

or latest development version:

`pip install git+git://github.com/peerchemist/finta.git`

## Import

`from finta import TA`

Prepare data to use with finta:

finta expects properly formated `ohlc` DataFrame, with column names in `lowercase`:
["open", "high", "low", "close"] and ["volume"] for indicators that expect `ohlcv` input.

### to resample by time period (you can choose different time period)
`ohlc = resample(df, "24h")`

### You can also load a ohlc DataFrame from .csv file

`data_file = ("data/bittrex:btc-usdt.csv")`

`ohlc = pd.read_csv(data_file, index_col="date", parse_dates=True)`

____________________________________________________________________________

## Examples:

### will return Pandas Series object with the Simple moving average for 42 periods
`TA.SMA(ohlc, 42)`

### will return Pandas Series object with "Awesome oscillator" values
`TA.AO(ohlc)`

### expects ["volume"] column as input
`TA.OBV(ohlc)`

### will return Series with Bollinger Bands columns [BB_UPPER, BB_LOWER]
`TA.BBANDS(ohlc)`

### will return Series with calculated BBANDS values but will use KAMA instead of MA for calculation, other types of Moving Averages are allowed as well.
`TA.BBANDS(ohlc, TA.KAMA(ohlc, 20))`


For more examples see examples directory.

------------------------------------------------------------------------

I welcome pull requests with new indicators or fixes for existing ones.
Please submit only indicators that belong in public domain and are
royalty free.

## Contributing

1. Fork it (https://github.com/peerchemist/finta/fork)
2. Study how it's implemented.
3. Create your feature branch (`git checkout -b my-new-feature`).
4. Run [black](https://github.com/ambv/black) code formatter on the finta.py to ensure uniform code style.
5. Commit your changes (`git commit -am 'Add some feature'`).
6. Push to the branch (`git push origin my-new-feature`).
7. Create a new Pull Request.

------------------------------------------------------------------------

## Donate

Buy me a beer 🍺:

Bitcoin: 3NibjuvQPzcfuLaefhUEEFBcmHpXgKgs4m

Peercoin: P9dAfWoxT7kksKAStubDQR6RhdXk5z12rV



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/peerchemist/finta",
    "name": "finta",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "technical analysis,ta,pandas,finance,numpy,analysis",
    "author": "Peerchemist",
    "author_email": "peerchemist@protonmail.ch",
    "download_url": "https://files.pythonhosted.org/packages/98/76/b3051112722b50b1900e16eb5784714cd96b19d26b0518a0375036458bcb/finta-1.3.tar.gz",
    "platform": "",
    "description": "# FinTA (Financial Technical Analysis)\n\n[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)\n[![PyPI](https://img.shields.io/pypi/v/finta.svg?style=flat-square)](https://pypi.python.org/pypi/finta/)\n[![Downloads](https://pepy.tech/badge/finta/month)](https://pepy.tech/project/finta/month)\n[![](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/download/releases/3.6.0/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![Build Status](https://travis-ci.org/peerchemist/finta.svg?branch=master)](https://travis-ci.org/peerchemist/finta)\n[![Patrons](https://img.shields.io/liberapay/patrons/peerchemist.svg?logo=liberapay)](https://img.shields.io/liberapay/patrons/peerchemist.svg?logo=liberapay)\n\nCommon financial technical indicators implemented in Pandas.\n\n![example](examples/plot.png)\n\n*This is work in progress, bugs are expected and results of some indicators\nmay not be accurate.*\n\n## Supported indicators:\n\nFinta supports over 80 trading indicators:\n\n```\n* Simple Moving Average 'SMA'\n* Simple Moving Median 'SMM'\n* Smoothed Simple Moving Average 'SSMA'\n* Exponential Moving Average 'EMA'\n* Double Exponential Moving Average 'DEMA'\n* Triple Exponential Moving Average 'TEMA'\n* Triangular Moving Average 'TRIMA'\n* Triple Exponential Moving Average Oscillator 'TRIX'\n* Volume Adjusted Moving Average 'VAMA'\n* Kaufman Efficiency Indicator 'ER'\n* Kaufman's Adaptive Moving Average 'KAMA'\n* Zero Lag Exponential Moving Average 'ZLEMA'\n* Weighted Moving Average 'WMA'\n* Hull Moving Average 'HMA'\n* Elastic Volume Moving Average 'EVWMA'\n* Volume Weighted Average Price 'VWAP'\n* Smoothed Moving Average 'SMMA'\n* Fractal Adaptive Moving Average 'FRAMA'\n* Moving Average Convergence Divergence 'MACD'\n* Percentage Price Oscillator 'PPO'\n* Volume-Weighted MACD 'VW_MACD'\n* Elastic-Volume weighted MACD 'EV_MACD'\n* Market Momentum 'MOM'\n* Rate-of-Change 'ROC'\n* Relative Strenght Index 'RSI'\n* Inverse Fisher Transform RSI 'IFT_RSI'\n* True Range 'TR'\n* Average True Range 'ATR'\n* Stop-and-Reverse 'SAR'\n* Bollinger Bands 'BBANDS'\n* Bollinger Bands Width 'BBWIDTH'\n* Momentum Breakout Bands 'MOBO'\n* Percent B 'PERCENT_B'\n* Keltner Channels 'KC'\n* Donchian Channel 'DO'\n* Directional Movement Indicator 'DMI'\n* Average Directional Index 'ADX'\n* Pivot Points 'PIVOT'\n* Fibonacci Pivot Points 'PIVOT_FIB'\n* Stochastic Oscillator %K 'STOCH'\n* Stochastic oscillator %D 'STOCHD'\n* Stochastic RSI 'STOCHRSI'\n* Williams %R 'WILLIAMS'\n* Ultimate Oscillator 'UO'\n* Awesome Oscillator 'AO'\n* Mass Index 'MI'\n* Vortex Indicator 'VORTEX'\n* Know Sure Thing 'KST'\n* True Strength Index 'TSI'\n* Typical Price 'TP'\n* Accumulation-Distribution Line 'ADL'\n* Chaikin Oscillator 'CHAIKIN'\n* Money Flow Index 'MFI'\n* On Balance Volume 'OBV'\n* Weighter OBV 'WOBV'\n* Volume Zone Oscillator 'VZO'\n* Price Zone Oscillator 'PZO'\n* Elder's Force Index 'EFI'\n* Cummulative Force Index 'CFI'\n* Bull power and Bear Power 'EBBP'\n* Ease of Movement 'EMV'\n* Commodity Channel Index 'CCI'\n* Coppock Curve 'COPP'\n* Buy and Sell Pressure 'BASP'\n* Normalized BASP 'BASPN'\n* Chande Momentum Oscillator 'CMO'\n* Chandelier Exit 'CHANDELIER'\n* Qstick 'QSTICK'\n* Twiggs Money Index 'TMF'\n* Wave Trend Oscillator 'WTO'\n* Fisher Transform 'FISH'\n* Ichimoku Cloud 'ICHIMOKU'\n* Adaptive Price Zone 'APZ'\n* Squeeze Momentum Indicator 'SQZMI'\n* Volume Price Trend 'VPT'\n* Finite Volume Element 'FVE'\n* Volume Flow Indicator 'VFI'\n* Moving Standard deviation 'MSD'\n* Schaff Trend Cycle 'STC'\n```\n\n## Dependencies:\n\n-   python (3.6+)\n-   pandas (1.0.0+)\n\nTA class is very well documented and there should be no trouble\nexploring it and using with your data. Each class method expects proper `ohlc` DataFrame as input.\n\n## Install:\n\n`pip install finta`\n\nor latest development version:\n\n`pip install git+git://github.com/peerchemist/finta.git`\n\n## Import\n\n`from finta import TA`\n\nPrepare data to use with finta:\n\nfinta expects properly formated `ohlc` DataFrame, with column names in `lowercase`:\n[\"open\", \"high\", \"low\", \"close\"] and [\"volume\"] for indicators that expect `ohlcv` input.\n\n### to resample by time period (you can choose different time period)\n`ohlc = resample(df, \"24h\")`\n\n### You can also load a ohlc DataFrame from .csv file\n\n`data_file = (\"data/bittrex:btc-usdt.csv\")`\n\n`ohlc = pd.read_csv(data_file, index_col=\"date\", parse_dates=True)`\n\n____________________________________________________________________________\n\n## Examples:\n\n### will return Pandas Series object with the Simple moving average for 42 periods\n`TA.SMA(ohlc, 42)`\n\n### will return Pandas Series object with \"Awesome oscillator\" values\n`TA.AO(ohlc)`\n\n### expects [\"volume\"] column as input\n`TA.OBV(ohlc)`\n\n### will return Series with Bollinger Bands columns [BB_UPPER, BB_LOWER]\n`TA.BBANDS(ohlc)`\n\n### will return Series with calculated BBANDS values but will use KAMA instead of MA for calculation, other types of Moving Averages are allowed as well.\n`TA.BBANDS(ohlc, TA.KAMA(ohlc, 20))`\n\n\nFor more examples see examples directory.\n\n------------------------------------------------------------------------\n\nI welcome pull requests with new indicators or fixes for existing ones.\nPlease submit only indicators that belong in public domain and are\nroyalty free.\n\n## Contributing\n\n1. Fork it (https://github.com/peerchemist/finta/fork)\n2. Study how it's implemented.\n3. Create your feature branch (`git checkout -b my-new-feature`).\n4. Run [black](https://github.com/ambv/black) code formatter on the finta.py to ensure uniform code style.\n5. Commit your changes (`git commit -am 'Add some feature'`).\n6. Push to the branch (`git push origin my-new-feature`).\n7. Create a new Pull Request.\n\n------------------------------------------------------------------------\n\n## Donate\n\nBuy me a beer \ud83c\udf7a:\n\nBitcoin: 3NibjuvQPzcfuLaefhUEEFBcmHpXgKgs4m\n\nPeercoin: P9dAfWoxT7kksKAStubDQR6RhdXk5z12rV\n\n\n",
    "bugtrack_url": null,
    "license": "LGPLv3+",
    "summary": "Common financial technical indicators implemented in Pandas.",
    "version": "1.3",
    "project_urls": {
        "Homepage": "https://github.com/peerchemist/finta"
    },
    "split_keywords": [
        "technical analysis",
        "ta",
        "pandas",
        "finance",
        "numpy",
        "analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "068b94331e5e8f4e6ba2690658d4a65db0a254a89117756337316ce8f6b2026b",
                "md5": "fe5effed027337930ecdd9e403155483",
                "sha256": "b94b94df311c18bf5402eb2fe8fd2db5e1bdaff08baf58a7367d05c7abdd10d3"
            },
            "downloads": -1,
            "filename": "finta-1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fe5effed027337930ecdd9e403155483",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 29186,
            "upload_time": "2021-04-03T08:53:04",
            "upload_time_iso_8601": "2021-04-03T08:53:04.802284Z",
            "url": "https://files.pythonhosted.org/packages/06/8b/94331e5e8f4e6ba2690658d4a65db0a254a89117756337316ce8f6b2026b/finta-1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9876b3051112722b50b1900e16eb5784714cd96b19d26b0518a0375036458bcb",
                "md5": "2dd2b06e3c6cc19f48d9fcafe8f92534",
                "sha256": "f2fa0673748f4be8f57e57cf6d5c00a4d44bc6071ea69dbb9a1d329d045cbba2"
            },
            "downloads": -1,
            "filename": "finta-1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "2dd2b06e3c6cc19f48d9fcafe8f92534",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 29255,
            "upload_time": "2021-04-03T08:53:06",
            "upload_time_iso_8601": "2021-04-03T08:53:06.226528Z",
            "url": "https://files.pythonhosted.org/packages/98/76/b3051112722b50b1900e16eb5784714cd96b19d26b0518a0375036458bcb/finta-1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-04-03 08:53:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "peerchemist",
    "github_project": "finta",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "0.21.1"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": []
        }
    ],
    "lcname": "finta"
}
        
Elapsed time: 0.18687s