Entropy Pooling
Tail views
PortfolioOptimisers.LinearConditionalValueatRiskViewConstraint — Type
struct LinearConditionalValueatRiskViewConstraint{__T_x, __T_alpha, __T_rhs} <: AbstractEntropyPoolingTailViewCarries the loss series, the significance level and the target of a linear conditional value-at-risk view.
The view parser produces one of these per view that takes the linear formulation. add_ep_tail_view! then writes the dual representation of CVaR into the model from it.
Fields
x: Loss series of the asset the view names (-returns).
alpha: Significance level of the view.
rhs: Target value of the view.
Constructors
LinearConditionalValueatRiskViewConstraint(x, alpha, rhs)Arguments correspond to the fields above.
Related
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.IntegerConditionalValueatRiskViewConstraint — Type
struct IntegerConditionalValueatRiskViewConstraint{__T_ord, __T_x, __T_coef, __T_alpha, __T_op, __T_rhs} <: AbstractEntropyPoolingTailViewCarries the ordered tail window of every asset an integer conditional value-at-risk view names.
Each entry of ord, x pairs one asset named by the view with its coefficient in coef, so an absolute view carries one entry and a relative view carries two. The window is sorted ascending, so the largest loss is last and the tail the binary vector marks is a suffix of it.
Fields
ord: Per asset, the indices of the largest losses in ascending order, so the largest loss is last.
x: Loss series of the asset the view names (-returns).
coef: Per asset, the coefficient the view gives its risk measure.
alpha: Significance level of the view.
op: Comparison operator of the view, one of:eq,:geqand:leq.
rhs: Target value of the view.
Constructors
IntegerConditionalValueatRiskViewConstraint(ord, x, coef, alpha, op, rhs)Arguments correspond to the fields above.
Related
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.ConicEntropicValueatRiskViewConstraint — Type
struct ConicEntropicValueatRiskViewConstraint{__T_x, __T_alpha, __T_rhs} <: AbstractEntropyPoolingTailViewCarries the loss series, the significance level and the target of a conic entropic value-at-risk view.
The view parser produces one of these per view that takes the conic formulation. add_ep_tail_view! then writes the relative entropy cone that is the dual representation of EVaR from it.
Fields
x: Loss series of the asset the view names (-returns).
alpha: Significance level of the view.
rhs: Target value of the view.
Constructors
ConicEntropicValueatRiskViewConstraint(x, alpha, rhs)Arguments correspond to the fields above.
Related
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.GridEntropicValueatRiskViewConstraint — Type
struct GridEntropicValueatRiskViewConstraint{__T_x, __T_z, __T_alpha, __T_rhs, __T_M} <: AbstractEntropyPoolingTailViewCarries the grid of dual variables that an upper-bound or equality entropic value-at-risk view selects one point of.
A lower-bound grid view is a set of rows on the posterior probabilities alone, so it goes into the constraint dictionary and never reaches this carrier. An equality view emits both: the rows go into the dictionary and the selector block comes here.
Fields
x: Loss series of the asset the view names (-returns).
z: Grid of entropic value-at-risk dual variables.
alpha: Significance level of the view.
rhs: Target value of the view.
M: Big-M constant of the grid entropic value-at-risk formulation.
Constructors
GridEntropicValueatRiskViewConstraint(x, z, alpha, rhs, M)Arguments correspond to the fields above.
Related
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.ep_evar — Function
ep_evar(x::VecNum, w::VecNum, alpha::Number)Compute the sample entropic value-at-risk of a loss series and the dual variable that attains it.
ep_evar minimises the scalar convex objective of the sample EVaR formula with Optim.jl's Brent method. It is used by the entropy pooling view machinery, which needs both the value (to compare a view against its prior) and the minimiser (to centre the grid of GridEntropicValueatRiskView).
Mathematical definition
\[\mathrm{EVaR}_{\alpha}(X) = \min_{z > 0} \; z \ln\left(\dfrac{\sum_{j=1}^{T} w_{j} \exp(x_{j}/z)}{\alpha}\right)\,.\]
Arguments
x: Loss series (-returns).w: Observation probabilities. Normalised to sum to one.alpha: Significance level.
Returns
res::@NamedTuple{evar::Number, z::Number}: The value and the dual variable that attains it.
Details
- The objective is evaluated through
LogExpFunctions.logsumexp, so a smallzdoes not overflow. - The search is bracketed by
(maximum(x) - dot(w, x)) / log(inv(alpha)), above which the objective already exceedsmaximum(x), which bounds the EVaR from above.
Related
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.ep_evar_grid_row — Function
ep_evar_grid_row(x::VecNum, ebar::Number, z::Number)Build one scaled row of the grid formulation of an entropic value-at-risk view.
ep_evar_grid_row returns the coefficients of exp((x - ebar) / z) divided by their largest entry, together with the reciprocal of that entry, which the right hand side must be multiplied by. Scaling the row keeps the coefficients in (0, 1] however small z is, which is what lets the big-M constant of GridEntropicValueatRiskView be a plain number rather than a function of the data.
Arguments
x: Loss series (-returns).ebar: Target entropic value-at-risk.z: Grid point of the entropic value-at-risk dual variable.
Returns
c::VecNum: Scaled coefficients.isc::Number: Scaling factor to apply to the right hand side.
Related
PortfolioOptimisers.ep_view_terms — Function
ep_view_terms(res::ParsingResult, sets::UniverseSets, X::MatNum; strict::Bool = false)Resolve one parsed tail view into the assets it names, their coefficients, its operator and its target.
ep_view_terms routes a ParsingResult through get_linear_constraints, which resolves the variable names against the universe and reports the ones it cannot place, then undoes the sign flip that entry point applies to a >= equation so the operator survives. The linear view machinery never needs the operator back, because a row of A x <= b carries it; a tail view does, because each operator picks a different formulation.
Arguments
res: Parsed view constraint.sets: Asset set mapping asset names to indices.X: Asset returns matrix, read for its element type.strict: Iftrue, throws error for missing assets; otherwise, issue warnings.
Returns
nothing: If no name in the view could be placed in the universe.terms::@NamedTuple{idx::VecInt, coef::VecNum, op::Symbol, rhs::Number}: The assets the view names, their coefficients, its operator (:eq,:geqor:leq) and its target.
Related
PortfolioOptimisers.ep_normalise_view_term — Function
ep_normalise_view_term(coef::Number, op::Symbol, rhs::Number)Divide a single-asset tail view by its coefficient.
Returns the operator and target of the equivalent view whose coefficient is one, flipping the operator when the coefficient is negative.
Arguments
coef: Coefficient the view gives the asset's risk measure.op: Comparison operator of the view.rhs: Target value of the view.
Returns
op::Symbol: Operator of the normalised view.rhs::Number: Target of the normalised view.
Related
PortfolioOptimisers.ep_view_formulations — Function
ep_view_formulations(alg, N::Integer, key::Symbol)Spread the tail view formulation setting of an entropy pooling prior over its views.
A single formulation applies to every view, a vector supplies one per view, and nothing leaves the choice to the view.
Arguments
alg: Formulation setting.N: Number of views.key: Field name, used in the error message.
Validation
- If
algis a vector,length(alg) == N.
Returns
algs::AbstractVector: One entry per view.
Related
PortfolioOptimisers.ep_sbar — Function
ep_sbar(sbar, T::Integer, alpha::Number, w::VecNum, ord::VecInt)Resolve the number of largest losses the integer conditional value-at-risk formulation considers.
Arguments
sbar: Setting held byIntegerConditionalValueatRiskView. AnIntegeris a count, a fraction in(0, 1)is a fraction ofT, andnothingapplies the rule of thumb of [1].T: Number of observations.alpha: Significance level of the view.w: Prior probability weights.ord: Indices of the losses in ascending order, so the largest loss is last.
Returns
sbar::Int: Number of largest losses, in1:T.
Details
- The rule of thumb takes twice the position at which the prior probabilities first reach
alpha, and never less thanceil(2 * alpha * T). A view above the prior CVaR moves mass into the tail and needs about that position; a view below it moves mass out and needs more.
Related
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
PortfolioOptimisers.ep_assert_reachable_view — Function
ep_assert_reachable_view(op::Symbol, rhs::Number, x::VecNum, eqn::AbstractString,
name::AbstractString)Reject a tail view no reweighting of the sample can reach.
A tail risk measure of a reweighted sample lies between the smallest and the largest loss the sample holds, so a view outside that band is infeasible however the probabilities move.
Arguments
op: Comparison operator of the view.rhs: Target value of the view.x: Loss series of the asset the view names.eqn: Equation of the view, used in the error message.name: Name of the view family, used in the error message.
Validation
- If
opis:geqor:eq,rhs < maximum(x). - If
opis:leqor:eq,rhs > minimum(x).
Returns
nothing.
Related
PortfolioOptimisers.ep_cvar_formulation — Function
ep_cvar_formulation(alg::Option{<:AbstractConditionalValueatRiskViewFormulation}, single::Bool,
op::Symbol, rhs::Number, pv::Number)Pick the formulation of one conditional value-at-risk view.
A stated formulation is returned unchanged. nothing takes LinearConditionalValueatRiskView wherever it expresses the view exactly, and IntegerConditionalValueatRiskView otherwise, which is every view the linear formulation cannot express: a relative view, an upper bound, and an equality below the prior CVaR.
Arguments
alg: Stated formulation, ornothing.single: Whether the view names one asset.op: Comparison operator of the view.rhs: Target value of the view.pv: Prior value of the view's left hand side.
Returns
alg::AbstractConditionalValueatRiskViewFormulation: The formulation to use.
Related
PortfolioOptimisers.ep_evar_formulation — Function
ep_evar_formulation(alg::Option{<:AbstractEntropicValueatRiskViewFormulation}, op::Symbol,
rhs::Number, pv::Number)Pick the formulation of one entropic value-at-risk view.
A stated formulation is returned unchanged. nothing takes ConicEntropicValueatRiskView wherever it expresses the view exactly, and GridEntropicValueatRiskView otherwise, which is an upper bound and an equality below the prior EVaR.
Arguments
alg: Stated formulation, ornothing.op: Comparison operator of the view.rhs: Target value of the view.pv: Prior EVaR of the asset the view names.
Returns
alg::AbstractEntropicValueatRiskViewFormulation: The formulation to use.
Related
PortfolioOptimisers.ep_add_cvar_view! — Function
ep_add_cvar_view!(tvs::AbstractVector, alg::AbstractConditionalValueatRiskViewFormulation, X::MatNum,
idx::VecInt, coef::VecNum, op::Symbol, rhs::Number, alpha::Number,
w::VecNum, pv::Number, eqn::AbstractString)Lower one conditional value-at-risk view into the tail view constraint its formulation needs.
Arguments
tvs: Tail view constraints, appended to.alg: Formulation of the view.X: Asset returns matrix.idx: Indices of the assets the view names.coef: Coefficient the view gives each asset's CVaR.op: Comparison operator of the view.rhs: Target value of the view.alpha: Significance level of the view.w: Prior probability weights.pv: Prior value of the view's left hand side.eqn: Equation of the view, used in the error messages.
Validation
LinearConditionalValueatRiskViewneeds one asset, an operator other than<=, and, for an equality, a target at or above the prior CVaR.
Returns
nothing: The function mutatestvsin-place.
Related
PortfolioOptimisers.ep_add_evar_view! — Function
ep_add_evar_view!(epc::AbstractDict, tvs::AbstractVector,
alg::AbstractEntropicValueatRiskViewFormulation, x::VecNum, alpha::Number,
op::Symbol, rhs::Number, zstar::Number, pv::Number,
eqn::AbstractString)Lower one entropic value-at-risk view into the constraints its formulation needs.
ConicEntropicValueatRiskView produces one tail view constraint. GridEntropicValueatRiskView produces linear rows on the posterior probabilities for the lower-bound half of the view, and a tail view constraint for the upper-bound half, so an equality view produces both.
Arguments
epc: Dictionary of entropy pooling constraints, mapping keys to(lhs, rhs)pairs.tvs: Tail view constraints, appended to.alg: Formulation of the view.x: Loss series of the asset the view names.alpha: Significance level of the view.op: Comparison operator of the view.rhs: Target value of the view.zstar: Dual variable that attains the prior EVaR of the asset.pv: Prior EVaR of the asset.eqn: Equation of the view, used in the error messages.
Validation
ConicEntropicValueatRiskViewneeds an operator other than<=, and, for an equality, a target at or above the prior EVaR.
Returns
nothing: The function mutatesepcandtvsin-place.
Related
PortfolioOptimisers.ep_cvar_views! — Function
ep_cvar_views!(cvar_views::Nothing, args...; kwargs...)No-op pass-through for conditional value at risk (CVaR) view constraints when none are specified.
Arguments
cvar_views::Nothing: Indicates that no CVaR view constraints are specified.args...: Additional positional arguments (ignored).kwargs...: Additional keyword arguments (ignored).
Returns
nothing.
Related
ep_cvar_views!(cvar_views::LinearConstraintEstimator, epc::AbstractDict,
tvs::AbstractVector, pr::AbstractPriorResult, sets::UniverseSets,
alpha::Number, w::VecNum, alg; strict::Bool = false)Parse conditional value-at-risk views and lower them into entropy pooling constraints.
ep_cvar_views! parses CVaR view equations from a LinearConstraintEstimator, replaces prior references with their values, resolves the asset names against the universe, picks a formulation for each view, and appends the constraints that formulation needs. Unlike the recursive algorithm of MeucciEntropyPoolingPrior, nothing is solved here: the views become part of the one entropy pooling problem entropy_pooling solves.
Arguments
cvar_views: CVaR view constraints.epc: Dictionary of entropy pooling constraints, mapping keys to(lhs, rhs)pairs.tvs: Tail view constraints, appended to.pr: Prior result containing asset return information.sets: Asset set mapping asset names to indices.alpha: Confidence level for CVaR.w: Prior probability weights.alg: Formulation setting, spread over the views byep_view_formulations.strict: Iftrue, throws error for missing assets; otherwise, issue warnings.
Returns
nothing: The function mutatesepcandtvsin-place.
Details
- Accepts
==,>=and<=. - A group name expands to its members, each carrying the coefficient the group carried, so a view on a group constrains the sum of the members' CVaRs, not their average. A group of more than one member is therefore a relative view.
- A view naming one asset is normalised so its coefficient is one, which flips the operator when the coefficient is negative.
- A view naming several assets is a relative view, and only
IntegerConditionalValueatRiskViewexpresses it.
Related
ep_cvar_views!(cvar_views::AbstractVector{<:ConditionalValueatRiskView}, args...; kwargs...)Lower each group of conditional value-at-risk views under its own settings.
Every ConditionalValueatRiskView in the vector is lowered in turn, so the groups accumulate into the same constraint set and one entropy pooling solve answers all of them.
Arguments
cvar_views: Groups of CVaR views.args...: Additional positional arguments forwarded toep_cvar_views!.kwargs...: Additional keyword arguments forwarded toep_cvar_views!.
Returns
nothing: The function mutatesepcandtvsin-place.
Related
PortfolioOptimisers.ep_evar_views! — Function
ep_evar_views!(evar_views::Nothing, args...; kwargs...)No-op pass-through for entropic value at risk (EVaR) view constraints when none are specified.
Arguments
evar_views::Nothing: Indicates that no EVaR view constraints are specified.args...: Additional positional arguments (ignored).kwargs...: Additional keyword arguments (ignored).
Returns
nothing.
Related
ep_evar_views!(evar_views::LinearConstraintEstimator, epc::AbstractDict,
tvs::AbstractVector, pr::AbstractPriorResult, sets::UniverseSets,
alpha::Number, w::VecNum, alg; strict::Bool = false)Parse entropic value-at-risk views and lower them into entropy pooling constraints.
ep_evar_views! parses EVaR view equations from a LinearConstraintEstimator, replaces prior references with their values, resolves the asset names against the universe, picks a formulation for each view, and appends the constraints that formulation needs.
Arguments
evar_views: EVaR view constraints.epc: Dictionary of entropy pooling constraints, mapping keys to(lhs, rhs)pairs.tvs: Tail view constraints, appended to.pr: Prior result containing asset return information.sets: Asset set mapping asset names to indices.alpha: Confidence level for EVaR.w: Prior probability weights.alg: Formulation setting, spread over the views byep_view_formulations.strict: Iftrue, throws error for missing assets; otherwise, issue warnings.
Returns
nothing: The function mutatesepcandtvsin-place.
Details
- Accepts
==,>=and<=. - Each view names one asset. [1] gives no formulation for a relative EVaR view.
- A group name expands to its members, each carrying the coefficient the group carried, so only a group of one member names one asset.
- The view is normalised so its coefficient is one, which flips the operator when the coefficient is negative.
Related
ep_evar_views!(evar_views::AbstractVector{<:EntropicValueatRiskView}, args...; kwargs...)Lower each group of entropic value-at-risk views under its own settings.
Every EntropicValueatRiskView in the vector is lowered in turn, so the groups accumulate into the same constraint set and one entropy pooling solve answers all of them.
Arguments
evar_views: Groups of EVaR views.args...: Additional positional arguments forwarded toep_evar_views!.kwargs...: Additional keyword arguments forwarded toep_evar_views!.
Returns
nothing: The function mutatesepcandtvsin-place.
Related
PortfolioOptimisers.add_ep_tail_view! — Function
add_ep_tail_view!(model::JuMP.Model, pw, tv::AbstractEntropyPoolingTailView,
sc1::Number)Add the variables and constraints of one tail view to an entropy pooling JuMP model.
add_ep_tail_view! is the one seam through which a conditional or entropic value-at-risk view reaches the model. Each formulation has its own method, dispatched on the constraint carrier the view parser produced.
Arguments
model: Entropy pooling JuMP model.pw: Vector of posterior probability variables.tv: Tail view constraint.sc1: Constraint scaling factor.
Returns
nothing: The function mutatesmodelin-place.
Related
References
- [1] D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
Estimator
PortfolioOptimisers.EntropyPoolingPrior — Type
struct EntropyPoolingPrior{__T_pe, __T_mu_views, __T_var_views, __T_cvar_views, __T_evar_views, __T_sigma_views, __T_sk_views, __T_kt_views, __T_cov_views, __T_rho_views, __T_sets, __T_opt, __T_w, __T_alg} <: AbstractLowOrderPriorEstimator_AFReweights the observations of a prior so that its moments and its tails meet a set of views.
EntropyPoolingPrior is a low order prior estimator that computes the mean and covariance of asset returns using entropy pooling. It supports views on the mean, the variance, the covariance, the correlation, the skewness and the kurtosis, views on the value at risk, and the conditional and entropic value at risk views of [1].
The tail views are the difference with MeucciEntropyPoolingPrior. There, a CVaR view is a target the recursive algorithm of Meucci et al. hunts by re-solving the whole entropy pooling problem for each candidate value at risk level, which supports equalities alone. Here each tail view is written as constraints of the single entropy pooling problem, so one solve answers every view, and the operators ==, >= and <= are all available, along with relative CVaR views and views on the entropic value at risk.
Fields
pe: Prior estimator.
mu_views: Expected returns views estimator or result.
var_views: Value-at-risk views estimator or result.
cvar_views: Conditional value-at-risk views estimator or result.
evar_views: Entropic value-at-risk views estimator or result.
sigma_views: Variance views estimator or result.
sk_views: Skewness views estimator or result.
kt_views: Kurtosis views estimator or result.
cov_views: Covariance views estimator or result.
rho_views: Correlation views estimator or result.
sets: Sets used to map estimator values to assets.
opt: Entropy pooling optimisation estimator.
w: Prior observation probability weights. Ifnothing, uniform weights are used.
alg: Entropy pooling algorithm.
Constructors
EntropyPoolingPrior(; pe::AbstractLowOrderPriorEstimator_A_F_AF = EmpiricalPrior(), mu_views::Option{<:LinearConstraintEstimator} = nothing, var_views::Option{<:VV_VecVV} = nothing, cvar_views::Option{<:CVV_VecCVV} = nothing, evar_views::Option{<:EVV_VecEVV} = nothing, sigma_views::Option{<:LinearConstraintEstimator} = nothing, sk_views::Option{<:LinearConstraintEstimator} = nothing, kt_views::Option{<:LinearConstraintEstimator} = nothing, cov_views::Option{<:LinearConstraintEstimator} = nothing, rho_views::Option{<:LinearConstraintEstimator} = nothing, sets::Option{<:UniverseSets} = nothing, opt::NonCVaREP = OptimEntropyPooling(), w::Option{<:StatsBase.ProbabilityWeights} = nothing, alg::AbstractEntropyPoolingAlgorithm = H1_EntropyPooling()) -> EntropyPoolingPriorKeywords correspond to the struct's fields.
Validation
- If any view constraint is not
nothing,setsmust not benothing. - If
cvar_viewsis notnothing,optmust be aJuMPEntropyPooling. - If a view field is a vector, it must not be empty.
- If
wis notnothing, it must be non-empty and match the number of observations.
Propagated parameters
When factory is called on this type, the following @fprop-tagged fields are automatically propagated:
pe: Recursively updated viafactory.w: Replaced with the incomingObsWeights.
View parameters
When port_opt_view is called on this type, the following @vprop-tagged fields are automatically subset to the selected indices:
pe: Recursively viewed viaport_opt_view.sets: Sliced to the selected indices viaport_opt_view.
Observation weight parameters
When obs_weights_view is called on this type, the following fields are automatically indexed to the selected observations:
pe: Recursively indexed viaobs_weights_view.w: Indexed to the selected observations viaobs_weights_view.
Details
- If
wis notnothing, it is normalised to sum to 1; otherwise, uniform weights are used whenprioris called.
View comparison operators
The comparison operators accepted in each view's constraint strings depend on the moment being constrained. An unsupported operator raises a ParseError listing the operators allowed for that view.
mu_views,sigma_views,sk_views,kt_views,cov_views,rho_viewsaccept==,>=and<=.var_views(Value at Risk) accepts only==and>=.cvar_viewsandevar_viewsaccept==,>=and<=.
Tail views
A tail view needs auxiliary variables, so it is expressed in the JuMP model rather than reduced to rows that multiply the posterior probabilities. Two consequences follow.
optmust be aJuMPEntropyPoolingwhenevercvar_viewsis set, and whenever anevar_viewsentry is anything other than a lower bound underGridEntropicValueatRiskView, which is the one tail formulation that is linear in the posterior probabilities alone.- A view that needs a binary variable — every
IntegerConditionalValueatRiskView, and an upper bound or equality underGridEntropicValueatRiskView— needs a solver that handles mixed-integer exponential cone programs.
The alg field of a view group picks the formulation. A single formulation applies to every view in that group, a vector supplies one per view, and nothing lets each view take the cheapest formulation that expresses it exactly: LinearConditionalValueatRiskView and ConicEntropicValueatRiskView where they apply, IntegerConditionalValueatRiskView and GridEntropicValueatRiskView otherwise.
Tail views at several significance levels
A significance level is part of the statistic, not a detail of the solve: the conditional value at risk at 1% and at 10% are different numbers on the same series. So the level lives on the view rather than on the estimator. var_views, cvar_views and evar_views each take one ValueatRiskView, ConditionalValueatRiskView or EntropicValueatRiskView, or a vector of them, and each group carries the alpha its equations are read under. A prior(...) reference inside a group is replaced by the prior value at that group's level.
A tail view group also carries alg, the formulation. For EntropicValueatRiskView that is where the grid of dual variables and the big-M constant live, so a GridEntropicValueatRiskView there gives one group its own pct, K and M. ValueatRiskView has no such field: a value at risk view is linear in the posterior probabilities, so there is no formulation to choose.
Examples
julia> EntropyPoolingPrior(; sets = UniverseSets(; xkey = "nx", dict = Dict("nx" => ["A", "B", "C"])), mu_views = LinearConstraintEstimator(; val = ["A == 0.03", "B + C == 0.04"]))EntropyPoolingPrior pe ┼ EmpiricalPrior │ ce ┼ PortfolioOptimisersCovariance │ │ ce ┼ Covariance │ │ │ me ┼ SimpleExpectedReturns │ │ │ │ w ┴ nothing │ │ │ ce ┼ GeneralCovariance │ │ │ │ ce ┼ StatsBase.SimpleCovariance: StatsBase.SimpleCovariance(true) │ │ │ │ w ┴ nothing │ │ │ alg ┴ FullMoment() │ │ mp ┼ MatrixProcessing │ │ │ pdm ┼ Posdef │ │ │ │ alg ┼ UnionAll: NearestCorrelationMatrix.Newton │ │ │ │ kwargs ┴ @NamedTuple{}: NamedTuple() │ │ │ dn ┼ nothing │ │ │ dt ┼ nothing │ │ │ alg ┼ nothing │ │ │ order ┴ NTuple{4, Symbol}: (:pdm, :dn, :dt, :alg) │ me ┼ SimpleExpectedReturns │ │ w ┴ nothing │ horizon ┴ nothing mu_views ┼ LinearConstraintEstimator │ val ┼ Vector{String}: ["A == 0.03", "B + C == 0.04"] │ key ┴ nothing var_views ┼ nothing cvar_views ┼ nothing evar_views ┼ nothing sigma_views ┼ nothing sk_views ┼ nothing kt_views ┼ nothing cov_views ┼ nothing rho_views ┼ nothing sets ┼ UniverseSets │ xkey ┼ String: "nx" │ uxkey ┼ String: "ux" │ fkey ┼ String: "nf" │ ufkey ┼ String: "uf" │ zkey ┼ String: "nz" │ dict ┴ Dict{String, Vector{String}}: Dict("nx" => ["A", "B", "C"]) opt ┼ OptimEntropyPooling │ args ┼ Tuple{}: () │ kwargs ┼ @NamedTuple{}: NamedTuple() │ sc1 ┼ Int64: 1 │ sc2 ┼ Float64: 1000.0 │ alg ┼ ExpEntropyPooling() │ err ┴ nothing w ┼ nothing alg ┴ H1_EntropyPooling()Related
AbstractLowOrderPriorEstimator_AFMeucciEntropyPoolingPriorLinearConditionalValueatRiskViewIntegerConditionalValueatRiskViewConicEntropicValueatRiskViewGridEntropicValueatRiskViewJuMPEntropyPoolingOptimEntropyPoolingAbstractEntropyPoolingAlgorithmfactoryport_opt_viewobs_weights_view
References
PortfolioOptimisers.VecEP — Type
const VecEP = AbstractVector{<:Union{<:EntropyPoolingPrior, <:MeucciEntropyPoolingPrior}}Alias for an abstract vector of entropy pooling prior estimators of either family.
Related
PortfolioOptimisers.prior — Function
prior(pe::EntropyPoolingPrior, X::MatNum, F::Option{<:MatNum} = nothing;
dims::Int = 1, strict::Bool = false, kwargs...)Compute the entropy pooling prior of asset returns with tail views.
prior orients the data and forwards the estimator's algorithm as a value to ep_prior, which enforces the views in stages or in one optimisation (ADR 0064).
Arguments
pe: Entropy pooling prior estimator.X: Asset returns matrix.F: Optional factor returns matrix.dims: Dimension along which the observations lie.strict: Iftrue, throws error for missing assets; otherwise, issue warnings.kwargs...: Additional keyword arguments forwarded to the wrapped prior estimator.
Validation
dims in (1, 2).
Returns
pr::LowOrderPrior: Prior result carrying the posterior probability weights.
Related
PortfolioOptimisers.ep_prior — Method
ep_prior(alg::StagedEP, pe::EntropyPoolingPrior, X::MatNum, F::Option{<:MatNum};
strict::Bool = false, kwargs...)Compute entropy pooling prior moments with tail views, enforcing the views in stages.
ep_prior accumulates the views of each stage into one constraint set and solves once per stage, so a stage's views hold alongside every view of the stages before it. The mean of an asset a later stage constrains is pinned to the value the earlier stage produced, so a higher moment view does not silently move it.
Arguments
alg: Staged entropy pooling algorithm.::H1_EntropyPooling: Each stage re-solves from the original prior weights.::H2_EntropyPooling: Each stage re-solves from the previous stage's weights.
pe: Entropy pooling prior estimator.X: Asset returns matrix, already oriented.F: Optional factor returns matrix, already oriented.strict: Iftrue, throws error for missing assets; otherwise, issue warnings.kwargs...: Additional keyword arguments forwarded to the wrapped prior estimator.
Returns
pr::LowOrderPrior: Prior result carrying the posterior probability weights.
Details
The stages are:
- Mean, value at risk, conditional value at risk and entropic value at risk views.
- Variance and covariance views, with the mean of every asset they name pinned.
- Skewness, kurtosis and correlation views, with the mean and variance of every asset they name pinned.
Related
PortfolioOptimisers.ep_prior — Method
ep_prior(alg::H0_EntropyPooling, pe::EntropyPoolingPrior, X::MatNum,
F::Option{<:MatNum}; strict::Bool = false, kwargs...)Compute entropy pooling prior moments with tail views, enforcing every view in one optimisation.
ep_prior builds every view constraint against the same prior and solves once. It is faster than the staged algorithms and pins nothing, so a higher moment view is free to move a lower moment.
Arguments
alg: Single-shot entropy pooling algorithm.pe: Entropy pooling prior estimator.X: Asset returns matrix, already oriented.F: Optional factor returns matrix, already oriented.strict: Iftrue, throws error for missing assets; otherwise, issue warnings.kwargs...: Additional keyword arguments forwarded to the wrapped prior estimator.
Returns
pr::LowOrderPrior: Prior result carrying the posterior probability weights.
Related
References
- [1]
- D. Cajas. Entropy Pooling with CVaR and EVaR Views. Available at SSRN 7120258 (2026).
- [80]
- A. Meucci. Fully flexible views: theory and practice. Risk 21, 97–102 (2008).
- [81]
- A. Vorobets. Sequential entropy pooling heuristics. Available at SSRN 3936392 (2021).