Stock Indicators for Python is a PyPI library package 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 trading algorithms, machine learning, and charting systems in mind when originally creating this community library. Stock Indicators for .NET is also available.
Visit our project site for more information:
-
Install .NET SDK (6.0 or newer):
- Download from Microsoft .NET Downloads
- Or using winget:
winget install Microsoft.DotNet.SDK.6
- Verify:
dotnet --info
-
Install the package:
pip install stock-indicators
-
Install .NET SDK (6.0 or newer):
brew install dotnet-sdk dotnet --info # Verify installation
-
Install the package:
pip install stock-indicators
from stock_indicators import indicators
# fetch your data
quotes = get_history("MSFT")
# calculate 20-period SMA
results = indicators.get_sma(quotes, 20)
Note: This is a simple example. For a step-by-step guide, see the QuickStart Guide or our documentation site.