Stock Indicators for Python

PyPI code coverage

Stock Indicators for Python is a library that produces financial market technical indicators. Send in historical price quotes and get back desired indicators such as moving averages, Relative Strength Index, Stochastic Oscillator, Parabolic SAR, etc. Nothing more.

It can be used in any market analysis software using standard OHLCV price quotes for equities, commodities, forex, cryptocurrencies, and others. We had private trading algorithms, machine learning, and charting systems in mind when originally creating this community library. Stock Indicators for .NET is also available.

Explore more information:



Example usage

from stock_indicators import indicators

# prerequisite: get historical quotes from your own source
quotes = get_historical_quotes()

# example: get 20-period simple moving average
results = indicators.get_sma(quotes, 20)

See the guide and the full list of indicators and overlays for more information.

Version supported



This repository uses the standard Apache 2.0 open-source license. Please review the license before using or contributing to the software.

:phone: Contact us

Start a new discussion, ask a question, or submit an issue if it is publicly relevant. You can also direct message @daveskender.

:heart: Patronage

If you or your organization use any of my projects or like what I’m doing, please add a :star: on the GitHub Repo as a token of appreciation. If you want to buy me a beer or are interest in ongoing support as a patron, become a sponsor. Patronage motivates continued maintenance and evolution of open-source projects, and to inspire new ones. Thank you for your support!

:octocat: Contributing

This NuGet package is an open-source project. If you want to report bugs or contribute fixes, new indicators, or new features, please review our contributing guidelines and the backlog.

Special thanks to all of our community code contributors!