tag:blogger.com,1999:blog-35364652.post563761588722470222..comments2024-03-22T10:29:59.088-04:00Comments on Quantitative Trading: The Importance of 2 (as Sharpe Ratio)Ernie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comBlogger83125tag:blogger.com,1999:blog-35364652.post-3225579178741697022015-09-23T11:11:59.567-04:002015-09-23T11:11:59.567-04:00Hi Cheerful,
No, 10 bps is one-way.
A roundtrip fo...Hi Cheerful,<br />No, 10 bps is one-way.<br />A roundtrip for a long/short pair may incur 40bps.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-79398225710271644902015-09-23T11:09:51.575-04:002015-09-23T11:09:51.575-04:00Hi Dr Chan,
So the 10bps is for two-way for a sma...Hi Dr Chan,<br /><br />So the 10bps is for two-way for a small cap ticker? If I have long and short, would it means that I would have 20bps + margin cost?<br /><br />Thank youcheerfulhttps://www.blogger.com/profile/01799630668760078146noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-61141621464425167282015-09-19T07:56:09.734-04:002015-09-19T07:56:09.734-04:00Hi cheerful,
By transaction cost, I assume you me...Hi cheerful,<br /><br />By transaction cost, I assume you meant that of transacting just 100 shares? The 5bps one way tcost applies only to large cap stocks. Small cap stocks have incur up to 10 bps or even higher cost, especially if you transact more than 100 shares.<br /><br />Transaction costs do not include margin costs. You will have to pay margin cost whether or not your transact.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-32057029531357313242015-09-18T18:27:32.581-04:002015-09-18T18:27:32.581-04:00Dear Dr Ernie,
May I know what is the estimated t...Dear Dr Ernie,<br /><br />May I know what is the estimated transaction cost for US small cap ie Russell 2000 for one round trip for long and short strategy? If open and close for a long ticker is 5bps, it will be the same for a short ticker. With borrowing cost at average 4% annually for short, it will be 1.6bps a day for a short position. <br /><br />Then total estimated transaction cost will be 5bps + 5bps +1.6bps=11.6bps for a combine long and short open and close. This is headache for daily rebalancing. cheerfulhttps://www.blogger.com/profile/01799630668760078146noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-1736861819266662832014-08-13T16:09:09.129-04:002014-08-13T16:09:09.129-04:00Leo,
If you are using a mean reversion strategy, y...Leo,<br />If you are using a mean reversion strategy, you may want to enter only when it is, say, 2 standard devations away from the mean.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-81701248633215646982014-08-13T16:06:37.798-04:002014-08-13T16:06:37.798-04:00Dr Ernie,
May I know what could be the criteria? ...Dr Ernie,<br /><br />May I know what could be the criteria? I think it is not possible to know the expected return ahead. I working on yr USDCAD data. <br /><br />cheerfulhttps://www.blogger.com/profile/01799630668760078146noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-56010506166932022022014-08-13T16:01:28.135-04:002014-08-13T16:01:28.135-04:00Leo,
Short duration trades are not bad in themselv...Leo,<br />Short duration trades are not bad in themselves. They are only bad if the profit per trade is too small. You would have to adjust your entry criteria so that the expected profit is large before you enter.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-37478865860934966462014-08-13T15:00:08.122-04:002014-08-13T15:00:08.122-04:00Dr Ernie,
I read you did short term Mean Reversi...Dr Ernie, <br /><br />I read you did short term Mean Reversion for FX in 2012. How do you avoid too many short duration trades? If I use the longer look-back, my sharpe drops alot too and become unprofitable. <br /><br />Thank you<br />Leo<br />cheerfulhttps://www.blogger.com/profile/01799630668760078146noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-57225702698060596982014-08-04T15:02:40.333-04:002014-08-04T15:02:40.333-04:00Hi Leo,
Generally speaking, the longer the lookbac...Hi Leo,<br />Generally speaking, the longer the lookback, the longer the average holding period.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-24898905646392610822014-08-04T14:55:13.767-04:002014-08-04T14:55:13.767-04:00Dear Dr Ernie,
1ms resolution is challenging. =) ...Dear Dr Ernie,<br /><br />1ms resolution is challenging. =) I am using 1min data of yr USDCAD to build my signal. You are right, we can use high frequency data but need not trade frequently. My trading signal oscillates between long and short too frequently. May I know what methods do you use not to trade frequently? I feel that using just bollinger or linear mean reversion + half-life is not enough. cheerfulhttps://www.blogger.com/profile/01799630668760078146noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-53715859082258797272014-08-04T14:31:08.037-04:002014-08-04T14:31:08.037-04:00Hi Leo,
We have done research on FX data down to 1...Hi Leo,<br />We have done research on FX data down to 1 ms. <br /><br />The data frequency required depends on your strategy, but generally speaking there is no harm in using high frequency data: just because your data is high frequency does not mean that you have to trade as frequently.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-90311775981029352722014-08-04T14:06:29.171-04:002014-08-04T14:06:29.171-04:00Dear Dr Chan,
May I know have you look at smaller...Dear Dr Chan,<br /><br />May I know have you look at smaller time frames than the currency daily data you used in your book? When I used smaller time frame, sharpe ratio is high but too much trades. When and how should we used smaller time frames? <br /><br />Thank you for your teachings<br />Leo cheerfulhttps://www.blogger.com/profile/01799630668760078146noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-56112542677385353542014-08-03T16:23:38.604-04:002014-08-03T16:23:38.604-04:00Hi Leo,
You can try it, and you will conclude othe...Hi Leo,<br />You can try it, and you will conclude otherwise.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-65895699892386499692014-08-03T16:06:46.593-04:002014-08-03T16:06:46.593-04:00Dear Dr Ernie,
If we put in that transaction cost...Dear Dr Ernie,<br /><br />If we put in that transaction cost, maybe all the examples in your second book will have negative sharpe ratio?<br /><br />Thank you for your teachings<br />Leocheerfulhttps://www.blogger.com/profile/01799630668760078146noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-88467171199438658012014-08-03T15:45:09.071-04:002014-08-03T15:45:09.071-04:00Hi Leo,
5 bps is the one way transaction cost esti...Hi Leo,<br />5 bps is the one way transaction cost estimate that includes everything: commissions, bid-ask spread, and slippage. <br /><br />Of course, if one trades much large size than the typical bid/ask size, then the slippage and total cost will be larger.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-34490146644044721292014-08-03T14:45:44.602-04:002014-08-03T14:45:44.602-04:00Dear Dr Ernie,
It is another awesome book. In the...Dear Dr Ernie,<br /><br />It is another awesome book. In the book, you wrote 5bps for one way cost. 1) Do you consider a round trip ie the transaction cost associated with closing the position. 2) The transaction cost of 5bps = an estimate of real transaction cost + slippage + bid/ask spread?<br /><br />Thank you for your teachings.<br />Leocheerfulhttps://www.blogger.com/profile/01799630668760078146noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-84378240344107604852014-08-02T15:52:11.847-04:002014-08-02T15:52:11.847-04:00Hi Leo,
You can generally assume a transaction cos...Hi Leo,<br />You can generally assume a transaction cost of about 5bps, maybe a bit lower for FX. See Quantitative Trading example 3.7 for the general way to insert transaction cost into a backtest.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-57067609188592153812014-08-02T15:52:11.034-04:002014-08-02T15:52:11.034-04:00Hi Leo,
You can generally assume a transaction cos...Hi Leo,<br />You can generally assume a transaction cost of about 5bps, maybe a bit lower for FX. See Quantitative Trading example 3.7 for the general way to insert transaction cost into a backtest.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-69593071646444399712014-08-02T14:58:29.071-04:002014-08-02T14:58:29.071-04:00Dr Ernie,
I remember you will want to trade a str...Dr Ernie,<br /><br />I remember you will want to trade a strategy with Sharpe ratio > 2 after transaction costs. I am using yr USDCAD data. How should I insert the transaction cost? ie each trade, the price increase from 1.0000 to 1.0012. What is the practical capital I should put in and how much should I subtract for the transaction cost. Using dollar or percentage is better?<br /><br />Thank you Leocheerfulhttps://www.blogger.com/profile/01799630668760078146noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-89724930610048651762014-01-06T19:19:29.254-05:002014-01-06T19:19:29.254-05:00Hi Anon,
Yes, if you average returns on trading da...Hi Anon,<br />Yes, if you average returns on trading days only, we should multiply by 252 to annualize. If you average returns on calendar days, you should multiply by 365.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-46262894414153645702014-01-06T16:46:35.414-05:002014-01-06T16:46:35.414-05:00Hi Ernie.
In your book, Quantitative Trading, you...Hi Ernie.<br /><br />In your book, Quantitative Trading, you said we should use 252 for N to annualize a Sharpe ratio because there are 252 trading days per year on average. Does this assume the mean return and the standard deviation of returns are measured in trading days?<br /><br />What if you measure returns in calendar days? For example, if you long a stock and it rises 5% after a month, that means it took 30 calendar days to rise 5%, even if there were only 22 trading days in that month, because the stock cannot move on non-trading days. Then, the daily return for this trade would be 0.05 / 30, rather than 0.05 / 22. Can I use 365 for N in this case to annualize the Sharpe?<br /><br />Thanks!<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-29878710908976989042013-08-03T10:12:05.010-04:002013-08-03T10:12:05.010-04:00Anon,
You should be calculating standard deviation...Anon,<br />You should be calculating standard deviation of daily returns, so it doesn't matter what size your backtest sample is. In order to annualize the standard deviation, you just need to multiply the daily SD by sqrt(252).<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-43915204631902827722013-08-02T19:43:57.739-04:002013-08-02T19:43:57.739-04:00Mr Chan,
What if I am calculating annualized shape...Mr Chan,<br />What if I am calculating annualized shape ratio and I am using more than 252 days of returns. It seems in this case my standard deviation would be to large since it comes from more than 252 days of returns. So would I multiply by sqrt(days), where days could be >252?<br />thanks Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-24260745750294939872013-03-27T12:50:14.490-04:002013-03-27T12:50:14.490-04:00Hi Erik,
If you want to calculate unlevered return...Hi Erik,<br />If you want to calculate unlevered returns (suitable for input to Kelly formula), then the denominator should be the market value of the contract. In ES, that's $1550*50:<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-23963526012267717892013-03-27T11:39:18.941-04:002013-03-27T11:39:18.941-04:00Hi Ernie,
Great blog! I love how you are promotin...Hi Ernie,<br /><br />Great blog! I love how you are promoting dialogue in an industry as secretive as the CIA.<br /><br />A quick question: if you implement a daily futures trading strategy, how are the returns calculated? The returns on how much money you've set aside for margin calls? For example, buying 1 ES future for 1550 doesn't mean you've sunk $1550 * 50 notional into the trade.Erikhttps://www.blogger.com/profile/06192115088327530650noreply@blogger.com