[R-SIG-Finance] Basket stop loss implementation quantstrat

Brian G. Peterson brian at braverock.com
Mon Dec 12 19:32:45 CET 2016


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



More information about the R-SIG-Finance mailing list