[R-SIG-Finance] Return.portfolio issue
Brian G. Peterson
brian at braverock.com
Mon May 29 11:49:24 CEST 2017
On 05/29/2017 02:32 AM, ROUX, Nicolas wrote:
> 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. Inline images 2
> The code:
<...>
This isn't exactly a reproducible example.
Here is a reproducible example:
require(PerformanceAnalytics)
data(edhec)
data(weights)
sweights <- -1 * weights
pr <- Return.rebalancing(R=edhec, weights=sweights)
charts.PerformanceSummary(pr)
It is clearly a bug. We'll take a look.
> **
>
> 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
More information about the R-SIG-Finance
mailing list