portfolioAnalytics.thresholds subpackage
Warning
The Thresholds subpackage has a dependency on transitionMatrix that need to be installed in the same python environment
portfolioAnalytics.thresholds.model module
This module is part of the portfolioAnalytics package.
- class portfolioAnalytics.thresholds.model.ConditionalTransitionMatrix(*args: Any, **kwargs: Any)[source]
Bases:
TransitionMatrixSet
The ConditionalTransitionMatrix object stores a family of TransitionMatrix objects as a time ordered list.
Its main functionality is to allow conditioning (stressing) the values in accordance with a predefined model
- class portfolioAnalytics.thresholds.model.ThresholdSet(ratings=None, periods=None, TMSet=None, json_file=None)[source]
Bases:
object
The Threshold set object stores a multiperiod migration/default threshold structure as a numpy array.
Todo
Separate integration method from transition data
- fit(AR_Model, ri, dt=1.0)[source]
Fit Thresholds given autoregressive model and transition matrix given the initial state ri.
Note
The threshold corresponding to the starting rating is set by convention to NaN. The threshold corresponding to a defaulted state is set by convention to - Infinity. These values are stored in memory as numpy NaN and Infinity value respectively. They are serialized as strings “nan” and “-inf” respectively.
ThresholdSet
The Threshold set object stores a multiperiod migration/default threshold structure as a numpy array.
Todo
Separate integration method from transition data
Integrate G
Integrate G.
Integrate F
Integrate F.