Skip to content
Prev 12948 / 15274 Next

quantstrat::Return.rebalancing

Yes, it was an old version of PerformanceAnalytics.  It is working fine now.  Thanks for pointing that ouit.


#long TMF 60% (leveraged 3x t-bond bull), long XIV 40%
getSymbols("XIV", from="1990-01-01")
getSymbols("TMF", from="1990-01-01")
tmfRets <- Return.calculate(Cl(TMF))
xivRets <- Return.calculate(Ad(XIV))
both <- merge(xivRets, tmfRets, join='inner')
colnames(both) <- c("xiv", "tmf")
portfRets <- Return.rebalancing(both, weights=c(.4, .6),
                               rebalance_on="weeks", geometric=FALSE)



***************************************************************
This message and any attachments are for the named person's use only.
This message may contain confidential, proprietary or legally privileged
information. No right to confidential or privileged treatment
of this message is waived or lost by an error in transmission.
If you have received this message in error, please immediately
notify the sender by e-mail, delete the message, any attachments and all
copies from your system and destroy any hard copies. You must
not, directly or indirectly, use, disclose, distribute,
print or copy any part of this message or any attachments if you are not
the intended recipient.



-----Original Message-----
From: r-sig-finance-bounces at r-project.org [mailto:r-sig-finance-bounces at r-project.org] On Behalf Of Brian G. Peterson
Sent: Tuesday, November 04, 2014 1:48 PM
To: r-sig-finance at r-project.org
Subject: Re: [R-SIG-Finance] quantstrat::Return.rebalancing
On 11/04/2014 11:50 AM, Bos, Roger wrote:
It looks like you're using old versions of the packages.

You did not attach your sessionInfo as described in the posting guide http://www.r-project.org/posting-guide.html

Both your examples work for me with current code.

In the current CRAN version of PerformanceAnalytics,  Return.rebalancing and Return.portfolio are aliases for the same function. (those functions are in PerformanceAnalytics, not quantstrat)

Regards,

Brian



--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock

_______________________________________________
R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.