Go to file
2024-12-04 11:22:00 -08:00
indicators Expose simple moving average indicator to clients 2024-12-04 11:21:44 -08:00
test Add test for simple moving average indicator 2024-12-04 11:22:00 -08:00
.gitignore Add .gitignore for indicators module 2024-11-29 09:40:38 -08:00
README.md Add example of indicator usage to indicators module README 2024-12-03 08:49:05 -08:00
requirements.txt Add requirements.txt for indicators module 2024-12-01 08:11:56 -08:00
setup.py Add numpy and pandas dependencies to indicators module setup.py 2024-12-03 08:25:17 -08:00

Indicators

This module provides various indicators for performing technical analysis on financial OHLC data.

Dependencies

The indicators module depends on the following Python packages:

numpy
pandas

There is also a dependency on the OHLC module for running tests.

Example Usage

The following is an example of using the provided RSI indicator:

from datetime import datetime, timedelta

from indicators import rsi
from ohlc import ohlc

today = datetime.today()
data = ohlc('SPY', start_date = today - timedelta(days = 365), end_date = today)

rsi_values = rsi(data, period = 14)
print(rsi_values)

The result will be returned as a pandas Series.

Example:

0       0.000000
1       0.000000
2       0.000000
3      66.017608
4      75.789601
         ...
246    63.393288
247    66.070866
248    63.168300
249    66.415897
250    67.316906