utility functions for transition matrices and generators More...
#include <ql/math/matrix.hpp>Functions | |
| void | sanitiseTransitionMatrix (Matrix &m) |
| void | checkTransitionMatrix (const Matrix &t) |
| check if the matrix is a transition matrix, i.e. row sums are 1 and entries are non-negative | |
| void | checkGeneratorMatrix (const Matrix &g) |
| check if the matrix is a generator matirx, i.e. row sums are 0 and non-diagonal elements are non-negative | |
| Matrix | generator (const Matrix &t, const Real horizon=1.0) |
| template<class I > | |
| std::vector< Real > | creditStateBoundaries (const I &begin, const I &end) |
| compute N(0,1) credit state boundaries | |
utility functions for transition matrices and generators
| void QuantExt::sanitiseTransitionMatrix | ( | Matrix & | m | ) |
cap / floor elements at 1 / 0, adjust diagonal elements so that row sums are 1, or if that is not possible, divide the row elements by the row sum
| Matrix QuantExt::generator | ( | const Matrix & | t, |
| const Real | horizon = 1.0 |
||
| ) |
build generator from transition matrix cf. Alexander Kreinin and Marina Sidelnikova, "Regularization Algorithms for Transition Matrices", Algorithm QOG