Welcome to the Singular Spectrum analysis repository. This repository hosts the code and examples for a non-parametric and automated algorithm for time-series analysis. The goal of this project is to provide a transparent, reproducible codebase for actuarial use-cases. This repository is based on, among others, the paper Casalini, Riccardo, Singular Spectrum Analysis: Back to basics (February 13, 2025).
Singular Spectrum Analysis (SSA) is a non-parametric technique of time series analysis and forecasting. SSA aims at decomposing the original series in a small number of possibly interpretable components such as a slowly varying trend, oscillatory components, and noise.
SSA allows for an automated time-series analysis and forecasting with minimal assumptions on the model form. It aims at a decomposition of the original series into a sum of a small number of interpretable components such as a slowly varying trend, oscillatory components and a structureless noise. Basic SSA analysis consists of four steps:
- Python 3.8+
- Jupyter Lab or Jupyter Notebook
- Familiarity with Python data-analysis libraries (e.g., NumPy, Matplotlib, Seaborn)
- Download the entire repo
- Open the Jupyter notebook using Anaconda
- Run the notebook
Python code implementing the SSA algorithm and the calibration protocols.
A Jupyter notebook that shows an example of use for the SSA algorithm and individual functions.
Contributions are welcome! If you have any ideas, bug reports, or suggestions:
- Fork the repository.
- Create a new branch.
- Make your changes and commit them: git commit -m "Add some feature".
A similar code (written for Matlab) is available at GithHub and Mathworks Exchange. The original paper is available at SSRN: https://ssrn.com/abstract=5136637 or http://dx.doi.org/10.2139/ssrn.5136637. Feel free to contribute also to the Matlab version of SSA.
The notebooks are released under a MIT license. Free to copy, download, modify and use in other products.
No Warranties: This software is provided on an “as is” basis, without warranties or conditions of any kind, either express or implied. The authors do not assume any responsibility for the correct functioning of the code, for any bugs or for unintended consequences arising from the use of this software. Use at your own risk.
If you have questions, suggestions, or concerns, reach out to gregor@osmodelling.com.