tag:blogger.com,1999:blog-261139923818144971.post1846323223838525471..comments2024-03-29T07:20:07.753+00:00Comments on This Blog is Systematic: Systems building - futures rollingRob Carverhttp://www.blogger.com/profile/10175885372013572770noreply@blogger.comBlogger94125tag:blogger.com,1999:blog-261139923818144971.post-81336834764247814442023-09-28T08:38:26.010+01:002023-09-28T08:38:26.010+01:00"considering that you don't want to trade..."considering that you don't want to trade too long after the ref price used for signal generation"<br /><br />Actually I don't care that much. In my backtests I assume I delay all my trades for a day after the relevant closing price is captured. It makes bugger all difference to the p&l. I have to delay for a week or more before there is even a tiny difference. This is because I am trading slow signals. So to answer your question, I trade the next day once the markets are liquid.Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-27571263065349005002023-09-28T00:53:40.135+01:002023-09-28T00:53:40.135+01:00Hi Rob, lots of valuable information here.
Basic ...Hi Rob, lots of valuable information here.<br /><br />Basic question:<br />Assuming I have a system generating daily signals on the settlement or closing price, when and how would ou send the orders considering that you don't want to trade too long after the ref price used for signal generation, and the liquidity drop when the next day session restarts.<br /><br />Thank youJean Brayehttps://www.blogger.com/profile/08362757039679996439noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-30552691776782763872022-07-30T11:09:30.240+01:002022-07-30T11:09:30.240+01:00It's in the new bookIt's in the new bookRob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-22021806016997178182022-07-28T05:52:32.261+01:002022-07-28T05:52:32.261+01:00Hi Rob,
What do you think about solving the seaso...Hi Rob,<br /><br />What do you think about solving the seasonality problem by instead calculating the carry signal using a wider forward looking span?<br /><br />E.g., CL_carry = CL_front_month / CL_1_year_forward<br /><br />Of course, the 1 year forward version would be less volatile than the 1 month ahead version so it would have to be scaled up appropriately. But it seems to me that it could give better information about the current payoff to carry than using stale prices.<br />Richard Johnstonhttps://www.blogger.com/profile/18150375457520792501noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-36073241228337232372021-12-07T11:58:41.428+00:002021-12-07T11:58:41.428+00:00There is no volume, but the price is marked to mod...There is no volume, but the price is marked to model; so it should match the theoretical carry on the CTD bond. This is probably okay with financials which is good because for most of them we can only trade the 1st contract. It's more speculative on commodities, but we can normally trade further out and use a nearer contract for carry calculations.<br /><br />Alternatives are compare to spot price (lot of work, need to know what CTD is and conversion factors) or use the yield curve (lot of work, extra data).Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-16986967589275123382021-12-07T11:54:27.675+00:002021-12-07T11:54:27.675+00:00Hi Rob,
I've been running the trading system ...Hi Rob,<br /><br />I've been running the trading system in Excel for a couple of months on 5 instruments, and the Carry rule on the Bund was generating significant losses: Carry weighting was 50%, and it resulted in about 15% realised loss on the Risk Capital allocated for the Bund, on an Account level Risk Target of 23%<br />So I've switched off Carry for the Bund until I understand it better.<br /><br />For the Bund, you are using the next contract for Carry, according to the Roll Calendar csv. I've just rolled Dec 21 to Mar 22, with Dec expiring tomorrow. The June contract has no volume - so can it's price be trusted for Carry? Are there any alternate instruments that could be used for the Bund's Carry? dr1verhttps://www.blogger.com/profile/07207779413866318164noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-61205386652331562862021-11-03T16:32:04.285+00:002021-11-03T16:32:04.285+00:00Thanks for clarifying. My perspective is currently...Thanks for clarifying. My perspective is currently from spread trading, where the only contracts available are nearer months, so for instance, I can't roll WTI from Dec 21 to Dec 22, but only to Jan/Feb/Mar. So (with your help!), I've gradually been improving my intuition around thisdr1verhttps://www.blogger.com/profile/07207779413866318164noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-23304105736250157042021-11-03T16:12:36.641+00:002021-11-03T16:12:36.641+00:00Yes, and Yes.
But carry is very noisy; being '...Yes, and Yes.<br /><br />But carry is very noisy; being 'wrong' for a few days is a small price to pay for a cleaner signal (in fact I smooth for much longer periods than a few days in many cases)<br /><br />It's also not so likely that the carry will switch sharply between contracts, with the possible exception of natgas and any other seasonal commodity where I can't hold a constant month.Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-78628499753358706852021-11-03T15:52:25.684+00:002021-11-03T15:52:25.684+00:00"If I switch from a contract that is backward..."If I switch from a contract that is backwardated to one that is contango, then my raw carry signal will change on that day":<br /> because as you roll, you update the carry contract in the system?<br /><br />And can the smoothing lag cause any issues if it is still being influenced by the previous carry data from the previous contract? Could the carry forecasts be "wrong" until it catches up?dr1verhttps://www.blogger.com/profile/07207779413866318164noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-80430717515524172982021-11-02T16:12:18.071+00:002021-11-02T16:12:18.071+00:00Neithier #1 or #2; I don't select contracts in...Neithier #1 or #2; I don't select contracts in this way in my backtest since it would be lethally complicated. <br /><br />"Also, as forecasts switch from +ve to -ve does that you mean you switch contract months?" <br /><br />No, not that eithier<br /><br />Basically I just use price and current position (forecast) as an input into my live trading contract decision when to roll. Once I've rolled I wouldn't go back to a prior contract, that would be a nightmare.<br /><br />If I switch from a contract that is backwardated to one that is contango, then my raw carry signal will change on that day. But because I smooth that, it will be a few days before this starts to affect my forecast.<br /><br />I hope that makes sense.<br />Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-28199024681918691612021-11-02T15:53:19.325+00:002021-11-02T15:53:19.325+00:00Hi Rob,
A query about rolldown, stitching, trading...Hi Rob,<br />A query about rolldown, stitching, trading rules and forecasts:<br /><br />If long, then you want to be in the most backwardated contract vs nearer month, and if short, then most contagoed.<br />Does that mean:<br />#1. you run all of your trading rules for the instrument on a stitched timeseries ending in the most backwardated month, and produce a combined forecast: the "long forecast"<br /><br />#2. you also run all of your trading rules on a stitched timeseries ending in the most contagoed month, and produce another combined forecast: the "short forecast"<br /><br />#3. If "long forecast" is positive and > abs("short forecast"), you go long the backwardated month? If short forecast is negative and abs(short forecast) > abs(long forecast), you go short the contagoed month? ...but then what if short forecast is positive and > long forecast ...?? Or long forecast is weak negative and short forecast is stronger and positive, etc?<br /><br />I imagine I'm over-complicating things as you regularly say you like to keep things simple. But I assume you want to be running the Trading Rules on a time series that includes the contract you actually want to trade, and you'll get different forecasts out of #1 and #2, above.<br /><br />Also, as forecasts switch from +ve to -ve does that you mean you switch contract months?dr1verhttps://www.blogger.com/profile/07207779413866318164noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-57274036306694236062021-09-29T17:40:32.846+01:002021-09-29T17:40:32.846+01:00Thanks for the quick response,
DavidThanks for the quick response,<br />Daviddr1verhttps://www.blogger.com/profile/07207779413866318164noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-43245169897295060382021-09-29T17:08:09.787+01:002021-09-29T17:08:09.787+01:00For newer roll dates (and it depends on the instru...For newer roll dates (and it depends on the instrument) they were generated by me manually choosing to roll on that date on my live system. This isn't an automated process that strictly follows the date offsets; it might just be that I fancied rolling earlier.<br /><br />It won't make that much difference, but actually this is something I'm going to explore in my new book (just started writing). <br /><br />Carry could be the nearer contract, but for Metals the futures curve has a fairly steady slope so it won't matter. Having carry as the further out contract means I have the option to delay rolling for some reason.Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-5453697024088754562021-09-29T16:36:27.606+01:002021-09-29T16:36:27.606+01:00Hi Rob,
I'm reviewing the back-adjustments for...Hi Rob,<br />I'm reviewing the back-adjustments for Gold, and want to make sure I understand how the process works.<br />Your rollconfig.csv has the following:<br />RollOffsetDays -30<br />ExpiryOffset 26<br />So this implies that the Roll date = -3 from the 1st of the month.<br />So for December 2020, this is 28 Nov, a Saturday - so, I assume the next best date is 27 Nov.<br />I've downloaded data from barchart.com and the volumes leading to this date are as follows:<br /> 20201200 20201200 20210200 20210200<br />Date Last Volume Last Volume<br />30/11/2020 1775.7 3145 1780.9 242726<br />27/11/2020 1781.9 71804 1788.1 282346<br />25/11/2020 1805.5 205754 1811.2 133601<br />24/11/2020 1804.6 367879 1810.9 126761<br />23/11/2020 1837.8 319657 1844.1 108427<br />20/11/2020 1872.4 186166 1878.2 46608<br /><br />Your roll calendar for Gold has 23 Nov. Does this mean you manually edited that date, or was a particular rule applied? So I can better understand the process, what would be the reasons for not choosing 27 Nov?<br />How much difference does it make? <br /><br />Secondly, why is CarryOffset 1 and not -1 in the config for Gold? Your roll calendar file means that we're not in the nearest contract. I don't know if your Roll Calendar has been generated using the config, but the carry contract is the same as the next contract, when it seems it could be the nearest contract. Or have I not understood how Carry works correctly?dr1verhttps://www.blogger.com/profile/07207779413866318164noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-17005810579742578602021-09-06T11:55:49.433+01:002021-09-06T11:55:49.433+01:00Hi. This is why I just use risk normalised costs, ...Hi. This is why I just use risk normalised costs, it's much simpler. If you use percentage costs, then it probably makes sense to use the current bid/ask, divided by the current futures price, and assume that percentage is constant in the past. Because adjusted prices can go negative, you'll end up with weird results in the past.Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-72486280002141128852021-09-05T19:58:02.612+01:002021-09-05T19:58:02.612+01:00Hey Rob, I have a question that is doing my head i...Hey Rob, I have a question that is doing my head in. I have chosen to back adjust futures using the ratio method, as opposed to the difference/panama method. Then, for a large enough notional, I can calculate my P&L by using percentage differences (which is important for other purposes in my backtesting framework). One issue I have is in calculating the costs. If I am using the percentage method to back-adjust, do I need to back-adjust the costs? In my case, costs are expressed in percentage terms as: (half-bid-ask / contract size). (I am marking to mid so use half of bid-ask as the spread). In this formula, should the half-bid-ask be back-adjusted? Should the contract size be back-adjusted?Systematic_Macrohttps://www.blogger.com/profile/01048437470960984388noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-94670318518033512021-08-31T13:56:42.501+01:002021-08-31T13:56:42.501+01:00Fixed, thank youFixed, thank youRob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-5235535763346279142021-08-30T08:53:51.803+01:002021-08-30T08:53:51.803+01:00Broken link: "This biases the trajectory of t...Broken link: "This biases the trajectory of the price series (more here)."<br />Current link: http://www.seykota.com/tribe/tsp/Continuous/index.htm<br />Link should be: https://www.seykota.com/tribe/TSP/Continuous/index.htm<br />(i.e it seems to be case sensitive)<br />dr1verhttps://www.blogger.com/profile/07207779413866318164noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-16152035385074497412021-08-07T07:02:07.533+01:002021-08-07T07:02:07.533+01:00If you're trading 9 times a year, then a 4 day...If you're trading 9 times a year, then a 4 day delay shouldn't damage your expected returns too much. Of course it's possible to calculate the effect by adding a 4 day delay to your backtest and seeing what happens.<br /><br />Having said all I don't understand why the settlement period is an issue, since you can normally trade with uncleared funds on most platforms.Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-41747409741566812812021-07-27T09:30:43.078+01:002021-07-27T09:30:43.078+01:00Hi Rob, I hope you’re well.
I’d like to ask you a...Hi Rob, I hope you’re well.<br /><br />I’d like to ask you a question. I have designed a trading system which uses a risk on/ risk off indicator to decide when it needs to be in the risky asset or risk free asset. <br />However, there are many round trips per year - circa 9-10 - even after applying a moving average to slow it down. I now have a dilemma: which instrument to use to implement, ETFs or Index Funds. The problem I have with ETFs is the bid ask spread: when I factor in 10 bps, most of the returns are eaten away by that. However, if I were to use index funds, I would not have this issue BUT because their settlement period Is T+4, I might not be able to trade sometimes as quickly as instructed by the system - this still remains a “market timing” process. <br /><br />May I kindly ask what your thoughts or suggestions are? <br /><br />Thanks so much,<br />RicUnknownhttps://www.blogger.com/profile/05821050393149046409noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-19683929709221803462021-04-08T09:37:11.189+01:002021-04-08T09:37:11.189+01:00Vol calculation is covered by one of the existing ...Vol calculation is covered by one of the existing sheets here https://www.systematicmoney.org/systematic-trading-resources<br /><br />https://docs.google.com/spreadsheets/d/1NJw1cnnsVCG6QxXutylmUJ-0naV8QZHonZZ6rCtTRo8/edit?usp=sharingRob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-4147124321191635052021-04-07T22:56:16.244+01:002021-04-07T22:56:16.244+01:00Hi Robert - maybe I am asking too much but I’ll tr...Hi Robert - maybe I am asking too much but I’ll try. Would you be able to upload an excel sheet on “systematic trading” webpage and show how all the adjustments are made and how to calculate the daily price vol with stitched price series, as you describe here? Thanks!Unknownhttps://www.blogger.com/profile/05821050393149046409noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-28904572746338102182021-01-14T12:40:45.953+00:002021-01-14T12:40:45.953+00:00Thank you again! I am making advancement slowly. ...Thank you again! I am making advancement slowly. One step at a time but steadily. Probably it will take years to reach to the point where I want to reach technically, but that is also fine. I owe you a lot.tokeihttps://www.blogger.com/profile/08138492337240890193noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-77117413269633947712021-01-14T09:09:00.870+00:002021-01-14T09:09:00.870+00:00The 90 day was just there to keep the article simp...The 90 day was just there to keep the article simple. In my own system I have always used a mixture of smooths.Rob Carverhttps://www.blogger.com/profile/10175885372013572770noreply@blogger.comtag:blogger.com,1999:blog-261139923818144971.post-10441332416009720772021-01-14T09:02:21.502+00:002021-01-14T09:02:21.502+00:00Now I implemented the 4 different timeframe for ca...Now I implemented the 4 different timeframe for carry smoothing thanks to your advice. 10, 30, 60, and 125 days (got those numbers from your post on EliteTrader forum). I treat them as 4 variations of carry rule and give 0.125 weight each (total 0.5).<br /><br />However I noticed that you wrote that you use fixed 90 days for carry smoothing in this post (https://qoppac.blogspot.com/2017/06/some-more-trading-rules.html), and hence a bit confused.<br /><br />Does this simply mean that your methodology has improved over time, and the 90 days one is old dated, or am I missing something? Thank you in advance!tokeihttps://www.blogger.com/profile/08138492337240890193noreply@blogger.com