Package: transitionMatrix
The transitionMatrix LibrarytransitionMatrix is a pure Python powered library for the statistical analysis and visualization of state transition phenomena. It can be used to analyze any dataset that capturestimestamped transitions in a discrete state space.Author:Open RiskLicense: Apache 2.0Development Website:GithubCode Documentation:Read The DocsMathematical Documentation:Open Risk ManualChat:Open Risk CommonsTraining:Open Risk AcademyShowcase:Blog PostsFunctionalityYou can use transitionMatrix to:Estimatetransition matrices from historical event data using a variety of estimatorsCharacterisetransition matrices (identify their key properties)Visualizeevent data and transition matricesManipulatetransition matrices (derive generators, perform comparisons, stress transition rates etc.)Access standardized Datasets for testingExtract and work with credit default curves (absorbing states)Map credit ratings using mapping tablesMore (still to be documented :-)ArchitecturetransitionMatrix provides intuitive objects for handling transition matrices individually and as sets (based on numpy arrays)supports file input/output in json and csv formatsit has a powerful API for handling event data (based on pandas and numpy)supports visualization using matplotlibInstallationYou can install and use the transitionMatrix package in any system that supports theScipy ecosystem of toolsDependenciesTransitionMatrix requires Python 3 (currently 3.7)It depends on numerical and data processing Python libraries (Numpy, Scipy, Pandas).The Visualization API depends on Matplotlib.The precise dependencies are listed in the requirements.txt file.TransitionMatrix may work with earlier versions of python / these packages but it is not tested.From PyPIpip3installtransitionMatrixFrom sourcesDownload the sources in your preferred directory:gitclonehttps://github.com/open-risk/transitionMatrixUsing 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 (this will also install numpy and other required dependencies).pip3install-rrequirements.txtFinally issue the install command and you are ready to go!python3setup.pyinstallFile structureThe distribution has the following structure:| transitionMatrix/     Directory with the library source code
| -- model.py           File with main data structures
| -- estimators/        Directory with the estimator methods
| -- statespaces/       Directory with state space objects and methods
| -- creditratings/     Directory with predefined credit rating structures
| -- generators/        Directory with data generator methods
| -- utils/             Directory with helper classes and methods
| -- examples/          Directory with usage examples
| ---- python/          Examples as standalone python scripts
| ---- notebooks/       Examples as jupyter notebooks
| -- datasets/          Directory with a variety of datasets useful for getting started
| -- tests/             Directory with the testing suiteOther similar open source softwareetm, an R package for estimating empirical transition matricesmsSurv, an R Package for Nonparametric Estimation of Multistate Modelsmsm, Multi-state modelling with Rmstate, competing risks and multistate models in Rlifelines, python survival package