[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(01) futures contract rollover issues, (02) optimization



PureBytes Links

Trading Reference Links

Hi all,

I am live trading a trend following system on the INDIAN STOCK INDEX, and am faced with a very serious problem. I have tested the system using the CASH INDEX, but for trading we have to live trade the FUTURE INDEX. Now a very peculiar problem I faced is of futures contract rollover.
Last week I was feeding the O H L C data for the JUNE contract, which expired on the 26th of June, and for 27th of June I had to use the JULY FUTURES which were quoting about 1% lower. Well, on the 27th if I were to input the real JULY FUTURES data, the systems would assume a weak market and possibly go in to a sell, without really any weakness existing. How do I solve this problem, maybe adjusting the data. if that’s to be done how is it done.


Secondly, I want to write an optimization for exiting "X" number of contracts at "X" percent profit, so as to have a matrix like:
Exit 10% contracts at 02 % profit, then,
Exit 30% contracts at 04 % profit, then,
Exit 40% contracts at 05 % profit, then,
Exit 30% contracts at 07 % profit.
Now, to determine the number of contracts and the respective profit target can someone help me with an optimization code? That one is real difficult for me.

Hope someone can send me solutions to these 2 problems, as I have already started live trading this system.

Regards,

Dhiraj kothari.




Click below to experience Sooraj R Barjatya's latest offering 
'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek
 & Kareena http://www.mpkdh.com