matlab - How to forward test and plot? -
have received lot of help. more. learning lot going through code.
i have far:
loaded xlsx file using xlsread function.
after calculated correlation coeff. assigned variable(?).
then used(thanks @robert p.):
buyx = x(find(apc < -2.9079,1,'first')) selly = y(find(apc < -2.9079,1,'first')) buyy = y(find(apc > 0.44,1,'first')) sellx = x(find(apc > 0.44,1,'first'))
to first value meeting particular condition.
now want forward test first value received till condition met. @ same time make plot results.
i wondering start looking code/try this.
please point me in direction of functions required. think has loop through elements after receiving entry. not sure right way go it.
thanks
context:
i trying test statsarbitrage strategy. using excel work can't seem right functionality.
basically, when have entry(any set of buy sell) want system automatically start calculating profit/loss next data point , give output new variable. plot it. search new entry , again start profit/loss calculation.
Comments
Post a Comment