Package: correlationMatrix
correlationMatrixcorrelationMatrix 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)Author:Open RiskLicense: Apache 2.0Mathematical Documentation:Open Risk ManualTraining:Open Risk AcademyDevelopment Website:GithubFunctionalityYou can use correlationMatrix toEstimate correlation matrices from historical timeseries using a variety of modelsVisualize correlation matricesManipulate correlation matrices (fix problematic matrices, stress matrices etc)Provide standardized data sets for testingNB: correlationMatrix is still in active development. If you encounter issues please raise them in our
github repositoryArchitecturecorrelationMatrix supports file input/output in json and csv formatsprovides intuitive objects for handling correlation matrices individually and as sets (based on numpy)supports visualization using matplotlibLinks to other open source softwarecorrelationMatrix makes use of lower level methods available in numpy, scipy and statsmodelsThere is a sister project for estimating transition rates transitionMatrixInstallationYou can install and use the correlationMatrix package in any system that supports theScipy ecosystem of toolsDependenciescorrelationMatrix requires Python 3It depends on numerical and data processing Python libraries (Numpy, Scipy, Pandas, stastmodels)The Visualization API depends on MatplotlibThe 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 PyPiTODOpip3installpandaspip3installmatplotlibpip3installcorrelationMatrixFrom sourcesDownload the sources to your preferred directory:gitclonehttps://github.com/open-risk/correlationMatrixUsing virtualenvIt is advisable to install the package in a virtualenv so as not to interfere with your system’s python distributionvirtualenv-ppython3tm_testsourcetm_test/bin/activateIf you do not have pandas already installed make sure you install it first (will also install numpy)pip3installpandaspip3installmatplotlibpip3install-rrequirements.txtFinally issue the install command and you are ready to go!python3setup.pyinstallFile structureThe distribution has the following structure:correlationMatrix         The library source codemodel.py              Main data structuresutils                 Helper classes and methodssettings.py           Settingsexamples                 Usage examplesdatasets                 Contains a variety of datasets useful for getting started with correlationMatrixtests                    Testing suiteTestingIt 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 distributionUnzip the data files in the datasets directorypython3test.pyGetting StartedCheck the Usage pages in this documentationLook 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 libraryHow to estimate an Equity Correlation Matrix using correlationMatrix:https://www.openriskacademy.com/course/view.php?id=44