Skip to main content

Library for calculating diverse financial metrics

Project description

Technicators

PyPI - Version PyPI - License PyPI - Status

Technicators provides a collection of methods for calculating various technical indicators commonly used in financial analysis.

Installation

pip install technicators

Usage

import pandas as pd
from technicators import Technicators

# Sample time series data
data = pd.Series([...])

# Calculate ALMA
alma_values = Technicators.ALMA(data, period=14)

# Calculate EMA
ema_values = Technicators.EMA(data, period=14)

# Calculate HMA
hma_values = Technicators.HMA(data, period=14)

# Calculate SMMA
smma_values = Technicators.SMMA(data, period=14)

# Calculate TEMA
tema_values = Technicators.TEMA(data, period=14)

# Calculate WMA
wma_values = Technicators.WMA(data, period=14)

Method Details

ALMA

  • Calculates the Arnaud Legoux Moving Average (ALMA) using a variable window.
  • Parameters:
    • dataset (pd.Series): The input time series data.
    • period (int): The period over which to calculate the ALMA.
    • offset (float): Offset multiplier for ALMA calculation. Default is 0.85.
    • sigma (float): Standard deviation factor for ALMA calculation. Default is 6.
  • Returns:
    • pd.Series: A time series representing the ALMA values.

EMA

  • Calculates the Exponential Moving Average (EMA) of a given time series.
  • Parameters:
    • dataset (pd.Series): The input time series data.
    • period (int): The period over which to calculate the EMA.
    • adjust (bool): Whether to adjust the EMA calculation. Default is True.
  • Returns:
    • pd.Series: A time series representing the EMA values.

HMA

  • Calculates the Hull Moving Average (HMA) using weighted moving averages.
  • Parameters:
    • dataset (pd.Series): The input time series data.
    • period (int): The period over which to calculate the HMA.
  • Returns:
    • pd.Series: A time series representing the HMA values.

SMMA

  • Calculates the Smoothed Moving Average (SMMA) using exponential smoothing.
  • Parameters:
    • dataset (pd.Series): The input time series data.
    • period (int): The period over which to calculate the SMMA.
    • adjust (bool): Whether to adjust the SMMA calculation. Default is True.
  • Returns:
    • pd.Series: A time series representing the SMMA values.

TEMA

  • Calculates the Triple Exponential Moving Average (TEMA) using triple exponential smoothing.
  • Parameters:
    • dataset (pd.Series): The input time series data.
    • period (int): The period over which to calculate the TEMA.
    • adjust (bool): Whether to adjust the TEMA calculation. Default is True.
  • Returns:
    • pd.Series: A time series representing the TEMA values.

WMA

  • Calculates the Weighted Moving Average (WMA) using weighted averages.
  • Parameters:
    • dataset (pd.Series): The input time series data.
    • period (int): The period over which to calculate the WMA.
  • Returns:
    • pd.Series: A time series representing the WMA values.

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

technicators-1.0.1.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

technicators-1.0.1-py3-none-any.whl (4.4 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