Skip to main content

Technical Indicators for Financial Trading

Project description

tifft

Technical Indicators for Financial Trading

Test Upload Python Package CI to Docker Hub

Installation

$ pip install -U tifft

Docker image

The image is available at Docker Hub.

$ docker image pull dceoy/tifft

Usage

Calculator Classes for Python

import numpy as np
from tifft.bollingerbands import BollingerBandsCalculator
from tifft.macd import MacdCalculator
from tifft.rsi import RsiCalculator

prices = np.random.randn(100) * 100

# MACD
macdc = MacdCalculator(fast_ema_span=12, slow_ema_span=26, macd_ema_span=9)
df_macd = macdc.calculate(values=prices)
print(df_macd)

# Bollinger Bands
bbc = BollingerBandsCalculator(window_size=20, sd_multiplier=2)
df_bb = bbc.calculate(values=prices)
print(df_bb)

# RSI
rsic = RsiCalculator(window_size=14, upper_line=70, lower_line=30)
df_rsi = rsic.calculate(values=prices)
print(df_rsi)

Command-line Tools

Fetch the historical data of DJIA, SP500, and NASDAQ100 from FRED (St. Louis Fed).

$ tifft history DJIA SP500 NASDAQ100

Fetch the data of SP500 from FRED and calculate the MACD.

$ tifft macd SP500

Fetch the data of SP500 from FRED and calculate the Bollinger Bands.

$ tifft bb SP500

Fetch the data of SP500 from FRED and calculate the RSI.

$ tifft rsi SP500

Run tifft --help for information.

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

tifft-0.1.2.tar.gz (18.3 kB view hashes)

Uploaded Source

Built Distribution

tifft-0.1.2-py3-none-any.whl (19.5 kB view hashes)

Uploaded Python 3

Supported by

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