[R-SIG-Finance] Return.portfolio issue

ROUX, Nicolas nicolas.roux at hec.edu
Mon May 29 09:32:23 CEST 2017


Hello all,

I am trying to backtest  a long/short portfolio using Return.Portfolio but
am running into some sort of error, or I do not fully understand how to use
return.portfolio.

For a quarterly rebalancing of shorts, I am providing monthly returns, a
set of negative
weights in an xts format on quarter dates (created by to.period), the final
argument is rebalance_on="quarters".

The result is an set of regular zigzags where the position changes too
regularly. [image: Inline images 2]
The code:

head(monthly.returns[,1:3])            AXA.Returns Accor.Returns
Air.Liquide.Returns
1987-01-31           NA            NA                  NA
1987-02-28 -0.039941766   -0.00311151         -0.03195942
1987-03-31  0.008723886    0.03936148          0.07320454
1987-04-30  0.005995543   -0.04579859         -0.01919371
1987-05-31 -0.055431515   -0.10515575         -0.03495027
1987-06-30 -0.145464190   -0.02607130         -0.04062429

head(weights$short.w[,1:3])           Asset 1 Asset 2 Asset 3
1987-03-31      -1     0.0       0
1987-06-30       0    -0.5       0
1987-09-30       0     0.0       0
1987-12-31       0     0.0       0
1988-03-31       0     0.0       0
1988-06-30       0     0.0       0

head(Port.return[1:10])           portfolio.returns
1987-04-30       -2.00599554
1987-05-31       -0.05543151
1987-06-30       -0.14546419
1987-07-31       -2.01670857
1987-08-31        0.09265071
1987-09-30       -0.09907100



I am not sure I understand how the short weights work? Perhaps I should
just use positive weights and minus the returns afterwards?

Any help much appreciated.

Nicolas Roux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20170529/9c9193ec/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 21223 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20170529/9c9193ec/attachment.png>


More information about the R-SIG-Finance mailing list