Types
OnlinePortfolioSelection.EGA
— TypeEGA{T<:AbstractFloat}<:EGMFramework
EGA variant of the EGM algorithm.
Fields
gamma1::T
: momentum parametergamma2::T
: momentum parameter
Example
julia> model = EGA(0.99, 0.)
EGA{Float64}(0.99, 0.0)
OnlinePortfolioSelection.EGE
— TypeEGE{T<:AbstractFloat}<:EGMFramework
EGE variant of the EGM algorithm.
Fields
gamma1::T
: momentum parameter
Example
julia> model = EGE(0.99)
EGE{Float64}(0.99)
OnlinePortfolioSelection.EGR
— TypeEGR{T<:AbstractFloat}<:EGMFramework
EGR variant of the EGM algorithm.
Fields
gamma2::T
: momentum parameter
Example
julia> model = EGR(0.)
EGR{Float64}(0.0)
OnlinePortfolioSelection.EMA
— TypeEMA{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)
OnlinePortfolioSelection.KMDLOG
— TypeKMDLOG<:ClusLogVariant
KMDLOG
is a concrete type used to represent the KMDLOG Model. Also, see KMNLOG
.
OnlinePortfolioSelection.KMNLOG
— TypeKMNLOG<:ClusLogVariant
KMNLOG
is a concrete type used to represent the KMNLOG Model. Also, see KMDLOG
.
OnlinePortfolioSelection.OPSAlgorithm
— TypeOPSAlgorithm{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.
OnlinePortfolioSelection.OPSMetrics
— TypeOPSMetrics{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.
OnlinePortfolioSelection.PAMR
— TypeOnlinePortfolioSelection.PAMR1
— TypePAMR1{T<:AbstractFloat}<: PAMRModel
Create a PAMR1 object. Also, see PAMR
, and PAMR2
.
Keyword Arguments
C::AbstractFloat=1.
: Aggressiveness parameter.
Example
model = PAMR1(C=0.02)
OnlinePortfolioSelection.PAMR2
— TypePAMR2{T<:AbstractFloat}<: PAMRModel
Create a PAMR2 object. Also, see PAMR
, and PAMR1
.
Keyword Arguments
C::AbstractFloat=1.
: Aggressiveness parameter.
Example
model = PAMR2(C=0.02)
OnlinePortfolioSelection.PP
— TypePP<: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()
OnlinePortfolioSelection.SMAP
— TypeSMAP<: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()
OnlinePortfolioSelection.SMAR
— TypeSMAR<: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()