# Transition Matrix

### Mathematical Representations of Credit Portfolio Data

What do we mean by credit data? This post is a discussion around mathematical terminology and concepts that are useful in the context of working with credit data, taking us from network graph representations of credit systems to commonly used reference data sets

Definition of Credit Data What do we mean by credit data? For our purposes Credit Data is any well-defined dataset that has direct applications in the assessment of the Credit Risk of an individual or an organization, or, more generally, a dataset that allows the application of data driven Credit Portfolio Management policies. The appearance of credit data is quite familiar to practitioners: A spreadsheet, or a table in a database, with a number of columns and rows full of all sorts of information about borrowers and loans.

### Credit Migrations using TransitionMatrix

Summary This course is a CrashProgram (short course) in the use of Python and the package TransitionMatrix for analysing credit migration data. Requirements The course is at a medium technical level. It requires some familiarity with python (and a working installation that includes the common numpy/scipy libraries). On the risk modelling side it requires knowledge of basic credit rating migration concepts. Outcomes Step by step we build the knowledge required to use python to analyse credit migration data:

### Representing Matrices as JSON Objects: Part 1

Representing a matrix as a JSON object is a task that appears in many modern data science contexts, in particular when one wants to exchange matrix data online. While there is no universally agreed way to achieve this task in all circumstances, in this series of posts we discuss a number of options and the associated tradeoffs.

Motivation and Objective Representing a matrix as a JSON object is a task that appears in many modern data science contexts, in particular when one wants to exchange matrix data online. There is no universally agreed way to achieve this task and various options are available depending on the matrix type and the programming tools and environment one has available. Matrices are not native structures in general purpose computing environments. They are typically handled with speficic packages (modules, extensions or libraries).

### Logarithmic Sankey Visualization of Credit Migrations

Sankey diagrams are very useful for the visualization of flows, especially when there is a conserved quantity. They can be tricky when some of the flows are much smaller than others. In the latest release of transitionMatrix we include an example of a log-scale version of Sankey

Using Sankey Diagrams Sankey Diagrams are a type of flow diagram composed of interconnected arrows. The width of the arrows is proportional to the flow rate. Sankey diagrams are often used in physical sciences (physics, chemistry, biology) and engineering but also in economics. They can be used to represent the relative role and significance of various inputs and outputs in a given process. Sankey diagrams emphasize the major transfers within a system.

### Stressing Transition Matrices

Release of version 0.4.1 of the transitionMatrix package focuses on stressing transition matrices Further building the open source OpenCPM toolkit this realease of transitionMatrix features: Feature: Added functionality for conditioning multi-period transition matrices Training: Example calculation and visualization of conditional matrices Datasets: State space description and CGS mappings for top-6 credit rating agencies Conditional Transition Probabilities The calculation of conditional transition probabilities given an empirical transition matrix is a highly non-trivial task involving many modelling assumptions.

### Release 0.4 of transitionMatrix adds Aalen-Johansen estimators and many usability enhancements

Release of version 0.4 of the transitionMatrix package Further building the open source OpenCPM toolkit this realease of transitionMatrix features: Feature: Added Aalen-Johansen Duration Estimator Documentation: Major overhaul of documentation, now targeting ReadTheDocs distribution Training: Streamlining of all examples Installation: Pypi and wheel installation options Datasets: Synthetic Datasets in long format Enjoy!