Default windows, strategy and smoothing functions used for portfolio backtesting.
equidistWindows(data, backtest = portfolioBacktest())tangencyStrategy(data, spec = portfolioSpec(), constraints = "LongOnly",
backtest = portfolioBacktest())
emaSmoother(weights, spec, backtest)
equidistWindows
function returns the "from" and "to" dates of the rolling window in a list form.
tangencyStrategy
function returns a S4 object of class "fPORTFOLIO"
.
emaSmoother
function returns a numeric vector of smoothed weights.
a multivariate time series described by an S4 object of class
timeSeries
. If your timeSerie is not a timeSeries
object, consult the generic function as.timeSeries
to
convert your time series.
an S4 object of class fPFOLIOBACKTEST
as returned by the
function portfolioBacktest
.
an S4 object of class fPFOLIOSPEC
as returned by the function
portfolioSpec
.
a character string vector, containing the constraints of the form
"minW[asset]=percentage"
for box constraints resp.
"maxsumW[assets]=percentage"
for sector constraints.
a numeric vector, containing the portfolio weights of an asset
equidistWindows:
Defines equal distant rolling windows.
The function requires two arguments: data
and
backtest
, see above. To assign the horizon
value to the backtest specification structure, use the function
setWindowsHorizon
.
tangencyStrategy:
A pre-defined tangency portfolio strategy.
The function requires four arguments: data
, spec
,
constraints
and backtest
, see above.
emaSmoother:
A pre-defined weights smoother (EMA) for portfolio backtesting.
The function requires three arguments: weights
, spec
and backtest
, see above. To assign initial starting weights,
smoothing parameter (lambda) or whether to perform double smoothing
to the backtest specification structure, use the functions
setSmootherInitialWeights
, setSmootherLambda
and setSmootherDoubleSmoothing
, respectively.
W\"urtz, D., Chalabi, Y., Chen W., Ellis A. (2009); Portfolio Optimization with R/Rmetrics, Rmetrics eBook, Rmetrics Association and Finance Online, Zurich.