tag:blogger.com,1999:blog-35364652.post6370834161133230242..comments2024-03-22T10:29:59.088-04:00Comments on Quantitative Trading: An options workshop and other miscellanyErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comBlogger39125tag:blogger.com,1999:blog-35364652.post-51753380677147516902012-09-29T15:48:42.487-04:002012-09-29T15:48:42.487-04:00Hi Quijano,
Thanks for your kind comment. My new b...Hi Quijano,<br />Thanks for your kind comment. My new book is due probably in 2013 Q2.<br /><br />Slippage in IB stop orders depends of course on the exact pair. For EURUSD, it is small, 1 or 2 pips. For EM currencies, can be more than the BA spread.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-71982014486872566292012-09-29T15:38:56.323-04:002012-09-29T15:38:56.323-04:00Hi Ernie,
Thanks for the great blog.
Not sure if...Hi Ernie,<br /><br />Thanks for the great blog.<br /><br />Not sure if you already discussed but I would like to know your opinion on using stop orders on IB, do they get executed efficiently? what is a typical slippage in pips in FX in these cases? <br /><br />Btw, do you have expected date for your second book? very much looking forward to it.<br /><br />Thanks again!Quijanonoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-56527549496636198722012-09-21T12:37:53.716-04:002012-09-21T12:37:53.716-04:00Martin,
No, using intraday data to test for cointe...Martin,<br />No, using intraday data to test for cointegration doesn't invalidate the test if you intend to hold overnight.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-14327115736748441382012-09-21T11:08:57.683-04:002012-09-21T11:08:57.683-04:00one last question. when we do hold positions overn...one last question. when we do hold positions overnight. I understood that intraday data do not bring additional statistical significance, but using intraday instead of daily data invalidates the cointegration test for that pairs trading purpose? <br /><br />Thanks Ernie.Martinnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-64794188529599915092012-09-20T13:11:29.235-04:002012-09-20T13:11:29.235-04:00Martin,
If you don't hold positions over night...Martin,<br />If you don't hold positions over night, then you want to be sure that mean-reversion happen during the trading hours. In this case, you should test for cointegration using intraday data. But you can't concatenate such data from different days without back-adjustment due to the overnight gap. (See my previous comments.)<br /><br />On the other hand, if you do hold positions overnight, than you just need to use daily data to test for cointegration, since all you care is that mean reversion happens, no matter how long it takes. Testing with intraday data does not buy you any additional statistical significance.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-55132131614142128312012-09-20T11:19:34.523-04:002012-09-20T11:19:34.523-04:00Ernie, can you explain me the similarities and the...Ernie, can you explain me the similarities and the differences in the results between testing for cointegration in intraday and daily data, specifically for the pairs trading approach that we talked earlier.<br />I'm a novice in econometrics.<br /><br />thanksMartinnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-7404558144162717222012-09-17T22:39:10.564-04:002012-09-17T22:39:10.564-04:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/13072965253038343812noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-22379675544725922482012-09-17T22:36:54.478-04:002012-09-17T22:36:54.478-04:00Great blog !Great blog !w a k n i s jnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-38343517648162488242012-09-17T18:58:15.326-04:002012-09-17T18:58:15.326-04:00@sg,
Yes, the z on page 130 refers to the spread G...@sg,<br />Yes, the z on page 130 refers to the spread GLD-1.6766*GDX.<br /><br />For HFT, you need to purchase tick data (trades and quotes). Cointegration is irrelevant at that timeframe.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-68243626024683858402012-09-17T18:49:06.657-04:002012-09-17T18:49:06.657-04:00@Ernie,
Thanks for the answer
You asked me which p...@Ernie,<br />Thanks for the answer<br />You asked me which page is the plot(z) on. It is on page 130.<br />Is it like the spread of Stock A and B?<br /><br />Also, another question...<br />For HFT type trading, what kind of time frame the data we need? <br />There should be some kinds of cointegration that we can take advantage for HFT data?sghttps://www.blogger.com/profile/11659880939948836671noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-63037763638145329422012-09-17T11:35:08.920-04:002012-09-17T11:35:08.920-04:00Martin,
If you do carry positions overnight, there...Martin,<br />If you do carry positions overnight, there is no reason to use intraday data for cointegration tests.<br />You can use intraday data merely to backtest entries and exits.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-77458315635897231842012-09-17T11:34:05.461-04:002012-09-17T11:34:05.461-04:00Hi Anon,
I recommend you use limit order on one le...Hi Anon,<br />I recommend you use limit order on one leg and market order on the other.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-72312455675194796102012-09-17T10:59:40.571-04:002012-09-17T10:59:40.571-04:00Ernie, from what i understand the problem with int...Ernie, from what i understand the problem with intraday data is if I exit at market close. <br /><br />but if i use intra day data just for open and close positions and still carrying them overnight if the divergence persists(like as with daily data), then there is no need to adjust the 5 minute data,am i right?<br />btw, im not considering this HFT.<br /><br />thanks for your help! And your book has a very good material, learned Matlab practicing with it.Martinnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-22565337668519674142012-09-17T10:10:53.520-04:002012-09-17T10:10:53.520-04:00Hi Ernie,
I just want to ask whether you recomme...Hi Ernie, <br /><br />I just want to ask whether you recommend using market orders to hit both legs of a pair trade or whether that is too risky. I'm afraid the liquidity would suddenly drop away. But then again, even if I quote a limit price on one side and use the market side to hedge, there is also the same risk, albite on one leg only. do you think its recommended to use market orders on both legs and just hit the market price?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-63464399218713771622012-09-17T10:04:34.178-04:002012-09-17T10:04:34.178-04:00Martin,
If you are looking for cointegration on a ...Martin,<br />If you are looking for cointegration on a daily basis, there is no need to use 5-min data. It won't help.<br /><br />But if you are trading strictly intraday (exiting at close), then the overnight gap may cause the cointegration overnight to disappear which is irrelevant to your model. You need to adjust it away.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-90587192657540346412012-09-16T21:02:34.880-04:002012-09-16T21:02:34.880-04:00@sg:
I'm doing a research paper on this subjec...@sg:<br />I'm doing a research paper on this subject in the Brazilian market.<br /><br />@Ernie:<br />thanks for the asnwer. <br />im using 5min data without adjustments. can you explain a little what would be the problem of using this kind of data for pairs trading? and why is it different from daily data?<br /><br />Martinnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-5258361717919852132012-09-16T13:52:43.089-04:002012-09-16T13:52:43.089-04:00@Martin,
If you want to know if intraday data is c...@Martin,<br />If you want to know if intraday data is cointegration, you have to test it on each day separately, or use aspecial method to concatenate all the different days data together with no gap (just like futures continuous contracts backadjustment).<br /><br />@sg,<br />plot(z) on which page? Using Z means Zscore, or the residue from a linear regression fit.<br /><br />Engle-Granger and Johansen are both cointegration tests for multiple time series. ADF is for testing stationarity of a single time series only. <br /><br />E.Ernie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-86725580926622238822012-09-15T19:15:07.694-04:002012-09-15T19:15:07.694-04:00@Martin:
You posted an interesting question..
I a...@Martin:<br />You posted an interesting question.. <br />I am interested to know the answer too.<br /><br />Are you doing intraday pair trading, Martin? or, some HFT stuff?<br /><br />@Ernie:<br />Thanks for the answer.<br /><br />I have another question, if you don't mind, since I just bought your book...<br /><br />1. The plot(z). Is Z basically the spread between stock #1 and stock #2?<br />2. I read somewhere about Engle-Granger and Johansen test. What are these 2 tests for (and compared to ADF) ?<br /><br />Thanks!sghttps://www.blogger.com/profile/11659880939948836671noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-21324078105323997412012-09-15T17:26:19.417-04:002012-09-15T17:26:19.417-04:00Hi Ernie,
and when testing cointegration with intr...Hi Ernie,<br />and when testing cointegration with intra day data? which data lenght should be used?<br /><br />thanks<br />Martinnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-71499091173827644862012-09-13T07:56:31.761-04:002012-09-13T07:56:31.761-04:00Hi sg,
For cointegration test, one year of daily d...Hi sg,<br />For cointegration test, one year of daily data is minimum.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-62524323871749383842012-09-13T04:18:51.817-04:002012-09-13T04:18:51.817-04:00Hi Ernie,
Regarding cointegration for pair trading...Hi Ernie,<br />Regarding cointegration for pair trading, how many days of data do I need to run cadf test ? <br /><br />I am trading pairs with holding period of up to 20 days <br /><br />For example, I ran cadf test for STI/CMA pairs and the results are:<br />with 1 year daily data, more than 95% probability that the pair is cointegrated.<br />with 3 months of daily data, less than 90% (not cointegrated?)<br />with 1 month data, the pair has more than 95% probability that it is cointegrated.<br /><br />So, which data length should I decide? Thanks so muchsghttps://www.blogger.com/profile/11659880939948836671noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-52440903194088400682012-09-13T04:18:23.287-04:002012-09-13T04:18:23.287-04:00This comment has been removed by the author.sghttps://www.blogger.com/profile/11659880939948836671noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-33164107397721035542012-08-27T09:26:34.740-04:002012-08-27T09:26:34.740-04:00Hi Andrew,
I believe it is quite possible to run u...Hi Andrew,<br />I believe it is quite possible to run up to 10 strategies by one person, though most people would be very happy with 3-5 consistently profitable ones!<br /><br />If a fund is earning, say, $1M /year in fees, I can't see why the sole GP should not hire or partner with someone so as to provide business continuity in case of personal emergencies.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-81495096607912266082012-08-27T05:56:43.655-04:002012-08-27T05:56:43.655-04:00hi Ernest,
long time reader and a big fan of alg...hi Ernest, <br /><br />long time reader and a big fan of algo trading. For someone just starting out could you provide some idea how scaleable a one-man quant shop is? Without giving away specifics how many distinct strategies do you run? And how much could I realistically manage on my own? I ask this as i have some promising ideas but i don't want the hassle of hiring others. I mean, would I have to cap out at 1mill, 30mill etc..? Anyway, keep up the excellent posts!Andrewnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-80562031265482219322012-08-17T08:05:22.784-04:002012-08-17T08:05:22.784-04:00Brendon,
Some other reader has suggested kibot.com...Brendon,<br />Some other reader has suggested kibot.com for tick data as well. It looks very professional, and split/dividend adjusted.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.com