Custom value expected returns
PortfolioOptimisers.CustomValueExpectedReturns Type
julia
struct CustomValueExpectedReturns{__T_val} <: AbstractExpectedReturnsEstimatorExpected returns estimator that returns custom values for each asset.
Fields
val: Custom value.- If a scalar, all assets are assigned this value.
If a vector, each element corresponds to an asset.
If a function, it is called with the full
Xmatrix anddims, with additional keyword arguments passed through.
- If a scalar, all assets are assigned this value.
Constructors
julia
CustomValueExpectedReturns(;
val::Func_Num_VecNum = 0.0
) -> CustomValueExpectedReturnsKeywords correspond to the struct's fields.
Examples
julia
julia> CustomValueExpectedReturns()
CustomValueExpectedReturns
val ┴ Float64: 0.0Related
sourceStatistics.mean Method
julia
Statistics.mean(me::CustomValueExpectedReturns, X::MatNum;
dims::Int = 1, kwargs...)Compute expected returns as custom values.
Arguments
me: Custom value expected returns estimator.X: Data matrix of asset returns (observations × assets).dims: Dimension along which to perform the computation.kwargs...: Additional keyword arguments.
Returns
mu::Matrix{<:Number}: Expected returns matrix, shaped as(1, N)ifdims == 1or(N, 1)ifdims == 2.
Related
source