Description Usage Arguments Value Author(s) See Also Examples
get the rtn.LSH object from the PB object.
1 2 | getrtn.LSH(PB.L, PB.S, hedge.rebFreq = "month", hedge.posi = 1,
fee.long = 0, fee.short = 0)
|
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 |
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 |
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).
Ruifei.Yin
Other LSH-frame building functions: addrtn.hedge
,
getrtn.LBH
, getrtn.bmk
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.