Skip to main content

Technical Indicator Library

Project description

pyti

This library contains various financial technical indicators that can be used to analyze data.

Requires Python 3.10 or newer (tested on 3.10–3.14). The only runtime dependency is numpy.

Note: version 0.3.0 is a breaking release. Several indicators were fixed or reworked to match their textbook definitions, so numeric output differs from 0.2.x and a few functions take new high/low arguments. See CHANGELOG.md for the full list.

The complete list of indicators in this library:

Accumulation/Distribution
Aroon
  -Aroon Up
  -Aroon Down
Average Directional Index
Average True Range
Average True Range Percent
Bollinger Bands
  -Upper Bollinger Band
  -Middle Bollinger Band
  -Lower Bollinger Band
  -Bandwidth
  -Percent Bandwidth
  -Range
  -%B
Chaikin Money Flow
Chande Momentum Oscillator
Commodity Channel Index
Detrended Price Oscillator
Double Exponential Moving Average
Double Smoothed Stochastic
Exponential Moving Average
Hull Moving Average
Ichimoku Cloud
  -TenkanSen
  -KijunSen
  -Chiku Span
  -Senkou A
  -Senkou B
Keltner Bands
  -Bandwidth
  -Center Band
  -Upper Band
  -Lower Band
Linear Weighted Moving Average
Momentum
Money Flow
Money Flow Index
Moving Average Convergence Divergence
Moving Average Envelope
  -Upper Band
  -Center Band
  -Lower Band
Negative Directional Index (-DI)
Negative Directional Movement (-DM)
On Balance Volume
Positive Directional Index (+DI)
Positive Directional Movement (+DM)
Price Channels
  -Upper Price Channel
  -Lower Price Channel
Price Oscillator
Simple Moving Average
Smoothed Moving Average
Standard Deviation
Standard Variance
Stochastic
  -%K
  -%D
StochRSI
Rate of Change
Relative Strength Index
Triangular Moving Average
Triple Exponential Moving Average
True Range
Typical Price
Ultimate Oscillator
Vertical Horizontal Filter
Volatility
Volume Adjusted Moving Average
Volume Index
  -Positive Volume Index
  -Negative Volume Index
Volume Oscillator
Weighted Moving Average
Williams %R

Install using pip:

pip install pyti

Simple example usage of library:

from pyti.exponential_moving_average import exponential_moving_average as ema

data = [6, 7, 3, 6, 3, 9, 5]
period = 2
res = ema(data, period)

# res = [nan, 6.5, 4.1667, 5.3889, 3.7963, 7.2654, 5.7551]

Running the test suite (uses uv, or any venv with pytest and pandas installed):

uv run pytest

To run a single test:

uv run pytest tests/test_file_you_want_to_test.py::TestClassName::test_method_name

If there is an indicator that you would like to see added or believe there is an error in one of the existing ones, feel free to submit it to Issues. If you would like to add your own indicator, fork the project and submit a pull request. Contributions are always welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyti-0.3.0.tar.gz (168.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyti-0.3.0-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file pyti-0.3.0.tar.gz.

File metadata

  • Download URL: pyti-0.3.0.tar.gz
  • Upload date:
  • Size: 168.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyti-0.3.0.tar.gz
Algorithm Hash digest
SHA256 41de82d33aa66ffe7503665f7daa50839c3022754c5112289c5613d702002759
MD5 abbe75f9254ae3c91c448c58c3f31e89
BLAKE2b-256 5040570b6e0c1f8182e78e5a8b6d1f84c7c75454b4cc2e87a323bb53d993d8e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyti-0.3.0.tar.gz:

Publisher: release.yml on kylejusticemagnuson/pyti

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyti-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pyti-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyti-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66a47cb3964bf62b2cf76162b7a538881bdd93490a787f63911e55a345647e77
MD5 71f4c0207e2b504420e3ea1da21d4fb9
BLAKE2b-256 30adc9aa9d86f160e426c2d74201be830f094c85920c10d17a1ba060dddda86a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyti-0.3.0-py3-none-any.whl:

Publisher: release.yml on kylejusticemagnuson/pyti

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page