Vec scalar
PortfolioOptimisers.VecScalar — Type
struct VecScalar{__T_v, __T_s} <: AbstractResultA result that holds a vector and a scalar.
The moment risk measures read a VecScalar as a target mu. The target of a portfolio with weights w is dot(w, mu.v) + mu.s.
Fields
v: The vector part.
s: The scalar part.
Constructors
VecScalar(; v::VecNum, s::Number) -> VecScalarEach keyword sets the field of the same name.
Validation
v:!isempty(v)andall(isfinite, v).s:isfinite(s).
Examples
julia> VecScalar([1.0, 2.0, 3.0], 4.2)VecScalar v ┼ Vector{Float64}: [1.0, 2.0, 3.0] s ┴ Float64: 4.2Related