Ratio Risk Measure
PortfolioOptimisers.RiskRatio Type
struct RiskRatio{__T_r1, __T_r2} <: HierarchicalRiskMeasureRepresents a risk ratio risk measure for hierarchical portfolio optimisation.
RiskRatio computes the ratio of two risk measures, enabling the construction of risk-adjusted performance metrics for use in hierarchical optimisation routines.
Mathematical definition
Where:
: Risk ratio of the portfolio. : Portfolio returns vector . : First (numerator) optimisation risk measure. : Second (denominator) optimisation risk measure.
Fields
r1: First risk measure.r2: Second risk measure.
Constructors
RiskRatio(;
r1::OptimisationRiskMeasure = Variance(),
r2::OptimisationRiskMeasure = ConditionalValueatRisk()
) -> RiskRatioKeywords correspond to the struct's fields.
Propagated parameters
When factory is called on this type, the following @fprop-tagged fields are automatically propagated:
Examples
julia> RiskRatio()
RiskRatio
r1 ┼ Variance
│ settings ┼ RiskMeasureSettings
│ │ scale ┼ Float64: 1.0
│ │ ub ┼ nothing
│ │ rke ┴ Bool: true
│ sigma ┼ nothing
│ chol ┼ nothing
│ rc ┼ nothing
│ alg ┴ SquaredSOCRiskExpr()
r2 ┼ ConditionalValueatRisk
│ settings ┼ RiskMeasureSettings
│ │ scale ┼ Float64: 1.0
│ │ ub ┼ nothing
│ │ rke ┴ Bool: true
│ alpha ┼ Float64: 0.05
│ w ┴ nothingRelated
sourcePortfolioOptimisers.factory Method
factory(a::Union{Nothing, <:AbstractEstimator, <:AbstractAlgorithm,
<:AbstractResult}, args...; kwargs...) -> aNo-op factory function for constructing objects with a uniform interface.
Defining methods which dispatch on the first argument allows for a consistent factory interface across different types.
factory and port_opt_view are the two propagation mechanisms in this library. They are duals: factory threads runtime values (prior moments, observation weights, previous portfolio weights) down through a composed struct tree; port_opt_view threads an index selection (a subset of assets or observations) down through the same tree.
Arguments
a: Indicates no object should be constructed.args...: Arbitrary positional arguments (ignored).kwargs...: Arbitrary keyword arguments (ignored).
Returns
a: The input unchanged.
Examples
julia> factory(nothing, 1, 2; x = 3)
julia> factory(MeanValue())
MeanValue
w ┴ nothingRelated
sourcefactory(
rs::AbstractBaseRiskMeasure,
args...;
kwargs...
) -> VarianceSkewKurtosis{RiskMeasureSettings{__T_scale, __T_ub, __T_rke}, _A, Skewness{__T_settings, __T_ve, __T_sk, __T_w, __T_mu}} where {__T_scale, __T_ub, __T_rke, _A, __T_settings, __T_ve, __T_sk, __T_w, __T_mu}Return the risk measure rs unchanged.
Identity pass-through used when a risk measure is provided in a context that calls factory.
Related
sourcePortfolioOptimisers.factory Method
factory(a::Union{Nothing, <:AbstractEstimator, <:AbstractAlgorithm,
<:AbstractResult}, args...; kwargs...) -> aNo-op factory function for constructing objects with a uniform interface.
Defining methods which dispatch on the first argument allows for a consistent factory interface across different types.
factory and port_opt_view are the two propagation mechanisms in this library. They are duals: factory threads runtime values (prior moments, observation weights, previous portfolio weights) down through a composed struct tree; port_opt_view threads an index selection (a subset of assets or observations) down through the same tree.
Arguments
a: Indicates no object should be constructed.args...: Arbitrary positional arguments (ignored).kwargs...: Arbitrary keyword arguments (ignored).
Returns
a: The input unchanged.
Examples
julia> factory(nothing, 1, 2; x = 3)
julia> factory(MeanValue())
MeanValue
w ┴ nothingRelated
sourcefactory(
rs::AbstractBaseRiskMeasure,
args...;
kwargs...
) -> VarianceSkewKurtosis{RiskMeasureSettings{__T_scale, __T_ub, __T_rke}, _A, Skewness{__T_settings, __T_ve, __T_sk, __T_w, __T_mu}} where {__T_scale, __T_ub, __T_rke, _A, __T_settings, __T_ve, __T_sk, __T_w, __T_mu}Return the risk measure rs unchanged.
Identity pass-through used when a risk measure is provided in a context that calls factory.
Related
sourcePortfolioOptimisers.NonOptimisationRiskRatio Type
struct NonOptimisationRiskRatio{__T_r1, __T_r2} <: NonOptimisationRiskMeasureRepresents a non-optimisation risk ratio measure.
NonOptimisationRiskRatio computes the ratio of two risk measures for analysis or reporting purposes. Unlike RiskRatio, it is not intended for use as an objective or constraint in optimisation routines.
Mathematical definition
Where:
: Risk ratio of the portfolio. : Portfolio returns vector . : First (numerator) base risk measure. : Second (denominator) base risk measure.
Fields
r1: First risk measure.r2: Second risk measure.
Constructors
NonOptimisationRiskRatio(;
r1::AbstractBaseRiskMeasure = Variance(),
r2::AbstractBaseRiskMeasure = ConditionalValueatRisk()
) -> NonOptimisationRiskRatioKeywords correspond to the struct's fields.
Propagated parameters
When factory is called on this type, the following @fprop-tagged fields are automatically propagated:
Related
sourcePortfolioOptimisers.factory Method
factory(a::Union{Nothing, <:AbstractEstimator, <:AbstractAlgorithm,
<:AbstractResult}, args...; kwargs...) -> aNo-op factory function for constructing objects with a uniform interface.
Defining methods which dispatch on the first argument allows for a consistent factory interface across different types.
factory and port_opt_view are the two propagation mechanisms in this library. They are duals: factory threads runtime values (prior moments, observation weights, previous portfolio weights) down through a composed struct tree; port_opt_view threads an index selection (a subset of assets or observations) down through the same tree.
Arguments
a: Indicates no object should be constructed.args...: Arbitrary positional arguments (ignored).kwargs...: Arbitrary keyword arguments (ignored).
Returns
a: The input unchanged.
Examples
julia> factory(nothing, 1, 2; x = 3)
julia> factory(MeanValue())
MeanValue
w ┴ nothingRelated
sourcefactory(
rs::AbstractBaseRiskMeasure,
args...;
kwargs...
) -> VarianceSkewKurtosis{RiskMeasureSettings{__T_scale, __T_ub, __T_rke}, _A, Skewness{__T_settings, __T_ve, __T_sk, __T_w, __T_mu}} where {__T_scale, __T_ub, __T_rke, _A, __T_settings, __T_ve, __T_sk, __T_w, __T_mu}Return the risk measure rs unchanged.
Identity pass-through used when a risk measure is provided in a context that calls factory.
Related
source