tag:blogger.com,1999:blog-261139923818144971.post5721309448430503731..comments2017-12-15T15:24:36.147+00:00Comments on Investment Idiocy: A simple breakout trading rule (pysystemtrade)Rob Carvernoreply@blogger.comBlogger37125tag:blogger.com,1999:blog-261139923818144971.post-49092492892046782252017-09-22T13:19:46.591+01:002017-09-22T13:19:46.591+01:00Hi Rob, would you combine a system that trades spr...Hi Rob, would you combine a system that trades spreads in the same manner? It could be possible for one leg of the spread to get offset by the other rules; how do you think that would affect the system?<br /><br />Thanks!Matthttps://www.blogger.com/profile/16122419489436306940noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-9734186440747528122017-02-16T10:41:01.369+00:002017-02-16T10:41:01.369+00:00If your mean reversion rule is just minus one time...If your mean reversion rule is just minus one times your breakout rule then of course there is no point combining them. Assuming the breakout rule is profitable then the mean reversion rule would be unprofitable. However if you can find a mean reversion rule which is sufficiently different, and is profitable, then combining the two types of rules would make sense.Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-40231138740665173572017-02-16T02:12:41.701+00:002017-02-16T02:12:41.701+00:00I would like to better understand how adding a mea...I would like to better understand how adding a mean reversion trading rule could add diversification to the breakout rule which you describe in this article/blog post. <br />I have not tested it myself, but intuitively I would expect these two to be negatively correlated: assume the mean reversion rule generates a negative forecast if the price is above its mean value and vice versa. If the price of an instrument starts at the longer term mean and then goes up it generates a positive breakout forecast, but at the same time a negative mean reversion forecast. Adding the mean reversion rule would then offset the momentum rule. The net effect would be a neutral forecast signal, resulting in no trading activity.<br />If this is correct, would it then be better to select either breakout or mean reversion and not combine the two together?Jeroenhttps://www.blogger.com/profile/02819426964787793954noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-30726719076099818092017-02-15T15:46:45.762+00:002017-02-15T15:46:45.762+00:00Jeroen... could you be more specific?Jeroen... could you be more specific?Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-42584638300505858342017-02-15T14:45:26.011+00:002017-02-15T14:45:26.011+00:00Dear Rob,
I know that I'm late to the party, b...Dear Rob,<br />I know that I'm late to the party, but I would also be very interested to hear/read more about this from you.Jeroenhttps://www.blogger.com/profile/02819426964787793954noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-45880757085886552352016-10-29T10:07:21.636+01:002016-10-29T10:07:21.636+01:00Exactly. Exactly. Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-73055698736930968392016-10-25T22:34:07.288+01:002016-10-25T22:34:07.288+01:00So just regressing y on time t over some lookback ...So just regressing y on time t over some lookback T? The signal being -1/(y_T - y_hat) with some smooth parameter?kohehirhttps://www.blogger.com/profile/04463402290354923205noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-36329335992664656352016-10-05T06:14:37.300+01:002016-10-05T06:14:37.300+01:00I'm seriously thinking about it myself. A nice...I'm seriously thinking about it myself. A nice indicator is to do a regression of the recent price and trade the inverse of the residual.Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-13298343827817749922016-10-04T23:14:35.497+01:002016-10-04T23:14:35.497+01:00Hi Rob,
I've seen some comments on mean reve...Hi Rob, <br /><br />I've seen some comments on mean reversion and your comments that you would write about them in the future. Based on your comments they seem to be longer term in nature. However, I have heard of short-term, in particular, mean reversion equity index futures. For example, I saw FORT LP has a package for only equity futures that trades short term mean reversion. <br /><br />I know your going to write about your mean reversion systems, but what has your experience been with short term mean reversion systems? I guess particularly for equity futures? What type of indicators should I look at?<br /><br />Thank you much!!Alhatihttps://www.blogger.com/profile/17029131460644334358noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-14680039582568680752016-10-04T19:19:31.046+01:002016-10-04T19:19:31.046+01:00As long as the correlation is less than 1.0 there ...As long as the correlation is less than 1.0 there will be some benefit. It doesn't cost anything so why not?Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-50091366200434289062016-10-04T18:48:34.840+01:002016-10-04T18:48:34.840+01:00For some reason, it won't let me reply. But in...For some reason, it won't let me reply. But in response to my question above: Great. I suppose my bit of skepticism is raised by the paper 'Which Trend is Your Friend' by the AQR guys. You show the same that different trend signals are highly correlated/the same. If thats the case what is your reasoning for using multiple trend signals?<br /><br />Thank you!!BrettMichaelhttps://www.blogger.com/profile/09457839737383784545noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-6383729805943014982016-10-04T16:47:13.660+01:002016-10-04T16:47:13.660+01:00Yes that is exactly what I do Yes that is exactly what I do Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-44245345396346851782016-10-04T16:06:57.241+01:002016-10-04T16:06:57.241+01:00In practice, would you recommend diversifying acro...In practice, would you recommend diversifying across different types of trend signals?(eg moving averages, breakouts, etc.)BrettMichaelhttps://www.blogger.com/profile/09457839737383784545noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-82607696093410137652016-09-09T15:07:36.278+01:002016-09-09T15:07:36.278+01:00Excellent! Thank you!Excellent! Thank you!BrettMichaelhttps://www.blogger.com/profile/09457839737383784545noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-6157741182534712722016-09-09T06:10:37.642+01:002016-09-09T06:10:37.642+01:00I will have to write a post about this subject, an...I will have to write a post about this subject, and don't worry I will at some point. The answer is too long to fit in this margin :-)Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-75017827651008647082016-09-08T21:35:02.293+01:002016-09-08T21:35:02.293+01:00Hi Rob,
I'd like to diversify the current tr...Hi Rob, <br /><br />I'd like to diversify the current trend following model with a mean reversion model(s). What is your experience with them and what places/indicators do you believe(or have seen) to be fruitful?<br /><br />Your work is much appreciated!BrettMichaelhttps://www.blogger.com/profile/09457839737383784545noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-29244414638899236802016-08-31T12:09:36.152+01:002016-08-31T12:09:36.152+01:00The anecodote in that paper has no statistical mea...The anecodote in that paper has no statistical meaning eithier - it's just one data point. But sure, Corn isn't perfectly correlated to other subsystem returns, so if you assume we can't predict risk adjusted returns then we should add it.<br /><br />I'm not familiar with the test you show, so I can't comment on it.<br /><br />There is also a multiple testing problem - if we test enough instruments then some of them will be significantly negative or positive regardless of the real underlying properties of the trading system.Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-14350916147258644352016-08-24T11:46:31.738+01:002016-08-24T11:46:31.738+01:00Ah. You use t_test and p_value calls on daily retu...Ah. You use t_test and p_value calls on daily returns data and test if they are statistically different from 0 - in this case, p-value is > 0.05 - not significant. <br /><br />So we cannot say anything for sure on CORN - but one could still use it because it provides diversification? I ask because here<br /><br />http://qoppac.blogspot.co.uk/2015/07/a-tale-of-two-positions.html<br /><br />you mention CORN position would have meant a worse loss during 2015 were it not for another agricultural instrument in the portfolio.<br /><br />I also checked Andrew Lo's paper that shows how to compute Sharpe ratio confidence intervals, <br /><br />def err(SR,T):<br /> return np.sqrt( (1 + 0.5*SR**2)/T )<br />T = 40*256; sr = -0.12<br />print sr + np.array([-1, 1]) * err(sr,T)<br /><br />gives [-0.12991763 -0.11008237], both ends for SR for CORN are in the negative: I don't know how to connect this with the previous significance results, but I guess rejection from t-test is stronger. <br /><br />Thanks,Murathttps://www.blogger.com/profile/10150493011658556812noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-86546760464250961772016-08-22T19:04:34.864+01:002016-08-22T19:04:34.864+01:00Sharpe is not statistically significant. Read chap...Sharpe is not statistically significant. Read chapter 3 ... again.Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-58136141994339849292016-08-22T10:30:49.173+01:002016-08-22T10:30:49.173+01:00Hi Rob, thanks for this excellent post. My questio...Hi Rob, thanks for this excellent post. My question is (maybe a little off-topic, I will be asking on subsystems rather than a single strategy) how necessary is for a subsystem to make money on its own? I recently checked CORN for example from the Chapter 15 system,<br /><br />print (system.accounts.pandl_for_subsystem("CORN").sharpe())<br /><br />which gave -0.13 as Sharpe Ratio; but I guess you included this subsystem because it increases diversification of the portfolio. Would this be correct? So in the future if I am adding new subsystems to Ch 15, I should not worry about its SR in isolation? \<br /><br />Thanks,Murathttps://www.blogger.com/profile/10150493011658556812noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-80824941254725852702016-06-13T19:48:51.067+01:002016-06-13T19:48:51.067+01:00(a) a different set of instruments [wider in the b...(a) a different set of instruments [wider in the book] (b) inclusion of effects of changes in volatility for position scaling.Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-70487266584103902082016-06-13T19:40:46.044+01:002016-06-13T19:40:46.044+01:00Rob,
Quick question about the turnover calculatio...Rob,<br /><br />Quick question about the turnover calculation. For some of the faster EWMAC variations, the turnover from the function is about half the raw turnover from the table on page 248 of your book, while the slower pairs are very tight. Any thoughts on where this divergence could be coming from?<br /><br />Thanks again for an awesome post!<br /><br />Kylekohehirhttps://www.blogger.com/profile/04463402290354923205noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-52669547678611612762016-06-06T14:04:22.244+01:002016-06-06T14:04:22.244+01:00Let's say I'm buying. I measure the offer ...Let's say I'm buying. I measure the offer price when I am about to submit my order. If I submitted a market order, I'd pay this. My expected slippage would be the offer versus the mid, or half the bid-ask. I compare the offer versus what I actually get filled at with the simple algo. The difference is the improvement. <br /><br />I will bear in mind your topic suggestion!Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-14605403303469264982016-06-06T13:17:07.631+01:002016-06-06T13:17:07.631+01:00Just came across your blog, thanks for sharing you...Just came across your blog, thanks for sharing your insights.<br />You mentioned somewhere that trading costs have come significantly down since implementing your new execution algo. Do you measure this relative to the price when you submitted your first order? Could you elaborate a bit please on how you measure this?<br />As a suggestion for a future topic: could you share your insights on how to trade futures based on non-price / fundamental / macro info?<br /><br />Thanks again for sharing!Alberthttps://www.blogger.com/profile/18263618816079076460noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-14818516391905551282016-05-26T08:08:36.230+01:002016-05-26T08:08:36.230+01:00I'd create a seperate mean reversion system. T...I'd create a seperate mean reversion system. The former is too complicated:<br /><br />https://www.mta.org/video/the-myth-of-the-perfect-trading-system/<br />Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.com