Skip to main content

A comprehensive technical analysis library for Python.

Project description

Technical Analysis Library

This library provides a collection of technical analysis indicators for financial market analysis. It is implemented in Python using the NumPy and Pandas libraries. The indicators can be used for various trading strategies and technical analysis applications.

Features

  • Simple Moving Average (SMA)
  • Exponential Moving Average (EMA)
  • Average True Range (ATR)
  • Bollinger Bands
  • Relative Strength Index (RSI)
  • Moving Average Convergence Divergence (MACD)
  • And many more...

Installation

To use this library, ensure you have Python installed along with the required libraries. You can install the dependencies using pip:

pip install numpy pandas

## Usage

import numpy as np
import pandas as pd
import yfinance as yf
from TAxCore import TechnicalAnalysis

# Download historical price data for a stock (e.g., Apple)
ticker = 'AAPL'
data = yf.download(ticker, start='2022-01-01', end='2023-01-01')

# Extract closing prices using Numpy
prices = data['Close'].to_numpy()

# Calculate Simple Moving Average (SMA)
sma_values = TechnicalAnalysis.sma(prices, period=20)
print("SMA Values:", sma_values)

# Calculate Exponential Moving Average (EMA)
ema_values = TechnicalAnalysis.ema(prices, length=20)
print("EMA Values:", ema_values)

# Calculate Bollinger Bands
basis, upper, lower = TechnicalAnalysis.bollinger_bands(prices, length=20)
print("Bollinger Bands - Basis:", basis, "Upper:", upper, "Lower:", lower)

# Calculate Relative Strength Index (RSI)
rsi_values = TechnicalAnalysis.rsi(prices, period=14)
print("RSI Values:", rsi_values)

# Calculate Moving Average Convergence Divergence (MACD)
macd_line, signal_line, histogram = TechnicalAnalysis.macd(prices)
print("MACD Line:", macd_line, "Signal Line:", signal_line, "Histogram:", histogram)

# For visualization I recommend either Matplotlib, Plotly or MPLFinance. I tried all and they all work pretty good.

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

taxcore-0.1.4.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

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

taxcore-0.1.4-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file taxcore-0.1.4.tar.gz.

File metadata

  • Download URL: taxcore-0.1.4.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for taxcore-0.1.4.tar.gz
Algorithm Hash digest
SHA256 147edb45c0d8b72bafef3e0914c22840bd158402c612d14252b14ab966fb54b4
MD5 52c293829c4f428f9da92fb50e6a185e
BLAKE2b-256 2b05d05f0023e57527009fe5cbb10f921470dad149ed83cfae76410736bdb089

See more details on using hashes here.

File details

Details for the file taxcore-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: taxcore-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for taxcore-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 33df489b885fc69d6ade39a309ae09547cf2acf81e759609368d5ba485af83ec
MD5 96d0e745fd6bf62c03212e275c6b081d
BLAKE2b-256 9343ff9538fecb2648461531f7ad17f41aae3604eab1418d6d855c1577fe2cf8

See more details on using hashes here.

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