[R-SIG-Finance] Quantstrat to backtest portfolio strategy. User Defined Weights

Vineet Gupta vineetgupta410 at gmail.com
Wed Dec 14 15:28:00 CET 2016


Hi,

 

I am trying to use Quantstrat to backtest a portfolio strategy with user
defined weights at each re-balance date. The user defined weights, are given
in a matrix (example shown below)

 

         Date     ABC.UN   ABT.UN ACN.UN ADBE.UW

20 2015-05-15 0.50000000 0.000000    0.5       0

21 2015-05-22 0.50000000 0.000000    0.5       0

22 2015-05-29 0.50000000 0.000000    0.5       0

23 2015-06-05 0.50000000 0.000000    0.5       0

24 2015-06-12 0.08865296 0.411347    0.5       0

25 2015-06-19 0.00000000 0.500000    0.5       0

 

Simply put, how can I backtest such a strategy, using Quantstrat? I have
looked at the rule, 'rulePctEquity', but this appears to only govern maximum
trade sizes. 

 

What information does Quantstrat need to re-balance my portfolio at each
user-defined re-balance date?

 

Thanks in advance. Very much appreciated

 

Rgds,

Vineet

 


	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list