PLUTUS: Pair-Trading Toolkit
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.
๐ Quick Links
Explore the documentation to learn how to customize and make the most of PLUTUS Pair-Trading Toolkit for your project!