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.3.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: taxcore-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 d832cb37d84cd264a567aa0d96f062c0604cb52c83c0318bb4e0f6fabab94c5c
MD5 9b18b4ee434e8f453d9fc1b6071f8e96
BLAKE2b-256 4b4b379ea8d51ce91b692bcba96e0de6d1d81daccfd831c6a602df8770754f63

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taxcore-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 733498e3e994b127b78ba620f63caf12e58f555ba951b7ad3fc850fa4c24f7af
MD5 d2379a7262bd31f2ce512ab29228a98c
BLAKE2b-256 983546ea6b4a2d7a6afc7654de257220a6a2f19140d82774a44f094307347cbe

See more details on using hashes here.

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