Serving the Quantitative Finance Community

 
User avatar
figoliuxi
Topic Author
Posts: 11
Joined: August 23rd, 2011, 4:05 am

How to get the trigger price matched in automatic trading

June 13th, 2012, 9:04 pm

I 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.
Last edited by figoliuxi on June 12th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
tags
Posts: 3603
Joined: February 21st, 2010, 12:58 pm

How to get the trigger price matched in automatic trading

June 19th, 2012, 7:24 pm

no reply so far. my 2-cent.i imagine CQG's API allow to define a set of rules for orders (order type, treshholds, ...)quote:QuoteCQG?s API is well suited for traders developing and using black-box, program, and algorithmic trading.di you search keywords such as "order placing" throughout their user guide??
 
User avatar
figoliuxi
Topic Author
Posts: 11
Joined: August 23rd, 2011, 4:05 am

How to get the trigger price matched in automatic trading

June 24th, 2012, 3:59 am

Thanks edouard.We actually did not use API but maybe DDS to connect the platform to Excel. And even using API, the order delayed would still exits. And the order delayed is always a problem. Maybe the strategy cannot make profit in real trading(including those delays) is not a good one.
 
User avatar
winstontj
Posts: 0
Joined: April 7th, 2010, 1:00 pm

How to get the trigger price matched in automatic trading

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.