Entropy Pooling
PortfolioOptimisers.RhoParsingResult — Type
struct RhoParsingResult{__T_vars, __T_coef, __T_op, __T_rhs, __T_eqn, __T_ij} <: AbstractParsingResultCarries a parsed correlation or covariance view together with the asset pairs it names.
It extends ParsingResult with an ij field, which holds one index pair per term of the view, so a downstream routine can place the view in the covariance matrix without parsing the equation again. replace_coprior_views produces it from a view of the form "(A, B) == 0.5", and the entropy pooling and Black-Litterman routines that read pair views consume it.
A view over a pair of groups spans one asset pair per element of its ij entry, and emits one constraint row per pair. Its rhs is therefore a vector of the same length, one right-hand side per row. A view over a single asset pair keeps a scalar rhs.
Fields
vars: Variable names in the parsed constraint expression.
coef: Coefficients corresponding to the constraint variables.
op: Comparison operator (==,<=, or>=).
rhs: Right-hand side of the constraint. A view over a single asset pair carries one value. A view over a pair of groups carries one value per spanned pair, in the order ofij.
eqn: Formatted string representation of the constraint equation.
ij: Pair of asset indices for correlation-based constraints.
Constructors
RhoParsingResult( vars::VecStr, coef::VecNum, op::AbstractString, rhs::Union{<:Number, <:VecNum}, eqn::AbstractString, ij::AbstractVector{<:Union{<:Tuple{<:Integer, <:Integer}, <:Tuple{<:VecInt, <:VecInt}}}) -> RhoParsingResultPositional arguments correspond to the struct's fields. There is no keyword constructor, because replace_coprior_views is the producer of this type.
Validation
length(vars) == length(coef).- If
rhsis a vector,!isempty(ij)and every entry ofijis a group pair whose first half holdslength(rhs)indices.
Examples
julia> PortfolioOptimisers.RhoParsingResult(["(A, B)"], [1.0], "==", 0.5, "1.0*(A, B) == 0.5", [(1, 2)])RhoParsingResult vars ┼ Vector{String}: ["(A, B)"] coef ┼ Vector{Float64}: [1.0] op ┼ String: "==" rhs ┼ Float64: 0.5 eqn ┼ String: "1.0*(A, B) == 0.5" ij ┴ Vector{Tuple{Int64, Int64}}: [(1, 2)]Related
AbstractParsingResultParsingResultreplace_coprior_views: the producer of this type.replace_prior_viewsep_cov_views!: readsijto place a covariance view.ep_rho_views!: readsijto place a correlation view.
PortfolioOptimisers.H0_EntropyPooling — Type
struct H0_EntropyPooling <: AbstractEntropyPoolingAlgorithmEnforces every view in a single entropy pooling optimisation.
This is the original formulation. It solves once, so it is the cheapest of the three algorithms, and it pins nothing: a higher moment view is free to move a lower moment of the same asset.
Related
References
- [78] A. Meucci. Fully flexible views: theory and practice. Risk 21, 97–102 (2008).
PortfolioOptimisers.H1_EntropyPooling — Type
struct H1_EntropyPooling <: AbstractEntropyPoolingAlgorithmEnforces the views in stages, and starts every stage from the prior probabilities.
Each stage carries the constraints of the stages before it, so the posterior is the projection of the prior onto the whole view set. This is the first of the two sequential heuristics.
Related
References
- [79] A. Vorobets. Sequential entropy pooling heuristics. Available at SSRN 3936392 (2021).
PortfolioOptimisers.H2_EntropyPooling — Type
struct H2_EntropyPooling <: AbstractEntropyPoolingAlgorithmEnforces the views in stages, and starts every stage from the previous stage's probabilities.
Each stage carries the constraints of the stages before it, so the view set is the same as H1_EntropyPooling's. What differs is the reference distribution: each stage projects the stage before it rather than the prior. This is the second of the two sequential heuristics.
Related
References
- [79] A. Vorobets. Sequential entropy pooling heuristics. Available at SSRN 3936392 (2021).
PortfolioOptimisers.LogEntropyPooling — Type
struct LogEntropyPooling <: AbstractEntropyPoolingOptAlgorithmEvaluates the entropy pooling objective in log space.
It carries the logarithms of the probabilities throughout, so it never exponentiates an intermediate quantity. Prefer it when a prior probability is small enough that the exponential form loses precision. It minimises the same Kullback-Leibler divergence as ExpEntropyPooling and reaches the same posterior.
Related
References
- [78] A. Meucci. Fully flexible views: theory and practice. Risk 21, 97–102 (2008).
PortfolioOptimisers.ExpEntropyPooling — Type
struct ExpEntropyPooling <: AbstractEntropyPoolingOptAlgorithmEvaluates the entropy pooling objective through the exponential of the dual variables.
It recovers each posterior probability from the prior one and the dual variables directly, without carrying logarithms. It minimises the same Kullback-Leibler divergence as LogEntropyPooling and reaches the same posterior.
Related
References
- [78] A. Meucci. Fully flexible views: theory and practice. Risk 21, 97–102 (2008).
PortfolioOptimisers.ConditionalValueatRiskEntropyPooling — Type
struct ConditionalValueatRiskEntropyPooling{__T_args, __T_kwargs} <: AbstractEntropyPoolingOptimiserRoot-finds the value at risk level that meets a single conditional value-at-risk view.
The recursive route of MeucciEntropyPoolingPrior writes no CVaR constraint. It hunts the level instead: for each candidate it rebuilds the positive-part rows, re-solves the whole entropy pooling problem, and reads the tail mass off the posterior. This type holds the arguments of the Roots.jl call that drives the hunt. Where a group carries more than one view, OptimEntropyPooling takes over through the dm_opt field.
Fields
args: Additional positional arguments passed to the optimisation function.
kwargs: Additional keyword arguments passed to the optimisation function.
Constructors
ConditionalValueatRiskEntropyPooling(; args::Tuple = (Roots.Brent(),), kwargs::NamedTuple = (;)) -> ConditionalValueatRiskEntropyPoolingKeywords correspond to the struct's fields.
Examples
julia> ConditionalValueatRiskEntropyPooling()ConditionalValueatRiskEntropyPooling args ┼ Tuple{Roots.Brent}: (Roots.Brent(),) kwargs ┴ @NamedTuple{}: NamedTuple()Related
AbstractEntropyPoolingOptimiserOptimEntropyPoolingJuMPEntropyPoolingMeucciEntropyPoolingPriorRoots.jl
References
- [80] A. Meucci, D. Ardia and S. Keel. Fully flexible extreme views. The Journal of Risk 14, 39–49 (2011).
PortfolioOptimisers.OptimEntropyPooling — Type
struct OptimEntropyPooling{__T_args, __T_kwargs, __T_sc1, __T_sc2, __T_alg, __T_err} <: AbstractEntropyPoolingOptimiserSolves the dual of the entropy pooling problem with Optim.jl.
The dual has one variable per constraint rather than one per observation, and it is box constrained, so it is the cheaper route wherever the views reduce to rows of the constraint set. It has no room for an auxiliary variable, so it cannot express a tail view: use JuMPEntropyPooling there. It drives Optim.jl and takes either optimisation algorithm.
This route does not raise on an infeasible view set. entropy_pooling states the mechanism and the three signs that name that answer.
An empty args runs Optim under its own default Options, which stops on the step in x, on the change in the objective, or on the gradient, whichever comes first. The first two arrive before the dual reaches stationarity, so the posterior meets its views closely rather than exactly. Over the twelve single-view CVaR cases of test/test_12a_entropy_pooling.jl the default holds a posterior conditional value at risk to about 1e-7 of its target, and an Optim.Options with g_abstol = 1e-12 and outer_iterations = 50 holds it to about 1e-11. The default is the right trade for a view read once, and the tighter rule costs about 9% more time over that file.
Two readers magnify the shortfall. A staged chain refits the wrapped estimator between stages, so stage two projects a reference that already carries the error of stage one. The recursive CVaR route of MeucciEntropyPoolingPrior re-solves the whole problem at each candidate value at risk, so a solve that stops early moves the root the search returns. That route reports success on the outer variable alone, so the shortfall it carries is not bounded by the 1e-7 above: the same case has been measured at 3.1e-4 after other solves ran in the same process, and its own warning states that mode. Where the answer has to be repeatable, pass a tighter Optim.Options in args:
using PortfolioOptimisers: OptimOptimEntropyPooling(; args = (Optim.Fminbox(; mu0 = 1e-5), Optim.Options(; x_abstol = 1e-12, f_reltol = 1e-14, g_abstol = 1e-12, outer_x_abstol = 1e-12, iterations = 10_000, outer_iterations = 50)))Optim reaches this package as an internal binding, so the block names it through PortfolioOptimisers. A non-empty args replaces the Optim.Fminbox(; mu0 = 1e-5) that entropy_pooling supplies, so carry it yourself. See issues #573 and #574.
Fields
args: Additional positional arguments passed to the optimisation function.
kwargs: Additional keyword arguments passed to the optimisation function.
sc1: Scaling parameter for the objective function. It multiplies the dual objective and its gradient alike, so it leaves the minimiser unchanged and tightens the residualOptimstops at.
sc2:sc2: Half-width of the box the dual variables of the fixed equality rows are held in. It is the dual of a penalty of weightsc2on the norm of the slack the primal carries, so a larger value holds those rows tighter.
alg: Entropy pooling optimisation algorithm.
err: Tracking error tolerance. Only used when there are multiple cvar views. Ifnothing, the L2 norm is used.
Constructors
OptimEntropyPooling(; args::Tuple = (), kwargs::NamedTuple = (;), sc1::Number = 1, sc2::Number = 1e3, alg::AbstractEntropyPoolingOptAlgorithm = ExpEntropyPooling(), err::Option{<:NormError} = nothing) -> OptimEntropyPoolingKeywords correspond to the struct's fields.
Validation
sc1 >= 0.sc2 >= 0.
Examples
julia> OptimEntropyPooling()OptimEntropyPooling args ┼ Tuple{}: () kwargs ┼ @NamedTuple{}: NamedTuple() sc1 ┼ Int64: 1 sc2 ┼ Float64: 1000.0 alg ┼ ExpEntropyPooling() err ┴ nothingRelated
AbstractEntropyPoolingOptimiserLogEntropyPoolingExpEntropyPoolingJuMPEntropyPoolingConditionalValueatRiskEntropyPoolingMeucciEntropyPoolingPriorEntropyPoolingPriorOptim.jlNormError
References
- [78] A. Meucci. Fully flexible views: theory and practice. Risk 21, 97–102 (2008).
PortfolioOptimisers.JuMPEntropyPooling — Type
struct JuMPEntropyPooling{__T_slv, __T_sc1, __T_sc2, __T_so, __T_alg} <: AbstractEntropyPoolingOptimiserSolves the primal of the entropy pooling problem with JuMP.jl.
The primal carries one variable per observation and writes the divergence as a relative entropy cone. It is the only route that expresses a tail view, because a tail view needs auxiliary variables that the dual has no room for. It drives JuMP.jl and takes either optimisation algorithm.
Fields
slv: Solver or vector of solvers.
sc1:sc1: Scale of every row the model registers. It multiplies both sides of a row, so a positive value leaves the feasible set unchanged.
sc2: Scaling parameter for constraint penalties. It weights the norm of the fixed equality slack in the objective, so a larger value holds those rows tighter.
so: Objective scale factor.
alg: Entropy pooling optimisation algorithm.
Constructors
JuMPEntropyPooling(; slv::Slv_VecSlv, sc1::Number = 1, sc2::Number = 1e5, so::Number = 1, alg::AbstractEntropyPoolingOptAlgorithm = ExpEntropyPooling()) -> JuMPEntropyPoolingKeywords correspond to the struct's fields.
Validation
- If
slvis a vector,!isempty(slv). sc1 >= 0sc2 >= 0so >= 0
Examples
julia> JuMPEntropyPooling(; slv = Solver(; name = :fake_solver, solver = :MySolver))JuMPEntropyPooling slv ┼ Solver │ name ┼ Symbol: :fake_solver │ solver ┼ Symbol: :MySolver │ settings ┼ nothing │ check_sol ┼ @NamedTuple{}: NamedTuple() │ add_bridges ┴ Bool: true sc1 ┼ Int64: 1 sc2 ┼ Float64: 100000.0 so ┼ Int64: 1 alg ┴ ExpEntropyPooling()Related
AbstractEntropyPoolingOptimiserLogEntropyPoolingExpEntropyPoolingOptimEntropyPoolingConditionalValueatRiskEntropyPoolingMeucciEntropyPoolingPriorEntropyPoolingPriorJuMP.jl
References
- [78] A. Meucci. Fully flexible views: theory and practice. Risk 21, 97–102 (2008).
PortfolioOptimisers.ValueatRiskView — Type
struct ValueatRiskView{__T_views, __T_alpha} <: AbstractEntropyPoolingViewEstimatorA group of value at risk views, with the significance level they are read under.
Unlike a conditional or entropic value at risk view, a value at risk view is linear in the posterior probabilities: it reduces to rows of the constraint set through add_ep_constraint!, so it needs no auxiliary variable, admits no choice of formulation, and reaches OptimEntropyPooling as readily as JuMPEntropyPooling. That is why this estimator carries a level and nothing else.
The views this estimator holds accept == and >= alone, one asset per view, with a unit coefficient and a non-negative target. A prior(...) reference inside views is replaced by the prior value at risk at this group's alpha, so a view stated against the prior moves with the level.
Fields
views: Value-at-risk view constraints estimator.
alpha: Significance level the views this estimator holds are read under.
Constructors
ValueatRiskView(; views::LinearConstraintEstimator, alpha::Number = 0.05) -> ValueatRiskViewKeywords correspond to the struct's fields.
Validation
0 < alpha < 1.
Examples
julia> ValueatRiskView(; alpha = 0.01, views = LinearConstraintEstimator(; val = "A >= 0.05"))ValueatRiskView views ┼ LinearConstraintEstimator │ val ┼ String: "A >= 0.05" │ key ┴ nothing alpha ┴ Float64: 0.01Related
References
- [78] A. Meucci. Fully flexible views: theory and practice. Risk 21, 97–102 (2008).
PortfolioOptimisers.LinearConditionalValueatRiskView — Type
struct LinearConditionalValueatRiskView <: AbstractConditionalValueatRiskViewFormulationLinear formulation of a conditional value-at-risk view [1].
LinearConditionalValueatRiskView writes the view through the dual representation of CVaR. It adds $T$ continuous variables and no integer variable, so it is the cheapest of the two CVaR formulations, and it is exact.
It accepts the operators >= and ==, over any number of assets whose coefficients share one sign. An equality view needs a target greater than or equal to the prior CVaR of the view's left hand side. Below it the constraint is slack at the prior, so the entropy minimiser leaves the prior untouched and the view is not met. Use IntegerConditionalValueatRiskView or SequentialConditionalValueatRiskView there, and for a relative view whose coefficients carry both signs.
Mathematical definition
The view $\mathrm{CVaR}_{\alpha}(X) \geq \bar{c}$ on one asset is written as:
\[\begin{align} &\nu_{j} \geq 0\,, &\forall\, j = 1,\ldots,T\\ &\nu_{j} \leq \dfrac{w_{j}}{\alpha}\,, &\forall\, j = 1,\ldots,T\\ &\sum_{j=1}^{T} \nu_{j} = 1\\ &\sum_{j=1}^{T} \nu_{j} x_{j} \geq \bar{c}\,. \end{align}\]
Where:
- $\mathrm{CVaR}_{\alpha}(X)$: Conditional value at risk of the loss series $\boldsymbol{x}$ at level $\alpha$.
- $\boldsymbol{x}$: $T \times 1$ loss series of one asset, the negated returns, whose $j$-th entry is $x_{j}$.
- $\boldsymbol{w}$: $T \times 1$ observation probabilities, summing to one. In a view they are the posterior probabilities the model solves for.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $T$: Number of observations.
- $\bar{c}$: Target conditional value at risk of the view.
- $\boldsymbol{\nu}$: $T \times 1$ vector of weights that attains the risk measure, the variable of its dual representation.
The box and the simplex describe every reweighting of the sample that no observation gives more than $1/\alpha$ times its posterior probability, and the largest loss such a reweighting attains is the CVaR. So the constraint set is feasible if and only if $\mathrm{CVaR}_{\alpha}(X) \geq \bar{c}$, and a lower-bound view is exact.
A view over several assets, $\sum_{i} \gamma_{i} \mathrm{CVaR}_{\alpha}(X_{i}) \geq \bar{c}$ with every $\gamma_{i} > 0$, takes one block of the first three rows per asset, and the last row reads $\sum_{i} \gamma_{i} \sum_{j=1}^{T} \nu_{i,\,j} x_{i,\,j} \geq \bar{c}$. The CVaR is concave in the probabilities, so a positive combination of CVaRs is concave and its lower level set is convex. Each block attains its asset's CVaR on its own, so the encoding stays exact. A view with coefficients of both signs has no convex lower level set, and this formulation refuses it.
Examples
julia> LinearConditionalValueatRiskView()LinearConditionalValueatRiskView()Related
AbstractConditionalValueatRiskViewFormulationIntegerConditionalValueatRiskViewSequentialConditionalValueatRiskViewEntropyPoolingPrior
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.IntegerConditionalValueatRiskView — Type
struct IntegerConditionalValueatRiskView{__T_sbar} <: AbstractConditionalValueatRiskViewFormulationInteger formulation of a conditional value-at-risk view [1].
IntegerConditionalValueatRiskView writes the view through the ordered weights representation of CVaR, selecting the tail of the posterior with a monotone binary vector. It expresses every comparison operator and any linear combination of per-asset CVaRs, at the cost of sbar binary variables per asset named by the view. It needs a solver that handles mixed-integer exponential cone programs.
Fields
sbar: Number of largest losses considered by the integer conditional value-at-risk formulation. AnIntegeris a count, a fraction in(0, 1]is a fraction of the observations, andnothingapplies the rule of thumbmax(2 * s, ceil(Int, 2 * alpha * T))capped atT, wheresis the number of positions, counted from the largest loss, at which the prior probabilities first reachalpha. The rule comes from the reference, which observes that a view above the prior CVaR needs aboutspositions and a view below it needs more. It trades exactness for solve time:sbar = Tis always exact, and a smallersbaris exact whenever the posterior puts at leastalphaof its mass on thesbarlargest losses, and infeasible otherwise. Raise it when the solve reports infeasibility.
Mathematical definition
The conditional value at risk is the mean of the $\alpha$ heaviest tail mass of the posterior, and this formulation states it over the $\bar{s}$ largest losses alone:
\[\begin{align} &y_{j} \leq y_{j+1}\,, &\forall\, j = 1,\ldots,\bar{s}-1\\ &q_{j} \leq y_{j}\,, &\forall\, j = 1,\ldots,\bar{s}\\ &q_{j} \leq w_{[j]}\,, &\forall\, j = 1,\ldots,\bar{s}\\ &q_{j} \geq w_{[j]} - (1 - y_{j})\,, &\forall\, j = 1,\ldots,\bar{s}\\ &q_{j} \geq 0\,, &\forall\, j = 1,\ldots,\bar{s}\\ &\alpha = \sum_{j=1}^{\bar{s}} q_{j}\\ &\boldsymbol{y} \in \{0,1\}^{\bar{s}}\\ &\mathrm{CVaR}_{\alpha}(X) = \dfrac{1}{\alpha} \sum_{j=1}^{\bar{s}} q_{j} x_{[j]}\,. \end{align}\]
Where:
- $\mathrm{CVaR}_{\alpha}(X)$: Conditional value at risk of the loss series $\boldsymbol{x}$ at level $\alpha$.
- $\boldsymbol{w}$: $T \times 1$ observation probabilities, summing to one. In a view they are the posterior probabilities the model solves for.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $x_{[1]} \leq x_{[2]} \leq \ldots \leq x_{[\bar{s}]}$: The $\bar{s}$ largest losses of the asset, sorted ascending, so the largest loss is last.
- $w_{[j]}$: Posterior probability of the observation in position $j$.
- $\bar{s}$: Number of largest losses the formulation reads.
- $\boldsymbol{y}$: $\bar{s} \times 1$ binary vector that marks the observations entering the tail.
- $\boldsymbol{q}$: $\bar{s} \times 1$ auxiliary vector that carries the product $q_{j} = w_{[j]} y_{j}$.
The monotonicity constraint makes the marked set a suffix of the ascending order, which is what makes the expression the CVaR rather than the mean of an arbitrary subset of probability $\alpha$.
Constructors
IntegerConditionalValueatRiskView(; sbar::Option{<:Number} = nothing) -> IntegerConditionalValueatRiskViewKeywords correspond to the struct's fields.
Validation
- If
sbaris anInteger,sbar >= 1. - If
sbaris not anInteger,0 < sbar < 1. Use anIntegerto name the whole sample.
Examples
julia> IntegerConditionalValueatRiskView()IntegerConditionalValueatRiskView sbar ┴ nothingRelated
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.ConicEntropicValueatRiskView — Type
struct ConicEntropicValueatRiskView <: AbstractEntropicValueatRiskViewFormulationExponential cone formulation of an entropic value-at-risk view [1].
ConicEntropicValueatRiskView writes the view through the dual representation of EVaR. It adds $T$ continuous variables and one relative entropy cone, and it is exact.
It accepts the operators >= and ==, over any number of assets whose coefficients share one sign. An equality view needs a target greater than or equal to the prior EVaR of the view's left hand side. Use GridEntropicValueatRiskView or SequentialEntropicValueatRiskView below it, and the latter for a relative view whose coefficients carry both signs.
Mathematical definition
The view $\mathrm{EVaR}_{\alpha}(X) \geq \bar{e}$ on one asset is written as:
\[\begin{align} &0 \leq \nu_{j} \leq 1\,, &\forall\, j = 1,\ldots,T\\ &\sum_{j=1}^{T} \nu_{j} \ln\left(\dfrac{\nu_{j}}{w_{j}}\right) \leq \ln\left(\dfrac{1}{\alpha}\right)\\ &\sum_{j=1}^{T} \nu_{j} = 1\\ &\sum_{j=1}^{T} \nu_{j} x_{j} \geq \bar{e}\,. \end{align}\]
Where:
- $\mathrm{EVaR}_{\alpha}(X)$: Entropic value at risk of the loss series $\boldsymbol{x}$ at level $\alpha$.
- $\boldsymbol{x}$: $T \times 1$ loss series of one asset, the negated returns, whose $j$-th entry is $x_{j}$.
- $\boldsymbol{w}$: $T \times 1$ observation probabilities, summing to one. In a view they are the posterior probabilities the model solves for.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $T$: Number of observations.
- $\bar{e}$: Target entropic value at risk of the view.
- $\boldsymbol{\nu}$: $T \times 1$ vector of weights that attains the risk measure, the variable of its dual representation.
The relative entropy budget is the dual description of EVaR, so the constraint set is feasible if and only if $\mathrm{EVaR}_{\alpha}(X) \geq \bar{e}$.
A view over several assets, $\sum_{i} \gamma_{i} \mathrm{EVaR}_{\alpha}(X_{i}) \geq \bar{e}$ with every $\gamma_{i} > 0$, takes one block of the first three rows per asset, and the last row reads $\sum_{i} \gamma_{i} \sum_{j=1}^{T} \nu_{i,\,j} x_{i,\,j} \geq \bar{e}$. The EVaR is concave in the probabilities, so a positive combination of EVaRs is concave and its lower level set is convex. Each block attains its asset's EVaR on its own, so the encoding stays exact. A view with coefficients of both signs has no convex lower level set, and this formulation refuses it.
Examples
julia> ConicEntropicValueatRiskView()ConicEntropicValueatRiskView()Related
AbstractEntropicValueatRiskViewFormulationGridEntropicValueatRiskViewSequentialEntropicValueatRiskViewEntropyPoolingPrior
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.GridEntropicValueatRiskView — Type
struct GridEntropicValueatRiskView{__T_pct, __T_K, __T_M, __T_iters, __T_tol, __T_tilt_iters} <: AbstractEntropicValueatRiskViewFormulationGrid formulation of an entropic value-at-risk view [1].
GridEntropicValueatRiskView writes the view on a grid of values of the EVaR dual variable, built around the value that attains the prior EVaR of the asset. A lower-bound view is a set of linear constraints and needs no integer variable. An upper-bound or equality view selects one grid point with a binary vector and a big-$M$ relaxation, and needs a solver that handles mixed-integer exponential cone programs.
Rows reach the model divided by their largest coefficient, so the coefficients sit in (0, 1], the posterior sums to one, and the left-hand side is bounded by one whatever the data. The default M clears that bound by an order of magnitude.
The answer is approximate in both directions. A lower-bound view holds at the grid points and may fall short between them, and an upper-bound view holds at one grid point and may be conservative. Widen pct or raise K when the posterior value misses the target, and prefer ConicEntropicValueatRiskView whenever the view admits it.
It accepts ==, >= and <=, one asset per view. The view is normalised so its coefficient is one, which flips the operator when the coefficient is negative, so this formulation restricts neither the operator nor the sign.
Fields
pct: Fractional half-width of the grid of entropic value-at-risk dual variables, centred on the value that attains the prior entropic value-at-risk. An upper-bound or equality view centres the grid on the valueep_evar_anchorfinds instead, and the width then covers the movement the other views of the model cause.
K: Number of points of the grid of entropic value-at-risk dual variables. Must be odd, so the centre is a point of the grid. The points are equidistant and spanzc * (1 - pct)tozc * (1 + pct)for a grid centred onzc, soKsets the resolution of the grid alone. Every point is one more binary variable of the mixed-integer program an upper-bound or equality view builds, so raise it whenpctwidens rather than on its own.
M: Big-M constant of the grid entropic value-at-risk formulation.
iters: Largest number of steps the iteration that centres the grid takes. It reaches the anchor alone, which a lower-bound view does not run.
tol: Relative distance from the target at which the iteration that centres the grid stops. It reaches the anchor alone, which a lower-bound view does not run.
tilt_iters: Largest number of bisection steps the tilt of one row takes (seeep_row_tilt). The bisection stops on its own when the midpoint stops moving, which forFloat64happens near step 64, so this binds only a type of higher precision.
Mathematical definition
The sample EVaR is the value of a scalar minimisation:
\[\begin{align} \mathrm{EVaR}_{\alpha}(X) &= \underset{z > 0}{\min} \; z \ln\left(\dfrac{\sum_{j=1}^{T} w_{j} \exp(x_{j}/z)}{\alpha}\right)\,. \end{align}\]
So $\mathrm{EVaR}_{\alpha}(X) \geq \bar{e}$ holds exactly when the objective is at or above $\bar{e}$ at every $z$, and $\mathrm{EVaR}_{\alpha}(X) \leq \bar{e}$ holds when it is at or below $\bar{e}$ at some $z$. The objective is linear in $\boldsymbol{w}$ once $z$ is fixed, which is what makes a grid point a row. On a grid $\bar{z}_{1},\ldots,\bar{z}_{K}$ that gives, for a lower-bound view:
\[\begin{align} &\dfrac{\sum_{j=1}^{T} w_{j} \exp(x_{j}/\bar{z}_{k})}{\exp(\bar{e}/\bar{z}_{k})} \geq \alpha\,, &\forall\, k = 1,\ldots,K \end{align}\]
and for an upper-bound view, with $\boldsymbol{y}$ a binary selector and $M$ a big constant:
\[\begin{align} &\boldsymbol{1}^{\intercal} \boldsymbol{y} = 1\\ &\dfrac{\sum_{j=1}^{T} w_{j} \exp(x_{j}/\bar{z}_{k})}{\exp(\bar{e}/\bar{z}_{k})} \leq \alpha + M(1 - y_{k})\,, &\forall\, k = 1,\ldots,K\\ &\boldsymbol{y} \in \{0,1\}^{K}\,. \end{align}\]
Where:
- $\mathrm{EVaR}_{\alpha}(X)$: Entropic value at risk of the loss series $\boldsymbol{x}$ at level $\alpha$.
- $\boldsymbol{x}$: $T \times 1$ loss series of one asset, the negated returns, whose $j$-th entry is $x_{j}$.
- $\boldsymbol{w}$: $T \times 1$ observation probabilities, summing to one. In a view they are the posterior probabilities the model solves for.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $T$: Number of observations.
- $\bar{e}$: Target entropic value at risk of the view.
- $z > 0$: Dual variable of the entropic value at risk.
- $\bar{z}_{k}$: Dual variable of the $k$-th grid point.
- $K$: Number of grid points.
- $\boldsymbol{y}$: $K \times 1$ binary selector, one entry per grid point.
- $M$: Big-M constant.
An equality view carries both blocks.
Constructors
GridEntropicValueatRiskView(; pct::Number = 0.5, K::Integer = 11, M::Number = 10, iters::Integer = 50, tol::Number = 1e-10, tilt_iters::Integer = 200) -> GridEntropicValueatRiskViewKeywords correspond to the struct's fields.
Validation
0 < pct < 1.isodd(K)and1 <= K <= RESOURCE_LIMITS[].max_ep_grid(every grid point is one binary variable of the mixed-integer program an upper-bound or equality view builds; seeRESOURCE_LIMITS).M > 0.iters >= 1.tol >= 0.tilt_iters >= 1.
Examples
julia> GridEntropicValueatRiskView()GridEntropicValueatRiskView pct ┼ Float64: 0.5 K ┼ Int64: 11 M ┼ Int64: 10 iters ┼ Int64: 50 tol ┼ Float64: 1.0e-10 tilt_iters ┴ Int64: 200Related
AbstractEntropicValueatRiskViewFormulationConicEntropicValueatRiskViewEntropyPoolingPriorep_evar_anchorep_evar_grid
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.ConicRelativisticValueatRiskView — Type
struct ConicRelativisticValueatRiskView <: AbstractRelativisticValueatRiskViewFormulationPower cone formulation of a relativistic value-at-risk view [2].
ConicRelativisticValueatRiskView writes the view through the dual representation of RLVaR. It adds $3T$ continuous variables and $2T$ power cones, and it is exact.
It accepts the operators >= and ==, over any number of assets whose coefficients share one sign. An equality view needs a target greater than or equal to the prior RLVaR of the view's left hand side. Use GridRelativisticValueatRiskView or SequentialRelativisticValueatRiskView below it, and the latter for a relative view whose coefficients carry both signs. The solver must handle the power cone alongside the exponential cone the entropy pooling objective needs.
The programme is a demanding solve. A long sample, a small alpha, a small kappa or several of these views in one model can make a conic solver stop short of a solution. Give opt a vector of solver configurations, shorten the sample, or state the view under GridRelativisticValueatRiskView, whose rows are linear in the posterior probabilities.
Mathematical definition
The view $\mathrm{RLVaR}_{\alpha,\kappa}(X) \geq \bar{\vartheta}$ on one asset is written as:
\[\begin{align} &0 \leq \nu_{j} \leq 1\,, &\forall\, j = 1,\ldots,T\\ &\sum_{j=1}^{T} \nu_{j} = 1\\ &\sum_{j=1}^{T} \dfrac{\tau_{j} - \varsigma_{j}}{2\kappa} \leq \ln_{\kappa}\left(\dfrac{1}{\alpha T}\right)\\ &\left(\tau_{j},\, T w_{j},\, \nu_{j}\right) \in \mathcal{K}_{\mathrm{pow}}\left(\dfrac{1}{1+\kappa}\right)\,, &\forall\, j = 1,\ldots,T\\ &\left(\nu_{j},\, T w_{j},\, \varsigma_{j}\right) \in \mathcal{K}_{\mathrm{pow}}(1-\kappa)\,, &\forall\, j = 1,\ldots,T\\ &\sum_{j=1}^{T} \nu_{j} x_{j} \geq \bar{\vartheta}\,. \end{align}\]
Where:
- $\mathrm{RLVaR}_{\alpha,\kappa}(X)$: Relativistic value at risk of the loss series $\boldsymbol{x}$ at level $\alpha$ and deformation $\kappa$.
- $\boldsymbol{x}$: $T \times 1$ loss series of one asset, the negated returns, whose $j$-th entry is $x_{j}$.
- $\boldsymbol{w}$: $T \times 1$ observation probabilities, summing to one. In a view they are the posterior probabilities the model solves for.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $\kappa$: Kaniadakis deformation parameter, $\kappa \in (0, 1)$.
- $T$: Number of observations.
- $\ln_{\kappa}(u) = \dfrac{u^{\kappa} - u^{-\kappa}}{2 \kappa}$: Kaniadakis logarithm.
- $\bar{\vartheta}$: Target relativistic value at risk of the view.
- $\boldsymbol{\nu}$: $T \times 1$ vector of weights that attains the RLVaR.
- $\boldsymbol{\tau}$, $\boldsymbol{\varsigma}$: $T \times 1$ vectors that carry the Kaniadakis entropy budget of $\boldsymbol{\nu}$.
- $\mathcal{K}_{\mathrm{pow}}(p) = \{(a,b,c) : a^{p} b^{1-p} \geq |c|,\, a \geq 0,\, b \geq 0\}$: Power cone.
The budget is the dual description of RLVaR, so the constraint set is feasible if and only if $\mathrm{RLVaR}_{\alpha,\kappa}(X) \geq \bar{\vartheta}$.
A view over several assets, $\sum_{i} \gamma_{i} \mathrm{RLVaR}_{\alpha,\kappa}(X_{i}) \geq \bar{\vartheta}$ with every $\gamma_{i} > 0$, takes one block of the first five rows per asset, and the last row reads $\sum_{i} \gamma_{i} \sum_{j=1}^{T} \nu_{i,\,j} x_{i,\,j} \geq \bar{\vartheta}$. The RLVaR is concave in the probabilities, so a positive combination of RLVaRs is concave and its lower level set is convex. Each block attains its asset's RLVaR on its own, so the encoding stays exact. A view with coefficients of both signs has no convex lower level set, and this formulation refuses it.
Examples
julia> ConicRelativisticValueatRiskView()ConicRelativisticValueatRiskView()Related
AbstractRelativisticValueatRiskViewFormulationGridRelativisticValueatRiskViewSequentialRelativisticValueatRiskViewConicEntropicValueatRiskViewEntropyPoolingPriorkappa_log
References
- [2] D. Cajas. Entropy Pooling with Relativistic Value at Risk Views. Available at SSRN 7329718 (2026).
PortfolioOptimisers.GridRelativisticValueatRiskView — Type
struct GridRelativisticValueatRiskView{__T_pct, __T_K, __T_M, __T_iters, __T_tol, __T_tilt_iters} <: AbstractRelativisticValueatRiskViewFormulationGrid formulation of a relativistic value-at-risk view.
GridRelativisticValueatRiskView writes the view on a grid of points of the primal programme of RLVaR, centred on the point a posterior that meets the view attains. A lower-bound view is a set of linear constraints and needs no integer variable. An upper-bound or equality view selects one grid point with a binary vector and a big-$M$ relaxation, and needs a solver that handles mixed-integer exponential cone programs.
Rows reach the model divided by their largest coefficient, so the coefficients sit in (0, 1], the posterior sums to one, and the left-hand side is bounded by one whatever the data. The default M clears that bound by an order of magnitude.
It accepts ==, >= and <=, one asset per view. The view is normalised so its coefficient is one, which flips the operator when the coefficient is negative, so this formulation restricts neither the operator nor the sign.
As kappa approaches one the RLVaR approaches the largest loss, and ep_rlvar_tail overflows at the dual variable that attains it. The points it overflows at are dropped, and a grid that keeps none of them raises. The centre of the grid is found by an iteration that reads the same tail function, so it too stops converging there and the grid falls back to the prior's dual variable, which lands short of the target. Prefer a smaller kappa, or ConicRelativisticValueatRiskView where the operator admits it.
Fields
pct: Fractional half-width of the grid of relativistic value-at-risk dual variables, centred on the value a posterior that meets the view attains. The centre already holds that value for a view stated on its own, so the width covers the movement the other views of the model cause. A lower-bound view, and a view whose centre is not found, falls back to the value that attains the prior relativistic value-at-risk, and the width then decides whether the view lands on its target.
K: Number of points of the grid of relativistic value-at-risk dual variables. Must be odd, so the centre is a point of the grid. It sets the resolution of the grid alone, and the spacing is2 * pct * zc / (K - 1)for a grid centred onzc. Every point is one more binary variable of the mixed-integer program an upper-bound or equality view builds, so raise it whenpctwidens rather than on its own.
M: Big-M constant of the grid relativistic value-at-risk formulation.
iters: Largest number of steps the iteration that centres the grid takes. It reaches the anchor alone, which a lower-bound view does not run.
tol: Relative distance from the target at which the iteration that centres the grid stops. It reaches the anchor alone, which a lower-bound view does not run.
tilt_iters: Largest number of bisection steps the tilt of one row takes (seeep_row_tilt). The bisection stops on its own when the midpoint stops moving, which forFloat64happens near step 64, so this binds only a type of higher precision.
Mathematical definition
The sample RLVaR is the value of a two-variable minimisation, in which the pair of power cones of each observation is already minimised out:
\[\begin{align} \mathrm{RLVaR}_{\alpha,\kappa}(X) &= \underset{t,\, z > 0}{\min} \; t + z \ln_{\kappa}\left(\dfrac{1}{\alpha T}\right) + T \sum_{j=1}^{T} w_{j} \varphi_{\kappa}(t - x_{j},\, z)\,, \end{align}\]
where $\varphi_{\kappa}(u, z)$ is the smallest $\psi + \theta$ the two power cones of one observation allow, and has the closed form:
\[\begin{align} \varphi_{\kappa}(u, z) &= \dfrac{\kappa}{1+\kappa} \left(\dfrac{2\kappa}{(1+\kappa) z}\right)^{\frac{1}{\kappa}} \left(\dfrac{\sigma - u}{2}\right)^{\frac{1+\kappa}{\kappa}} + \kappa (1-\kappa)^{\frac{1-\kappa}{\kappa}} \left(\dfrac{z}{2\kappa}\right)^{\frac{1}{\kappa}} \left(\dfrac{\sigma + u}{2}\right)^{-\frac{1-\kappa}{\kappa}}\,,\\ \sigma &= \sqrt{u^{2} + \dfrac{(1 - \kappa^{2}) z^{2}}{\kappa^{2}}}\,. \end{align}\]
The objective is linear in $\boldsymbol{w}$ once $t$ and $z$ are fixed, which is what makes a grid point a row. On a grid $(\bar{t}_{1}, \bar{z}_{1}),\ldots,(\bar{t}_{K}, \bar{z}_{K})$ that gives, for a lower-bound view:
\[\begin{align} &T \sum_{j=1}^{T} w_{j} \varphi_{\kappa}(\bar{t}_{k} - x_{j},\, \bar{z}_{k}) \geq \bar{\vartheta} - \bar{t}_{k} - \bar{z}_{k} \ln_{\kappa}\left(\dfrac{1}{\alpha T}\right)\,, &\forall\, k = 1,\ldots,K \end{align}\]
and for an upper-bound view, with $\boldsymbol{y}$ a binary selector and $M$ a big constant:
\[\begin{align} &\boldsymbol{1}^{\intercal} \boldsymbol{y} = 1\\ &T \sum_{j=1}^{T} w_{j} \varphi_{\kappa}(\bar{t}_{k} - x_{j},\, \bar{z}_{k}) \leq \bar{\vartheta} - \bar{t}_{k} - \bar{z}_{k} \ln_{\kappa}\left(\dfrac{1}{\alpha T}\right) + M(1 - y_{k})\,, &\forall\, k = 1,\ldots,K\\ &\boldsymbol{y} \in \{0,1\}^{K}\,. \end{align}\]
Where:
- $\mathrm{RLVaR}_{\alpha,\kappa}(X)$: Relativistic value at risk of the loss series $\boldsymbol{x}$ at level $\alpha$ and deformation $\kappa$.
- $\boldsymbol{x}$: $T \times 1$ loss series of one asset, the negated returns, whose $j$-th entry is $x_{j}$.
- $\boldsymbol{w}$: $T \times 1$ observation probabilities, summing to one. In a view they are the posterior probabilities the model solves for.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $\kappa$: Kaniadakis deformation parameter, $\kappa \in (0, 1)$.
- $T$: Number of observations.
- $\ln_{\kappa}(u) = \dfrac{u^{\kappa} - u^{-\kappa}}{2 \kappa}$: Kaniadakis logarithm.
- $\bar{\vartheta}$: Target relativistic value at risk of the view.
- $t$: Shift variable of the primal programme.
- $z > 0$: Dual variable of the primal programme.
- $u$: Shifted loss of one observation, $t - x_{j}$.
- $\sigma$: Positive root of the stationarity condition of $\varphi_{\kappa}$.
- $\varphi_{\kappa}(u, z)$: Smallest sum the pair of power cones of one observation allows.
- $\psi$, $\theta$: The two tail variables of one observation, whose smallest sum is $\varphi_{\kappa}$.
- $\bar{t}_{k}$, $\bar{z}_{k}$: Shift and dual variable of the $k$-th grid point.
- $K$: Number of grid points.
- $\boldsymbol{y}$: $K \times 1$ binary selector, one entry per grid point.
- $M$: Big-M constant.
An equality view carries both blocks. Every grid point is a feasible point of the primal programme, so the upper-bound block is never violated: it can only be tighter than the view asks. The lower-bound block holds at the grid points and may fall short between them, so prefer ConicRelativisticValueatRiskView whenever the view admits it.
Constructors
GridRelativisticValueatRiskView(; pct::Number = 0.5, K::Integer = 11, M::Number = 10, iters::Integer = 50, tol::Number = 1e-10, tilt_iters::Integer = 200) -> GridRelativisticValueatRiskViewKeywords correspond to the struct's fields.
Validation
0 < pct < 1.isodd(K)and1 <= K <= RESOURCE_LIMITS[].max_ep_grid(every grid point is one binary variable of the mixed-integer program an upper-bound or equality view builds; seeRESOURCE_LIMITS).M > 0.iters >= 1.tol >= 0.tilt_iters >= 1.
Examples
julia> GridRelativisticValueatRiskView()GridRelativisticValueatRiskView pct ┼ Float64: 0.5 K ┼ Int64: 11 M ┼ Int64: 10 iters ┼ Int64: 50 tol ┼ Float64: 1.0e-10 tilt_iters ┴ Int64: 200Related
AbstractRelativisticValueatRiskViewFormulationConicRelativisticValueatRiskViewGridEntropicValueatRiskViewEntropyPoolingPriorep_rlvar_anchorep_rlvar_gridep_rlvar_tailkappa_log
References
- [2] D. Cajas. Entropy Pooling with Relativistic Value at Risk Views. Available at SSRN 7329718 (2026).
PortfolioOptimisers.SequentialConditionalValueatRiskView — Type
struct SequentialConditionalValueatRiskView{__T_iters, __T_tol} <: AbstractConditionalValueatRiskViewFormulationSequential convex formulation of a conditional value-at-risk view.
SequentialConditionalValueatRiskView writes every view LinearConditionalValueatRiskView cannot, with no integer variable: an upper bound, an equality below the prior CVaR, and a relative view whose coefficients carry both signs. It replaces the CVaR of every asset on the wrong side of the inequality by a linear upper bound, solves the convex problem that results, and re-solves with the bound re-read at the posterior until the bound is tight. The view holds on every posterior of that sequence, and the divergence of each is at most that of the one before it.
The posterior is a local minimiser of the divergence. The feasible set of an upper-bound or relative CVaR view is not convex, so no convex program describes it exactly, and the sequence stops at a fixed point rather than at the posterior of least divergence. IntegerConditionalValueatRiskView reaches the latter, at the cost of binary variables and a solver that handles mixed-integer exponential cone programs. A view of one asset with a lower-bound operator is convex, and the formulation then reduces to the linear one with no re-solve.
Mathematical definition
Orient the view as a lower bound, negating both sides where its operator is <=, and write $\mathcal{P}$ for the assets whose coefficient is then positive and $\mathcal{N}$ for those whose coefficient is negative. The conditional value at risk is concave in the observation probabilities, so the assets of $\mathcal{P}$ take the dual representation of LinearConditionalValueatRiskView, which is exact, and each asset of $\mathcal{N}$ takes the primal representation at a fixed value $\eta_{i}$ of its value at risk, which bounds the measure from above:
\[\begin{align} \mathrm{CVaR}_{\alpha}(X_{i}) &\leq \eta_{i} + \dfrac{1}{\alpha} \sum_{j=1}^{T} w_{j} \left(x_{i,\,j} - \eta_{i}\right)^{+}\,, &\forall\, i \in \mathcal{N}\\ \bar{c} &\leq \sum_{i \in \mathcal{P}} \gamma_{i} \sum_{j=1}^{T} \nu_{i,\,j} x_{i,\,j} + \sum_{i \in \mathcal{N}} \gamma_{i} \left(\eta_{i} + \dfrac{1}{\alpha} \sum_{j=1}^{T} w_{j} \left(x_{i,\,j} - \eta_{i}\right)^{+}\right)\,. \end{align}\]
The bound holds with equality where $\eta_{i}$ is the value at risk of $X_{i}$ under $\boldsymbol{w}$, so the row is tight at the probabilities it was read at. Each re-solve reads $\eta_{i}$ at the last posterior, which stays feasible for the row that results, and that is why the divergence cannot rise. An equality view is written as the bound the prior violates, and the entropy minimiser makes it tight.
Where:
- $x_{i,\,j}$: Loss of asset $i$ at observation $j$, the negated return.
- $\boldsymbol{w}$: $T \times 1$ observation probabilities, summing to one. In a view they are the posterior probabilities the model solves for.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $\bar{c}$: Target conditional value at risk of the view.
- $\boldsymbol{\nu}_{i}$: $T \times 1$ vector of weights that attains the CVaR of asset $i$, the variable of its dual representation.
- $\gamma_{i}$: Coefficient the view gives asset $i$.
- $\eta_{i}$: Value at risk of asset $i$ under the probabilities the row was read at.
- $\mathcal{P}$, $\mathcal{N}$: Assets whose coefficient is positive and negative once the view is oriented as a lower bound.
Fields
iters: Largest number of re-solves after the first solve. Each re-solve reads the multipliers of the primal representation at the last posterior, which tightens the surrogate row. Zero keeps the first posterior, on which the view holds but the row is slack.
tol: Relative gap between the surrogate row and the risk measures it bounds at which the re-solves stop. It is read against the larger of the view's target and the largest loss the view names.
Constructors
SequentialConditionalValueatRiskView(; iters::Integer = 20, tol::Number = 1e-8) -> SequentialConditionalValueatRiskViewKeywords correspond to the struct's fields.
Validation
iters >= 0.tol > 0.
Examples
julia> SequentialConditionalValueatRiskView()SequentialConditionalValueatRiskView iters ┼ Int64: 20 tol ┴ Float64: 1.0e-8Related
AbstractConditionalValueatRiskViewFormulationLinearConditionalValueatRiskViewIntegerConditionalValueatRiskViewSequentialEntropicValueatRiskViewSequentialRelativisticValueatRiskViewConditionalValueatRiskViewEntropyPoolingPrior
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.SequentialEntropicValueatRiskView — Type
struct SequentialEntropicValueatRiskView{__T_iters, __T_tol} <: AbstractEntropicValueatRiskViewFormulationSequential convex formulation of an entropic value-at-risk view.
SequentialEntropicValueatRiskView writes every view ConicEntropicValueatRiskView cannot, with no integer variable and no grid: an upper bound, an equality below the prior EVaR, and a relative view whose coefficients carry both signs. It replaces the EVaR of every asset on the wrong side of the inequality by a linear upper bound, solves the convex problem that results, and re-solves with the bound re-read at the posterior until the bound is tight. The view holds on every posterior of that sequence, and the divergence of each is at most that of the one before it.
The posterior is a local minimiser of the divergence. The feasible set of an upper-bound or relative EVaR view is not convex, so no convex program describes it exactly, and the sequence stops at a fixed point rather than at the posterior of least divergence. GridEntropicValueatRiskView searches a grid of dual variables with binary variables instead, and holds the view only at the grid points. A view of one asset with a lower-bound operator is convex, and the formulation then reduces to the conic one with no re-solve.
Mathematical definition
Orient the view as a lower bound, negating both sides where its operator is <=, and write $\mathcal{P}$ for the assets whose coefficient is then positive and $\mathcal{N}$ for those whose coefficient is negative. The entropic value at risk is concave in the observation probabilities, so the assets of $\mathcal{P}$ take the dual representation of ConicEntropicValueatRiskView, which is exact. Each asset of $\mathcal{N}$ takes the primal representation at a fixed dual variable $z_{i}$, which bounds the measure from above and is itself concave in the probabilities, so its tangent at the probabilities $\boldsymbol{w}^{0}$ it was read at bounds it again:
\[\begin{align} \mathrm{EVaR}_{\alpha}(X_{i}) &\leq z_{i} \ln\left(\dfrac{1}{\alpha} \sum_{j=1}^{T} w_{j} e^{x_{i,\,j}/z_{i}}\right) \leq \mathrm{EVaR}_{\alpha}(X_{i};\, \boldsymbol{w}^{0}) - z_{i} + \sum_{j=1}^{T} w_{j} \dfrac{z_{i} e^{x_{i,\,j}/z_{i}}}{\sum_{k=1}^{T} w^{0}_{k} e^{x_{i,\,k}/z_{i}}}\,, &\forall\, i \in \mathcal{N}\\ \bar{e} &\leq \sum_{i \in \mathcal{P}} \gamma_{i} \sum_{j=1}^{T} \nu_{i,\,j} x_{i,\,j} + \sum_{i \in \mathcal{N}} \gamma_{i} \left(\mathrm{EVaR}_{\alpha}(X_{i};\, \boldsymbol{w}^{0}) - z_{i} + \sum_{j=1}^{T} w_{j} \dfrac{z_{i} e^{x_{i,\,j}/z_{i}}}{\sum_{k=1}^{T} w^{0}_{k} e^{x_{i,\,k}/z_{i}}}\right)\,. \end{align}\]
Both bounds hold with equality at $\boldsymbol{w} = \boldsymbol{w}^{0}$ where $z_{i}$ attains the EVaR there, so the row is tight at the probabilities it was read at. Each re-solve reads $z_{i}$ and the tangent at the last posterior, which stays feasible for the row that results, and that is why the divergence cannot rise. An equality view is written as the bound the prior violates, and the entropy minimiser makes it tight.
Where:
- $x_{i,\,j}$: Loss of asset $i$ at observation $j$, the negated return.
- $\boldsymbol{w}$: $T \times 1$ observation probabilities, summing to one. In a view they are the posterior probabilities the model solves for.
- $\boldsymbol{w}^{0}$: Probabilities the row was read at, the prior for the first solve and the last posterior for each re-solve.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $\bar{e}$: Target entropic value at risk of the view.
- $\boldsymbol{\nu}_{i}$: $T \times 1$ vector of weights that attains the EVaR of asset $i$, the variable of its dual representation.
- $\gamma_{i}$: Coefficient the view gives asset $i$.
- $z_{i}$: Dual variable that attains the EVaR of asset $i$ under $\boldsymbol{w}^{0}$, from
ep_evar. - $\mathcal{P}$, $\mathcal{N}$: Assets whose coefficient is positive and negative once the view is oriented as a lower bound.
Fields
iters: Largest number of re-solves after the first solve. Each re-solve reads the multipliers of the primal representation at the last posterior, which tightens the surrogate row. Zero keeps the first posterior, on which the view holds but the row is slack.
tol: Relative gap between the surrogate row and the risk measures it bounds at which the re-solves stop. It is read against the larger of the view's target and the largest loss the view names.
Constructors
SequentialEntropicValueatRiskView(; iters::Integer = 20, tol::Number = 1e-8) -> SequentialEntropicValueatRiskViewKeywords correspond to the struct's fields.
Validation
iters >= 0.tol > 0.
Examples
julia> SequentialEntropicValueatRiskView()SequentialEntropicValueatRiskView iters ┼ Int64: 20 tol ┴ Float64: 1.0e-8Related
AbstractEntropicValueatRiskViewFormulationConicEntropicValueatRiskViewGridEntropicValueatRiskViewSequentialConditionalValueatRiskViewSequentialRelativisticValueatRiskViewEntropicValueatRiskViewep_evarEntropyPoolingPrior
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.SequentialRelativisticValueatRiskView — Type
struct SequentialRelativisticValueatRiskView{__T_iters, __T_tol} <: AbstractRelativisticValueatRiskViewFormulationSequential convex formulation of a relativistic value-at-risk view.
SequentialRelativisticValueatRiskView writes every view ConicRelativisticValueatRiskView cannot, with no integer variable and no grid: an upper bound, an equality below the prior RLVaR, and a relative view whose coefficients carry both signs. It replaces the RLVaR of every asset on the wrong side of the inequality by a linear upper bound, solves the convex problem that results, and re-solves with the bound re-read at the posterior until the bound is tight. The view holds on every posterior of that sequence, and the divergence of each is at most that of the one before it.
The posterior is a local minimiser of the divergence. The feasible set of an upper-bound or relative RLVaR view is not convex, so no convex program describes it exactly, and the sequence stops at a fixed point rather than at the posterior of least divergence. GridRelativisticValueatRiskView searches a grid of primal points with binary variables instead, and holds the view only at the grid points. A view of one asset with a lower-bound operator is convex, and the formulation then reduces to the conic one with no re-solve.
Mathematical definition
Orient the view as a lower bound, negating both sides where its operator is <=, and write $\mathcal{P}$ for the assets whose coefficient is then positive and $\mathcal{N}$ for those whose coefficient is negative. The relativistic value at risk is concave in the observation probabilities, so the assets of $\mathcal{P}$ take the dual representation of ConicRelativisticValueatRiskView, which is exact, and each asset of $\mathcal{N}$ takes the primal representation at a fixed pair $(t_{i}, z_{i})$, which is linear in the probabilities and bounds the measure from above:
\[\begin{align} \mathrm{RLVaR}_{\alpha,\kappa}(X_{i}) &\leq t_{i} + z_{i} \ln_{\kappa}\left(\dfrac{1}{\alpha T}\right) + T \sum_{j=1}^{T} w_{j} \varphi_{\kappa}(t_{i} - x_{i,\,j},\, z_{i})\,, &\forall\, i \in \mathcal{N}\\ \bar{\vartheta} &\leq \sum_{i \in \mathcal{P}} \gamma_{i} \sum_{j=1}^{T} \nu_{i,\,j} x_{i,\,j} + \sum_{i \in \mathcal{N}} \gamma_{i} \left(t_{i} + z_{i} \ln_{\kappa}\left(\dfrac{1}{\alpha T}\right) + T \sum_{j=1}^{T} w_{j} \varphi_{\kappa}(t_{i} - x_{i,\,j},\, z_{i})\right)\,. \end{align}\]
The bound holds with equality where $(t_{i}, z_{i})$ attains the RLVaR of $X_{i}$ under $\boldsymbol{w}$, so the row is tight at the probabilities it was read at. Each re-solve reads the pair at the last posterior, which stays feasible for the row that results, and that is why the divergence cannot rise. An equality view is written as the bound the prior violates, and the entropy minimiser makes it tight.
The solver must handle the power cone alongside the exponential cone, as ConicRelativisticValueatRiskView states, and only where the view carries an asset in $\mathcal{P}$. A view whose assets are all in $\mathcal{N}$, which is every upper bound on a group, is one linear row.
Where:
- $x_{i,\,j}$: Loss of asset $i$ at observation $j$, the negated return.
- $\boldsymbol{w}$: $T \times 1$ observation probabilities, summing to one. In a view they are the posterior probabilities the model solves for.
- $\alpha$: Significance level (left tail probability), $\alpha \in (0, 1)$.
- $\kappa$: Kaniadakis deformation parameter, $\kappa \in (0, 1)$.
- $T$: Number of observations.
- $\ln_{\kappa}(u) = \dfrac{u^{\kappa} - u^{-\kappa}}{2 \kappa}$: Kaniadakis logarithm.
- $\varphi_{\kappa}(u, z)$: Smallest sum the pair of power cones of one observation allows.
- $\bar{\vartheta}$: Target relativistic value at risk of the view.
- $\boldsymbol{\nu}_{i}$: $T \times 1$ vector of weights that attains the RLVaR of asset $i$, the variable of its dual representation.
- $\gamma_{i}$: Coefficient the view gives asset $i$.
- $(t_{i}, z_{i})$: Shift and dual variable that attain the RLVaR of asset $i$ under the probabilities the row was read at, from
ep_rlvar. - $\mathcal{P}$, $\mathcal{N}$: Assets whose coefficient is positive and negative once the view is oriented as a lower bound.
Fields
iters: Largest number of re-solves after the first solve. Each re-solve reads the multipliers of the primal representation at the last posterior, which tightens the surrogate row. Zero keeps the first posterior, on which the view holds but the row is slack.
tol: Relative gap between the surrogate row and the risk measures it bounds at which the re-solves stop. It is read against the larger of the view's target and the largest loss the view names.
Constructors
SequentialRelativisticValueatRiskView(; iters::Integer = 20, tol::Number = 1e-8) -> SequentialRelativisticValueatRiskViewKeywords correspond to the struct's fields.
Validation
iters >= 0.tol > 0.
Examples
julia> SequentialRelativisticValueatRiskView()SequentialRelativisticValueatRiskView iters ┼ Int64: 20 tol ┴ Float64: 1.0e-8Related
AbstractRelativisticValueatRiskViewFormulationConicRelativisticValueatRiskViewGridRelativisticValueatRiskViewSequentialConditionalValueatRiskViewSequentialEntropicValueatRiskViewRelativisticValueatRiskViewep_rlvarEntropyPoolingPrior
References
- [2] D. Cajas. Entropy Pooling with Relativistic Value at Risk Views. Available at SSRN 7329718 (2026).
PortfolioOptimisers.RelativisticValueatRiskViewBracket — Type
struct RelativisticValueatRiskViewBracket{__T_tspan, __T_log_zlo, __T_log_zhi} <: AbstractAlgorithmSpans of the two searches that read a relativistic value at risk.
ep_rlvar_shift minimises over the shift of the primal programme, and ep_rlvar minimises over the logarithm of the dual variable. Neither bracket is a proof: each is a margin wide enough for the data this library was measured on. Widen one where the minimiser lands on an end of it. Optim reports an end as converged, so read the minimiser rather than trust the flag.
Fields
tspan: Number of loss spans the bracket of the shift is widened by on each side of the loss range.
log_zlo: Lower end of the bracket of the logarithm of the dual variable, as an offset from the logarithm of the loss range.
log_zhi: Upper end of the bracket of the logarithm of the dual variable, as an offset from the logarithm of the loss range.
Constructors
RelativisticValueatRiskViewBracket(; tspan::Number = 2, log_zlo::Number = -20, log_zhi::Number = 10) -> RelativisticValueatRiskViewBracketKeywords correspond to the struct's fields.
Validation
tspan > 0.log_zlo < log_zhi.
Examples
julia> RelativisticValueatRiskViewBracket()RelativisticValueatRiskViewBracket tspan ┼ Int64: 2 log_zlo ┼ Int64: -20 log_zhi ┴ Int64: 10Related
References
- [2] D. Cajas. Entropy Pooling with Relativistic Value at Risk Views. Available at SSRN 7329718 (2026).
PortfolioOptimisers.ConditionalValueatRiskView — Type
struct ConditionalValueatRiskView{__T_views, __T_alpha, __T_alg} <: AbstractEntropyPoolingTailViewEstimatorA group of conditional value at risk views, with the significance level and formulation they are read under.
A prior(...) reference inside views is replaced by the prior conditional value at risk at this group's alpha, so a view stated against the prior moves with the level.
Fields
views: Tail view constraints estimator.
alpha: Significance level the views this estimator holds are read under.
alg: Formulation used to express each view this estimator holds. A single formulation applies to every view, a vector supplies one per view, andnothinglets each view take the cheapest formulation that expresses it exactly.
Constructors
ConditionalValueatRiskView(; views::LinearConstraintEstimator, alpha::Number = 0.05, alg::Option{<:CVaRVF_VecCVaRVF} = nothing) -> ConditionalValueatRiskViewKeywords correspond to the struct's fields.
Validation
0 < alpha < 1.- If
algis a vector,!isempty(alg).
Examples
julia> ConditionalValueatRiskView(; alpha = 0.01, views = LinearConstraintEstimator(; val = "A >= 0.07"))ConditionalValueatRiskView views ┼ LinearConstraintEstimator │ val ┼ String: "A >= 0.07" │ key ┴ nothing alpha ┼ Float64: 0.01 alg ┴ nothingRelated
AbstractEntropyPoolingTailViewEstimatorEntropicValueatRiskViewAbstractConditionalValueatRiskViewFormulationEntropyPoolingPrior
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.EntropicValueatRiskView — Type
struct EntropicValueatRiskView{__T_views, __T_alpha, __T_alg, __T_args, __T_kwargs, __T_zlo_frac} <: AbstractEntropyPoolingTailViewEstimatorA group of entropic value at risk views, with the significance level and formulation they are read under.
A prior(...) reference inside views is replaced by the prior entropic value at risk at this group's alpha, so a view stated against the prior moves with the level.
alg is where the grid of dual variables and the big-M constant live: a GridEntropicValueatRiskView in this field gives these views their own pct, K and M, so views at different significance levels can take different grids.
Fields
views: Tail view constraints estimator.
alpha: Significance level the views this estimator holds are read under.
alg: Formulation used to express each view this estimator holds. A single formulation applies to every view, a vector supplies one per view, andnothinglets each view take the cheapest formulation that expresses it exactly.
args: Additional positional arguments passed to the optimisation function. It reaches everyOptim.jlcall these views make: the sample EVaR ofep_evar, and the centre of the grid ofep_evar_anchor. Each is a bracketed scalar minimisation, so left empty it takesOptim.Brent().
kwargs: Additional keyword arguments passed to the optimisation function. They reach the same searchesargsdoes.
zlo_frac: Lower end of the bracket of the dual variable, as a fraction of the upper end, ornothingto take the spanep_evarstates. The upper end is a proof, so it is not a knob and only the lower one is.
Constructors
EntropicValueatRiskView(; views::LinearConstraintEstimator, alpha::Number = 0.05, alg::Option{<:EVaRVF_VecEVaRVF} = nothing, args::Tuple = (), kwargs::NamedTuple = (;), zlo_frac::Option{<:Number} = nothing) -> EntropicValueatRiskViewKeywords correspond to the struct's fields.
Validation
0 < alpha < 1.- If
algis a vector,!isempty(alg). - If
zlo_fracis a number,0 < zlo_frac < 1.
Examples
julia> EntropicValueatRiskView(; alpha = 0.01, views = LinearConstraintEstimator(; val = "A <= 0.09"), alg = GridEntropicValueatRiskView(; pct = 0.8, K = 21))EntropicValueatRiskView views ┼ LinearConstraintEstimator │ val ┼ String: "A <= 0.09" │ key ┴ nothing alpha ┼ Float64: 0.01 alg ┼ GridEntropicValueatRiskView │ pct ┼ Float64: 0.8 │ K ┼ Int64: 21 │ M ┼ Int64: 10 │ iters ┼ Int64: 50 │ tol ┼ Float64: 1.0e-10 │ tilt_iters ┴ Int64: 200 args ┼ Tuple{}: () kwargs ┼ @NamedTuple{}: NamedTuple() zlo_frac ┴ nothingRelated
AbstractEntropyPoolingTailViewEstimatorConditionalValueatRiskViewAbstractEntropicValueatRiskViewFormulationGridEntropicValueatRiskViewEntropyPoolingPrior
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.RelativisticValueatRiskView — Type
struct RelativisticValueatRiskView{__T_views, __T_alpha, __T_kappa, __T_alg, __T_args, __T_kwargs, __T_bracket} <: AbstractEntropyPoolingTailViewEstimatorA group of relativistic value at risk views, with the significance level, the deformation parameter and the formulation they are read under.
A prior(...) reference inside views is replaced by the prior relativistic value at risk at this group's alpha and kappa, so a view stated against the prior moves with both.
alg is where the grid of primal points and the big-M constant live: a GridRelativisticValueatRiskView in this field gives these views their own pct, K and M, so views at different significance levels can take different grids.
Fields
views: Tail view constraints estimator.
alpha: Significance level the views this estimator holds are read under.
kappa: Deformation parameter the views this estimator holds are read under.
alg: Formulation used to express each view this estimator holds. A single formulation applies to every view, a vector supplies one per view, andnothinglets each view take the cheapest formulation that expresses it exactly.
args: Additional positional arguments passed to the optimisation function. It reaches everyOptim.jlcall these views make: the two searches ofep_rlvar, the shift ofep_rlvar_shift, and the centre of the grid ofep_rlvar_anchor. Each is a bracketed scalar minimisation, so left empty it takesOptim.Brent().
kwargs: Additional keyword arguments passed to the optimisation function. They reach the same searchesargsdoes.
bracket: Spans the two scalar searches of this estimator run over, ornothingto take the span each search states.
Constructors
RelativisticValueatRiskView(; views::LinearConstraintEstimator, alpha::Number = 0.05, kappa::Number = 0.3, alg::Option{<:RLVaRVF_VecRLVaRVF} = nothing, args::Tuple = (), kwargs::NamedTuple = (;), bracket::Option{<:RelativisticValueatRiskViewBracket} = nothing) -> RelativisticValueatRiskViewKeywords correspond to the struct's fields.
Validation
0 < alpha < 1.0 < kappa < 1.- If
algis a vector,!isempty(alg).
Examples
julia> RelativisticValueatRiskView(; alpha = 0.01, kappa = 0.5, views = LinearConstraintEstimator(; val = "A >= 0.09"))RelativisticValueatRiskView views ┼ LinearConstraintEstimator │ val ┼ String: "A >= 0.09" │ key ┴ nothing alpha ┼ Float64: 0.01 kappa ┼ Float64: 0.5 alg ┼ nothing args ┼ Tuple{}: () kwargs ┼ @NamedTuple{}: NamedTuple() bracket ┴ nothingRelated
AbstractEntropyPoolingTailViewEstimatorEntropicValueatRiskViewAbstractRelativisticValueatRiskViewFormulationGridRelativisticValueatRiskViewEntropyPoolingPrior
References
- [2] D. Cajas. Entropy Pooling with Relativistic Value at Risk Views. Available at SSRN 7329718 (2026).
References
- [1]
- D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
- [2]
- D. Cajas. Entropy Pooling with Relativistic Value at Risk Views. Available at SSRN 7329718 (2026).
- [78]
- A. Meucci. Fully flexible views: theory and practice. Risk 21, 97–102 (2008).
- [79]
- A. Vorobets. Sequential entropy pooling heuristics. Available at SSRN 3936392 (2021).
- [80]
- A. Meucci, D. Ardia and S. Keel. Fully flexible extreme views. The Journal of Risk 14, 39–49 (2011).