Types

OnlinePortfolioSelection.EGAType
EGA{T<:AbstractFloat}<:EGMFramework

EGA variant of the EGM algorithm.

Fields

  • gamma1::T: momentum parameter
  • gamma2::T: momentum parameter

Example

julia> model = EGA(0.99, 0.)
EGA{Float64}(0.99, 0.0)
source
OnlinePortfolioSelection.EGEType
EGE{T<:AbstractFloat}<:EGMFramework

EGE variant of the EGM algorithm.

Fields

  • gamma1::T: momentum parameter

Example

julia> model = EGE(0.99)
EGE{Float64}(0.99)
source
OnlinePortfolioSelection.EGRType
EGR{T<:AbstractFloat}<:EGMFramework

EGR variant of the EGM algorithm.

Fields

  • gamma2::T: momentum parameter

Example

julia> model = EGR(0.)
EGR{Float64}(0.0)
source
OnlinePortfolioSelection.EMAType
EMA{T<:AbstractFloat}<:TrendRep

Exponential Moving Average trend representation. Formula:

\[{{\mathbf{\hat x}}_{E,t + 1}}\left( \vartheta \right) = \frac{{\sum\limits_{k = 0}^{t - 1} {{{\left( {1 - \vartheta } \right)}^k}} \vartheta {{\mathbf{p}}_{t - k}} + {{\left( {1 - \vartheta } \right)}^t}{{\mathbf{p}}_0}}}{{{{\mathbf{p}}_t}}}\]

Fields

  • v::T: Smoothing factor.

Examples

julia> using OnlinePortfolioSelection

julia> ema = EMA(0.5)
EMA{Float64}(0.5)
source
OnlinePortfolioSelection.OPSAlgorithmType
OPSAlgorithm{T<:AbstractFloat}

An object that contains the result of running the algorithm.

Fields

  • n_asset::Int: Number of assets in the portfolio.
  • b::Matrix{T}: Weights of the created portfolios.
  • alg::String: Name of the algorithm.
source
OnlinePortfolioSelection.OPSMetricsType
OPSMetrics{T<:AbstractFloat}

A struct to store the metrics of the OPS algorithm. This object is returned by the opsmetrics function.

Fields

  • Sn::Vector{T}: The cumulative wealth of investment during the investment period.
  • MER::T: The investments's Mean excess return (MER).
  • IR::T: The Information Ratio (IR) of portfolio for the investment period.
  • APY::T: The Annual Percentage Yield (APY) of investment.
  • Ann_Std::T: The Annualized Standard Deviation (σₚ) of investment.
  • Ann_Sharpe::T: The Annualized Sharpe Ratio (SR) of investment.
  • MDD::T: The Maximum Drawdown (MDD) of investment.
  • Calmar::T: The Calmar Ratio of investment.
  • AT::T: The Average Turnover (AT) of the investment.
source
OnlinePortfolioSelection.PPType
PP<:TrendRep

Pick Price trend representation. Formula:

\[{{\mathbf{\hat x}}_{M,t + 1}}\left( w \right) = \frac{{\mathop {\max }\limits_{0 \leqslant k \leqslant w - 1} {\mathbf{p}}_{t - k}^{(i)}}}{{{{\mathbf{p}}_t}}},\quad i = 1,2, \ldots ,d\]

Examples

julia> using OnlinePortfolioSelection

julia> pp = PP()
PP()
source
OnlinePortfolioSelection.SMAPType
SMAP<:TrendRep

Simple Moving Average trend representation using the close prices. Formula:

\[\mathbf{\hat{x}}_{S, t+1}\left(w\right)= \frac{\sum_{k=0}^{w-1}\mathbf{p}_{t-k}}{w\mathbf{p}_t}\]

Examples

julia> using OnlinePortfolioSelection

julia> sma = SMAP()
SMA()
source
OnlinePortfolioSelection.SMARType

SMAR<:TrendRep

Simple Moving Average trend representation using the relative prices. Formula:

\[{\mathbf{1}} + \frac{{\mathbf{1}}}{{{{\mathbf{x}}_t}}} + \cdots + \frac{{\mathbf{1}}}{{ \otimes _{k = 0}^{w - 2}{{\mathbf{x}}_{t - k}}}}\]

Examples

julia> using OnlinePortfolioSelection

julia> sma = SMAR()
SMAR()
source