Last data update: 2014.03.03

R: Portfolio Weights of the Lambda-strategy
GetLambdaWeightR Documentation

Portfolio Weights of the Lambda-strategy

Description

Given a toymkt and an initial weight vector, the function GetLambdaWeight computes a matrix of portfolio weights following the lambda strategy.

Usage

GetLambdaWeight(market, initial.weight = market$benchmark.weight[1, ], lambda)

Arguments

market

a toymkt object with toymkt$buy.and.hold = TRUE.

initial.weight

the initial portfolio weights. The default is the initial benchmark weights.

lambda

a number between 0 and 1.

Details

For details see GetNewLambdaWeight and Section 6.1 of Pal and Wong (2013). The purpose of this function is analogous to that of GetWeight, but here the strategy depends on the entire history of market weights.

Value

A matrix of portfolio weights.

References

Pal, S. and T.-K. L. Wong (2013). Energy, entropy, and arbitrage. arXiv preprint arXiv:1308.5376.

See Also

GetNewLambdaWeight, EnergyEntropyDecomp

Examples

data(applestarbucks)
market <- toymkt(applestarbucks)
weight <- GetLambdaWeight(market, initial.weight = c(0.5, 0.5), lambda = 0.2)
decomp <- EnergyEntropyDecomp(market, weight, plot = TRUE)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RelValAnalysis)
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RelValAnalysis/GetLambdaWeight.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GetLambdaWeight
> ### Title: Portfolio Weights of the Lambda-strategy
> ### Aliases: GetLambdaWeight
> 
> ### ** Examples
> 
> data(applestarbucks)
> market <- toymkt(applestarbucks)
Warning message:
In toymkt(applestarbucks) :
  Since initial.weight is not given, the benchmark is assumed to be equal-weighted initially.
> weight <- GetLambdaWeight(market, initial.weight = c(0.5, 0.5), lambda = 0.2)
> decomp <- EnergyEntropyDecomp(market, weight, plot = TRUE)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>