Pairs trading strategy and Futures
Author: maninjapan
Creation Date: 12/16/2009 11:35 AM
profile picture

maninjapan

#1
HI, I have made some very simple adjustments to the ratio calculations to Pairs Trading straetgy by Willibald and am trying to run this on financial futures contracts. I have set the futures contract information correctly and it works fine when I run it with any other strategy. I have all the margins set to $1000 in SIM, so if i set position size to $1000 I should expect to see a quantity of 1 in the trade log. However when I run it using the Pairs trading strategy it trades 8 or 9 contracts and the PL for each trade is only in cents, clearly not representing the point values I have set. Any help on this would be much appreciated. As I said, I have no problems with other strategies, just this one...

CODE:
Please log in to see this code.
profile picture

Cone

#2
Try enabling Futures Mode in the SIM. (If the button says, "Disable Futures Mode", then it is already enabled.)
profile picture

maninjapan

#3
It already is. As I was saying, if I choose another strategy ( simple crossover for example) the P/L and contracts based on $ Position size, work perfectly.... It just seems to be this strategy.

profile picture

Cone

#4
I don't see a problem with this or any other Strategy. Check the symbols that you entered and make sure they exactly match the ones in the SIM; they are CaSe-SenSiTivE.
profile picture

Eugene

#5
(Just to be on the safe side: the 'ZT-055' and 'ZF-055' symbols should be typed in exactly (case sensitive), and the hyphen char should be hyphen, not dash.)

Try copying the code to a new Strategy window and running it there.
profile picture

maninjapan

#6
I reinstalled the data under 'ZT' and 'ZF' to make sure the hyphen wasnt causing any problems, but still getting the same problem. Still seems to be recognizing it as a stock.. It still works fine under other strategies as a regular future contract...... Also tried copying the code to a different window.
Anything else that could be causing this?
profile picture

Cone

#7
When you use another strategy, you must be clicking on the symbol. That symbol case matches the SIM. Make sure that the SIM symbols exactly match the way you've entered them in the script above: "ZT-055" and "ZF-055"
profile picture

maninjapan

#8
I removed the data and reinstalled it just under ZT and ZF, didnt fix it. I also tried installing some other data NQ and ES, but still got the same problem. Im typing it in exactly the same way, upper case. I even tried rewriting it in lower case. For whatever reason it doesnt want to recognize the futures symbol....
profile picture

Eugene

#9
Let me guess: you're running the backtest using ASCII data?

Are the ZT/ZF symbols included in the DataSet, or they are external?
profile picture

Eugene

#10
There's definitely an issue when running a pair trading strategy like the one above on ASCII DataSet(s). Referring to an external symbol while executing a backtest on ASCII data appears to ignore the Symbol Info Mgr settings. We're investigating the problem. Please create a support ticket, including just a link to this thread is enough. tia.
profile picture

maninjapan

#11
Eugene, yes this is ASCII data, should have mentioned that at the beginning.
ZT/ZF are in the data set I am running though.
Thanks for taking this up, I will create the ticket.
profile picture

maninjapan

#12
I have another question about this strategy, The entry signal used in the way it is here, this means it enters on the close of the same bar the signal is given right? If you were to trade this in real life you would have to slightly preempt the signal to get a fill at the same time right?

CODE:
Please log in to see this code.
profile picture

maninjapan

#13
Eugene, any chance of getting an update on the problem outlined in this thread? Possibly an ETA on a solultion?


Thanks
profile picture

Eugene

#14
Please keep conversation in one place i.e. the support ticket passed on to another technician. No ETA available currently.
profile picture

maninjapan

#15
Point noted (just wasnt getting a reply on the ticket hence the question here)
profile picture

maninjapan

#16
Support have given me a work around for this problem. Just in case anyone else comes across the same problem, looks like the following provides a work around.
CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).