July 24th, 2012, 2:14 am
QuoteOriginally posted by: figoliuxiI recently tried to build an pairs trading strategy and implement it in CQG. But the price I got from the market is different from my model-based trigger price(I use the bid-ask middle price to do backtesting). So is there any suggestions on how to match my model price and the real trading price? My question maybe very usual and common to solve in automatical trading, wish someone can give me an answer. Thanks.First, don't ever use the mid point. Always assume the worst at first. If you are buying assume you are lifting the offer and if you are selling assume you are selling at the bid. Second, if you need to remove liquidity always send marketable limit orders (pay through the bid or offer and allow price improvement to help you).Normally people have great pairs signals and trades but have an issue with the hedge or second leg. It's easy to provide liquidity and wait to get hit on the first side but then how do you get into the second side without losing your shirt?? If your models are using the midpoint of the bid/ask then you don't have accurate models - throw those out and use the bid/offer prices or use a penny past the bid/offer price. If you assume you are going to pay a penny more on every entry and exit and you are always buying the offer and selling the bid and after all that the strategy is profitable... time to put money behind it. Once you start trading you can continue to backtest each live day against a simulated day and come up with an accurate correction factor. You'll get to know your backtest data and approach very well that way.