Skip to content

PLUTUS: Pair-Trading Toolkit

PLUTUS Flyer

Python PyPI - Version PyPI Downloads License: MIT GitHub

PLUTUS is a Python-based toolkit for performing pair-trading analysis. This project is designed for educational purposes and provides analysis tools for:

  • Fetching and processing financial data.
  • Conducting statistical tests (stationarity and cointegration).
  • Performing feature engineering.
  • Visualizing financial time-series data.

๐ŸŒŸ Key Features

โžŠ ๐Ÿ“ฅ Data Acquisition

  • ๐Ÿ“ก Fetch historical financial data using Yahoo Finance API.
  • ๐Ÿ—ƒ๏ธ Store and manage time-series data in a structured format.
  • ๐Ÿ”„ Combine and preprocess data for analysis.

โž‹ ๐Ÿ“Š Statistical Tests

๐Ÿ“ˆ Stationarity Tests

  • ๐Ÿงช Augmented Dickey-Fuller Test (ADF) tests whether a time series is stationary.
  • ๐Ÿ“‰ Phillips-Perron Test (PP) handles autocorrelations and heteroskedasticity.
  • ๐Ÿ“Š KPSS test for trend stationarity.

๐Ÿ”— Cointegration Tests

  • โš–๏ธ Engle-Granger identifies long-term equilibrium relationships.
  • ๐Ÿ” Phillips-Ouliaris handles residual-based cointegration testing.
  • ๐Ÿ”„ Johansen Test detects multiple cointegration vectors.

โžŒ ๐Ÿ› ๏ธ Feature Engineering

  • ๐Ÿ“… Compute periodic returns (daily, weekly, monthly).
  • ๐Ÿ”ข Apply logarithmic and exponential transformations.
  • ๐Ÿ”— Calculate correlation matrices and filter securities based on thresholds.
  • ๐Ÿ”ฌ Identify cointegrated pairs for pair trading.

โž ๐Ÿ“Š Data Visualization

  • ๐Ÿ“ˆ Plot financial time-series data.
  • ๐Ÿ“Š Generate dual-axis plots for comparing securities.
  • ๐Ÿ•ต๏ธโ€โ™‚๏ธ Visualize correlation matrices.
  • ๐Ÿ”„ Plot autocorrelation and partial autocorrelation.

Explore the documentation to learn how to customize and make the most of PLUTUS Pair-Trading Toolkit for your project!