Skip to content
5

Expected Returns

PortfolioOptimisers.ReturnRiskMeasure Type
julia
struct ReturnRiskMeasure{T1} <: NoOptimisationRiskMeasure
    rt::T1
end

Return-based risk measure.

ReturnRiskMeasure is a risk measure that uses the expected portfolio return as its risk metric. This is useful for algorithms or analyses where the risk is defined as the expected return, used in portfolio performance analysis.

Fields

  • rt: Return estimator.

Constructor

julia
ReturnRiskMeasure(; rt::JuMPReturnsEstimator = ArithmeticReturn())

Examples

julia
julia> ReturnRiskMeasure()
ReturnRiskMeasure
  rt ┼ ArithmeticReturn
     │   ucs ┼ nothing
     │    lb ┴ nothing

Related

source
PortfolioOptimisers.RatioRiskMeasure Type
julia
struct RatioRiskMeasure{T1, T2, T3} <: NoOptimisationRiskMeasure
    rt::T1
    rk::T2
    rf::T3
end

Ratio-based risk measure.

RatioRiskMeasure is a risk measure that computes the risk-adjusted return ratio, such as the Sharpe ratio, for a portfolio. It combines a return estimator, a risk measure, and a risk-free rate to produce a ratio metric, used in portfolio performance analysis.

Fields

  • rt: Return estimator.

  • rk: Risk measure.

  • rf: Risk-free rate.

Constructor

julia
RatioRiskMeasure(; rt::JuMPReturnsEstimator = ArithmeticReturn(),
                 rk::AbstractBaseRiskMeasure = Variance(), rf::Real = 0.0)

Examples

julia
julia> RatioRiskMeasure()
RatioRiskMeasure
  rt ┼ ArithmeticReturn
     │   ucs ┼ nothing
     │    lb ┴ nothing
  rk ┼ Variance
     │   settings ┼ RiskMeasureSettings
     │            │   scale ┼ Float64: 1.0
     │            │      ub ┼ nothing
     │            │     rke ┴ Bool: true
     │      sigma ┼ nothing
     │         rc ┼ nothing
     │        alg ┴ SquaredSOCRiskExpr()
  rf ┴ Float64: 0.0

Related

source
PortfolioOptimisers.expected_return Function
julia
expected_return(ret::ArithmeticReturn, w::AbstractVector{<:Real}, pr::AbstractPriorResult;
                fees::Union{Nothing, Fees} = nothing, kwargs...)
expected_return(ret::KellyReturn, w::AbstractVector{<:Real}, pr::AbstractPriorResult;
                fees::Union{Nothing, Fees} = nothing, kwargs...)
expected_return(ret::JuMPReturnsEstimator, w::AbstractVector{<:AbstractVector},
                pr::AbstractPriorResult; fees::Union{Nothing, Fees} = nothing, kwargs...)

Compute the expected portfolio return using the specified return estimator.

expected_return calculates the expected return for a portfolio given its weights, a prior result, and optional transaction fees. Supports arithmetic, Kelly, and JuMP-based return estimators. For Kelly returns, computes the mean log-growth rate. For JuMP-based estimators, returns a vector of expected returns for each portfolio.

Arguments

  • ret: Return estimator.

  • w: Portfolio weights.

  • pr: Prior result.

  • fees: Optional fees.

  • kwargs...: Additional keyword arguments passed to underlying routines.

Returns

  • rt::Union{<:Real, Vector{<:Real}}: Expected portfolio return(s), net of fees if provided.

Details

  • For the third method, expected_return is broadcast over the vector of vectors of portfolio weights.

Related

source
PortfolioOptimisers.expected_ratio Function
julia
expected_ratio(r::AbstractBaseRiskMeasure, ret::JuMPReturnsEstimator, w::AbstractVector,
               pr::AbstractPriorResult; fees::Union{Nothing, Fees} = nothing, rf::Real = 0,
               kwargs...)

Compute the expected risk-adjusted return ratio for a portfolio.

expected_ratio calculates the ratio of expected portfolio return (net of fees and risk-free rate) to expected portfolio risk, using the specified risk measure and return estimator.

Arguments

  • r: Risk measure.

  • ret: Return estimator.

  • w: Portfolio weights.

  • pr: Prior result.

  • fees: Optional transaction fees.

  • rf: Risk-free rate.

  • kwargs...: Additional keyword arguments.

Returns

  • ratio::Real: Risk-adjusted return ratio.

Related

source
PortfolioOptimisers.expected_risk_ret_ratio Function
julia
expected_risk_ret_ratio(r::AbstractBaseRiskMeasure, ret::JuMPReturnsEstimator,
                        w::AbstractVector, pr::AbstractPriorResult;
                        fees::Union{Nothing, Fees} = nothing, rf::Real = 0, kwargs...)

Compute expected risk, expected return, and risk-adjusted return ratio for a portfolio.

expected_risk_ret_ratio returns a tuple containing the expected portfolio risk, expected portfolio return, and the risk-adjusted return ratio, using the specified risk measure and return estimator.

Arguments

  • r: Risk measure.

  • ret: Return estimator.

  • w: Portfolio weights.

  • pr: Prior result.

  • fees: Optional transaction fees.

  • rf: Risk-free rate.

  • kwargs...: Additional keyword arguments.

Returns

  • (risk::Real, return::Real, ratio::Real): Tuple of expected risk, expected return, and risk-adjusted return ratio.

Related

source
PortfolioOptimisers.expected_sric Function
julia
expected_sric(r::AbstractBaseRiskMeasure, ret::JuMPReturnsEstimator, w::AbstractVector,
              pr::AbstractPriorResult; fees::Union{Nothing, Fees} = nothing, rf::Real = 0,
              kwargs...)

Compute the risk-adjusted ratio information criterion (SRIC) for a portfolio.

expected_sric calculates the SRIC, which adjusts the risk-adjusted return ratio for estimation error, penalizing overfitting in portfolio optimization. The SRIC is computed as the risk-adjusted return ratio minus a penalty term based on the number of assets and sample size.

Arguments

  • r: Risk measure.

  • ret: Return estimator.

  • w: Portfolio weights.

  • pr: Prior result.

  • fees: Optional transaction fees.

  • rf: Risk-free rate.

  • kwargs...: Additional keyword arguments.

Returns

  • sric::Real: Sharpe Ratio Information Criterion.

Related

source
PortfolioOptimisers.expected_risk_ret_sric Function
julia
expected_risk_ret_sric(r::AbstractBaseRiskMeasure, ret::JuMPReturnsEstimator,
                       w::AbstractVector, pr::AbstractPriorResult;
                       fees::Union{Nothing, Fees} = nothing, rf::Real = 0, kwargs...)

Compute expected risk, expected return, and SRIC for a portfolio.

expected_risk_ret_sric returns a tuple containing the expected portfolio risk, expected portfolio return, and the Sharpe Ratio Information Criterion (SRIC), which adjusts the risk-adjusted return ratio for estimation error.

Arguments

  • r: Risk measure (AbstractBaseRiskMeasure).

  • ret: Return estimator (JuMPReturnsEstimator).

  • w: Portfolio weights.

  • pr: Prior result (must contain asset return matrix X).

  • fees: Optional transaction fees.

  • rf: Risk-free rate (default: 0).

  • kwargs...: Additional keyword arguments.

Returns

  • (risk::Real, return::Real, sric::Real): Tuple of expected risk, expected return, and SRIC.

Related

source