plot.OLP: Plot OLP objects

Description Usage Arguments Value Examples

Description

plot method for objects of the class "OLP"

Usage

1
2
## S3 method for class 'OLP'
plot(x, ...)

Arguments

x

an object of class OLP

...

additional arguments

Value

Plots the achieved wealth of an online portfolio selection algorithm. If multiple input arguments of class OLP are given a risk-return plot and APY and MDD values are also given.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#load data
data(NYSE)
# select stocks
data(NYSE)
x = cbind(iroqu=NYSE$iroqu, kinar=NYSE$kinar, comme=NYSE$comme)

# compute portfolio algorithms
MARKET = alg_BH(x, rep(1/ncol(x), ncol(x)))
BHbest = alg_BHbest(x)
ND     = alg_CRP(x, rep(1/ncol(x), ncol(x)))

plot(MARKET)
plot(MARKET, BHbest, ND)

ngloe/olpsR documentation built on May 23, 2019, 4:42 p.m.