Skip to main content

A Python powered library for statistical analysis and visualization of correlation phenomena

Project description


correlationMatrix is a Python powered library for the statistical analysis and visualization of correlation phenomena. It can be used to analyze any dataset that captures timestamped values (timeseries)


You can use correlationMatrix to

  • Estimate correlation matrices from historical timeseries using a variety of models

  • Visualize correlation matrices

  • Manipulate correlation matrices (fix problematic matrices, stress matrices etc)

  • Provide standardized data sets for testing

NB: correlationMatrix is still in active development. If you encounter issues please raise them in our github repository


  • correlationMatrix supports file input/output in json and csv formats

  • provides intuitive objects for handling correlation matrices individually and as sets (based on numpy)

  • supports visualization using matplotlib


You can install and use the correlationMatrix package in any system that supports the Scipy ecosystem of tools


  • correlationMatrix requires Python 3

  • It depends on numerical and data processing Python libraries (Numpy, Scipy, Pandas, stastmodels)

  • The Visualization API depends on Matplotlib

  • The precise dependencies are listed in the requirements.txt file.

  • correlationMatrix may work with earlier versions of these packages but this has not been tested.

From PyPi


pip3 install pandas
pip3 install matplotlib
pip3 install correlationMatrix

From sources

Download the sources to your preferred directory:

git clone

Using virtualenv

It is advisable to install the package in a virtualenv so as not to interfere with your system’s python distribution

virtualenv -p python3 tm_test
source tm_test/bin/activate

If you do not have pandas already installed make sure you install it first (will also install numpy)

pip3 install pandas
pip3 install matplotlib
pip3 install -r requirements.txt

Finally issue the install command and you are ready to go!

python3 install

File structure

The distribution has the following structure:

correlationMatrix The library source code Main data structures
utils Helper classes and methods Settings
examples Usage examples
datasets Contains a variety of datasets useful for getting started with correlationMatrix
tests Testing suite


It is a good idea to run the test-suite. Before you get started:

  • Adjust the source directory path in correlationMatrix/__init__ and then issue the following in at the root of the distribution

  • Unzip the data files in the datasets directory


Getting Started

Check the Usage pages in this documentation

Look at the examples directory for a variety of typical workflows.

For more in depth study, the Open Risk Academy has courses elaborating on the use of the library

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

correlationMatrix-0.2.0.tar.gz (8.3 MB view hashes)

Uploaded source

Built Distribution

correlationMatrix-0.2.0-py2.py3-none-any.whl (8.3 MB view hashes)

Uploaded py2 py3

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