Yes, it comes at a cost, as I said in my message, and as the documentation for applyStrategy.rebalancing describes.
In the demo folder, see any of the 'rebalancing' demos for sample code. Regards, Brian On Tue, 2016-12-13 at 19:37 +0000, Aaron wrote: > Hi Brian, > > > Thank you for the reply. > > > I'm going to go out on a limb and assume that rebalancing in this way > will come at the cost of considerable overhead(?). I plan on testing > 28 symbols with a minimum data periodicity of 15 minutes (over a > period of ~10 years). How significant would the extra overhead be in > a situation like this? > > > I have not yet got into rebalancing rules in quantstrat. Is there an > example I could look up which could point me in the right direction? > > > Also, as my objective appears to be outside the scope of normal > quantstrat applications, are you able to provide some sketch code as > to how such an operation would be managed? I'm more than happy to > have a dig at this myself but somewhere to start would be nice. > > > Cheers, > > Aaron > > > ________________________________ > From: Brian G. Peterson <br...@braverock.com> > Sent: Tuesday, 13 December 2016 5:32 AM > To: Aaron; r-sig-finance@r-project.org > Subject: Re: [R-SIG-Finance] Basket stop loss implementation > quantstrat > > On Mon, 2016-12-12 at 17:17 +0000, Aaron wrote: > > > > Is it possible to implement a basket or portfolio stoploss in > > quantstrat? That is, I would like to trade a number of symbols > > simultaneously and use accumulated p/l across all symbols as a > > global > > stoploss/take profit. > > > > I have not seen any examples of this in quanstrat, likely as this > > method of position management is normally seen in foreign exhange > > trading and not stocks. > > > > Is it possible to do or would it require getting a list of possible > > entry prices for all symbols and performing post-hoc position > > management? > quantstrat isn't really optimized for this kind of rule. > > You could do it with a rebalance rule, but it will add a cross-symbol > loop on every rebalance period. > > Brian > > > [[alternative HTML version deleted]] > > _______________________________________________ > R-SIG-Finance@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. _______________________________________________ R-SIG-Finance@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.