Reference
CreditMetrics.CreditMetrics
— ModuleImplements the CreditMetrics model for portfolio credit risk
CreditMetrics.AbstractProbabilityVector
— TypeAbstractProbabilityVector{T}
Abstract type for probability vectors with entries of type T
summing to one.
CreditMetrics.AbstractRealLineThresholds
— TypeAbstractRealLineThresholds{T}
Abstract type for a weakly sorted vector of thresholds of type T
where values are unconstrained
CreditMetrics.AbstractThresholdLink
— TypeAbstract type for link functions between probabilities and values on the whole real line
CreditMetrics.AbstractUnitIntervalThresholds
— TypeAbstractUnitIntervalThresholds{T}
Abstract type for a weakly sorted vector of thresholds of type T
where values are between zero and one.
CreditMetrics.DeformedRealLineThresholds
— TypeDeformedRealLineThresholds{T, TBase <: AbstractRealLineThresholds{T}} <: AbstractRealLineThresholds{T}
A weakly sorted vector of values on the real line that has been affinely deformed.
DeformedRealLineThresholds holds the specification of the affine deformation and defers calculation of the deformed thresholds until they are needed.
CreditMetrics.NormalThresholdLink
— TypeNormal distribution link specification using StatsFuns implementation of normal cdf and invcdf
CreditMetrics.ProbabilityVector
— TypeProbabilityVector{T, TVec <: AbstractVector{T}} <: AbstractProbabilityVector{T}
Trusted vector of probabilities of type T
that sum to one.
ProbabilityVector(ps::TVec) where {T, TVec<:AbstractVector{T}}
Convert a vector of probabilities to a ProbabilityVector
, thereby ensuring that probabilities are non-negative and sum to one (trusted). Regarding the last requirement, this constructor is very unforgiving.
ProbabilityVector(apv::AbstractProbabilityVector{T}) where {T}
ProbabilityVector(auit::AbstractUnitIntervalThresholds{T}) where {T}
Convert to ProbabilityVector
other types that are trusted.
CreditMetrics.RealLineThresholds
— TypeRealLineThresholds{T, TVec <: AbstractVector{T}} <: AbstractRealLineThresholds{T}
A weakly sorted vector of values on the real line.
The UnitIntervalThresholds struct is used to check that values are weakly sorted, and using the type system to express that.
RealLineThresholds(rlt::TVec) where {T, TVec <: AbstractVector{T}}
Convert a raw vector of thresholds rlt
of type T
to a RealLineThresholds
RealLineThresholds(arlt::AbstractRealLineThresholds{T}) where {T}
Convert an AbstractRealLineThresholds arlt
to a RealLineThresholds by extracting the raw thresholds
RealLineThresholds(auit::AbstractUnitIntervalThresholds{TUnit}, atl::AbstractThresholdLink{TUnit, TReal}) where {TUnit, TReal}
Convert an AbstractUnitIntervalThresholds auit
to a RealLineThresholds using the link atl
CreditMetrics.StudentThresholdLink
— TypeStudent's distribution link specification using StatsFuns implementation of Student's cdf and invcdf
CreditMetrics.UnitIntervalThresholds
— TypeUnitIntervalThresholds{T, TVec <: AbstractVector{T}} <: AbstractUnitIntervalThresholds{T}
A weakly sorted vector of values on the interval from zero and one.
The UnitIntervalThresholds
struct is used to check that values are in interval and weakly sorted, and using the type system to express that.
UnitIntervalThresholds(thr::TVec) where {T, TVec <: AbstractVector{T}}
Convert a vector thr
of thresholds of type T
to a UnitIntervalThresholds
UnitIntervalThresholds(auit::AbstractUnitIntervalThresholds{T})
Convert an AbstractUnitIntervalThresholds auit
to a UnitIntervalThresholds by extracting its thresholds
UnitIntervalThresholds(apv::AbstractProbabilityVector{T}) where {T}
Convert an AbstractProbabilityVector
to a UnitIntervalThresholds
UnitIntervalThresholds(arlt::AbstractRealLineThresholds{TReal}, atl::AbstractThresholdLink{TUnit, TReal}) where {TUnit, TReal}
Convert an AbstractRealLineThresholds arlt
to a UnitIntervalThresholds using the threshold link atl
CreditMetrics.cdf
— Methodcdf(atl::AbstractThresholdLink)
Get the link function from real line to probability for the link specification atl
CreditMetrics.cdf
— Methodcdf(ntl::NormalThresholdLink)
Get the link function from real line to probability for ntl
which is always the normal cdf
CreditMetrics.cdf
— Methodcdf(stl::StudentThresholdLink)
Get the link function from real line to probability for stl
which is the Student's cdf with degrees of freedom specified by stl
CreditMetrics.deformation
— FunctionMake a deformation of probabilities or thresholds
deformation(arlt::AbstractRealLineThresholds, push, norm)
deformation(auit::AbstractUnitIntervalThresholds, atl::AbstractThresholdLink, push, norm)
deformation(apv::AbstractProbabilityVector, atl::AbstractThresholdLink, push, norm)
Deformations are made on the thresholds on the real line. They consist of a push
that moves the thresholds and a norm
with which the pushed thresholds are divided for proper normalization.
Methods on probabilities and unit interval thresholds are provided for ease of use and also depend on a threshold link atl
.
CreditMetrics.deformation_value
— FunctionCompute the mean value after a deformation when the values for each outcome is given.
CreditMetrics.invcdf
— Methodinvcdf(atl::AbstractThresholdLink)
Get the link function from probability to real line for the link specification atl
CreditMetrics.invcdf
— Methodinvcdf(ntl::NormalThresholdLink)
Get the link function from probability to real line for ntl
which is always the normal inverse cdf
CreditMetrics.invcdf
— Methodinvcdf(stl::StudentThresholdLink)
Get the link function from probability to real line for stl
which is the Student's inverse cdf with degrees of freedom specified by stl
CreditMetrics.meanvalue
— FunctionCompute the mean value when given the value for each outcome.
CreditMetrics.outcome
— FunctionCompute the outcome of a particular realization of scenario
CreditMetrics.outcome_value
— FunctionCompute the values for one or more outcomes.
CreditMetrics.probabilities
— Methodprobabilities(apv::AbstractProbabilityVector{T})
Get the probabilities of apv
in a raw format, typically an AbstractVector{T}
.
CreditMetrics.thresholds
— Methodthresholds(auit::AbstractUnitIntervalThresholds{T}) where {T}
Get the thresholds of auit
in a raw format, typically an AbstractVector{T}
.
CreditMetrics.thresholds
— Methodthresholds(arlt::AbstractRealLineThresholds{T}) where {T}
Get the thresholds of arlt
in a raw format, typically an AbstractVector{T}
.