getrtn.LSH: getrtn.LSH

Description Usage Arguments Value Author(s) See Also Examples

Description

get the rtn.LSH object from the PB object.

Usage

1
2
getrtn.LSH(PB.L, PB.S, hedge.rebFreq = "month", hedge.posi = 1,
  fee.long = 0, fee.short = 0)

Arguments

PB.L

a PB object of the long portfolio

PB.S

a PB object of the short portfolio

hedge.rebFreq

giving the rebalance freq when computing the hedged rtn.An interval specification, one of "day", "week", "month", "quarter" and "year", optionally preceded by an integer and a space, or followed by "s".See cut.Date for detail.

hedge.posi

a numeric, giving the position of the hedging assets

fee.long

a numeric, giving the fee of long asset

fee.short

a numeric, giving the fee of short asset

Value

a rtn.LSH object of class xts,giving the return series of long,short and hedge, with the attr of 'turnover'(a xts series) and 'fee'(a vector).

Author(s)

Ruifei.Yin

See Also

Other LSH-frame building functions: addrtn.hedge, getrtn.LBH, getrtn.bmk

Examples

1
2
3
4
5
port.L <- getPort(TSF,20, dir="long")
port.S <- getPort(TSF,20, dir="short")
PB.L <- port.backtest(port.L)
PB.S <- port.backtest(port.S)
re <- getrtn.LSH(PB.L,PB.S)

raphael210/RFactorModel documentation built on May 26, 2019, 11:06 p.m.