Worst Realisation Constraints: private API
PortfolioOptimisers.set_wr_risk_expression! — Function
set_wr_risk_expression!(
model::Model,
X::AbstractMatrix{<:Union{var"#s136", var"#s53"} where {var"#s136"<:Number, var"#s53"<:AbstractJuMPScalar}};
loss,
prefix
) -> Any
Introduce the worst-realisation risk variable and constraint to model.
Creates a scalar variable wr_risk and adds sc * (wr_risk .+ net_X) >= 0 so that wr_risk upper-bounds the negative of every portfolio return. Returns the existing variable if already present.
Mathematical definition
\[\begin{align} \mathrm{WR}(\boldsymbol{w}) &= \max_{t} (-\hat{r}_t) = -\min_{t} \hat{r}_t\,. \end{align}\]
Where:
- $\mathrm{WR}(\boldsymbol{w})$: Worst realisation.
- $\hat{r}_t = \boldsymbol{x}_t^\intercal \boldsymbol{w}$: Portfolio return at time $t$.
where $\hat{r}_t = \boldsymbol{x}_t^\intercal \boldsymbol{w}$ is the net portfolio return at time $t$.
Arguments
model::JuMP.Model: The JuMP optimisation model.X::MatNum: Asset returns matrix (T × N).
Returns
wr_risk: JuMP scalar variable for the worst-realisation risk.
Related
PortfolioOptimisers.set_risk_constraints! — Method
set_risk_constraints!(
model::Model,
,
r::WorstRealisation,
opt::RiskJuMPOptimisationEstimator,
pr::AbstractPriorResult,
args...;
loss,
prefix,
kwargs...
) -> Any
Add worst-realisation risk constraints to model.
Delegates to set_wr_risk_expression! to create wr_risk, then calls set_risk_bounds_and_expression!. Returns the existing expression if already present.
Arguments
model::JuMP.Model: The JuMP optimisation model.r::WorstRealisation: Worst-realisation risk measure instance.opt::RiskJuMPOptimisationEstimator: Risk-based optimisation estimator.pr::AbstractPriorResult: Prior result containing the returns matrixX.
Returns
nothing.
Related