Market timing 2-year treasuries using Martingale-style bets

Discuss all general (i.e. non-personal) investing questions and issues, investing news, and theory.
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

lee1026 wrote:For things that are as far out as 2 weeks, how you model the roll will start becoming extremely important.

As an aside, if you think this will work, the correct answer isn't to try to lower your "cost basis" but to simply make money buying the dips and then selling a few ticks over.
I definitely want the discussion to go from bond/bond funds to futures so we can talk about implied financing, rolls, etc. Though, I believe that we are still working on defining some of the basics and identifying risks.

If I change the way I measure success to be 1 tick above average, I get essentially the same results for 2006: (5 total contracts HMUZ 2006, H 2007)
1-day: 98.7% (307/311) <- only value that changed
3-day: 99.4% (309/311)
2-weeks: 99.4% (309/311)
4-weeks: 99.7% (310/311)
6-weeks: 99.7% (310/311)
8-weeks: 99.7% (310/311)

I have no objections to squeezing an extra tick or two from the dips, but the major aspect of this strategy is that it reduces (eliminates?) the long-term left-tail risk of my short-term treasury position. That is huge for my leveraged portfolio. It changes "bond Armageddon" years like 1994 into a flat line.

I just re-calculated 2013 with the new model, and I get the following success rates: (HMUZ 2013)
1-day: 98.8% (248/251)
3-day: 100% (251/251)

And 2013 with +1 tick profit:
1-day: 97.2% (244/251)
3-day: 98.4% (247/251)
2-weeks: 100% (251/251)
Spec7re
Posts: 44
Joined: Tue May 06, 2014 2:56 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Spec7re »

I'm not really sure how the behavior of bonds make this different than Martingaling any other asset.

How would this help you in 1994. Is seem like treasuries would drop, then you would double down, then treasuries would drop more, an so on until finally, you have so many futures, the next drop cashes you out.
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

ogd wrote:
Rob Bertram wrote: 1.Treasury futures are fairly priced to accurately represent the underlying treasury notes. For example, there is no credit risk. Term risk is the primary one. So we have: futures contract price = spot price - (pro-rata) dividend yield + cost of financing
2. When yields increase, treasury futures have a similar point of indifference if held (and rolled) to duration.
Rob: is it a big leap of faith, then, to say that #2 too is priced in #1? I mean, everybody knows that bonds recover, it's not some new discovery or (more to the point of the last thread) something unique to your portfolio that the market can't possibly price in, like the exact level of equities.
I don't think it is possible to have a recovery premium in the price with an efficient market. That is only relevant to a buy-and-hold investor. There are plenty of speculators willing to arbitrage that away.
ogd wrote:So knowing that bonds recover, the market chooses to pay you X% more than the zero rate. This should tell you something about the risk involved. Then you lose Y% of that as borrowing costs. This seems like a losing proposition to me.
As Market Timer pointed out, the borrowing costs often exceed the 2-year treasury yield, and 2006 is an example of that. Buy and hold is not a viable long-term (30+ year) strategy for 2-year treasury futures. This Martingale strategy potentially makes it viable.
ogd wrote:
Rob Bertram wrote:***If we use VGSH as an ETF proxy of a 2-year treasury, the average daily spread between high and low is $0.07 (Yahoo! Finance) with a share price of $61.20 or $0.07/61.2 = 0.11% of NAV. But wait! I just increased my position to 3x, so that is really 0.33% of my original. I am happy to take my gain as capital gains instead of dividend. I don't need the ETF to settle at the target price, I only need my limit order to execute.
One more generic remark -- you can't really count on limit orders to do anything positive for you -- can't use them to recover daily losses, can't use them to lower persistent spreads. You only use them to avoid negatives, like buying at a particular bad market configuration. The devil is in the details of "I only need my order to execute" -- when it doesn't it takes away your reward from the other scenarios, in spades. You should generally book exactly zero positive effects from limit orders.
I think I understand what you're saying. At first I thought you were saying that limit orders don't work. (That would make Livesoft's head explode if he heard that.) Instead, I believe you're saying "don't count your chickens before they've hatched." Just because I set a limit order does not mean that the market will move in that direction. Analysis of past market movement doesn't mean that it will move the same in the future.
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

Spec7re wrote:I'm not really sure how the behavior of bonds make this different than Martingaling any other asset.

How would this help you in 1994. Is seem like treasuries would drop, then you would double down, then treasuries would drop more, an so on until finally, you have so many futures, the next drop cashes you out.
When yields increase, the value of the bond/fund decreases. Holding the bonds to duration will get you to a point of indifference where that NAV loss is offset by higher yield and dividend reinvestment in new bonds with the higher yield. My argument is that doubling down (technically tippling down) will (eventually) pay off. Shrink that rate increase down to a day. The loss in price is relatively small for 2-year treasuries. It can often be recovered by an intra-day spread.

So say I have N contracts of 2-year treasures and the price drops (yield increases). I buy 2N more contracts at the lower price. I set a limit order to sell 2N contracts at the average price. After the limit order executes, I am effectively left with N contracts purchased at the lower price. I call this "resetting my basis."

So I downloaded 2-year treasury futures data and looked at some years where bonds had a rough time. I picked 2006 because the cost of financing was higher than the 2-year yield. I picked 2013 because yields were extremely low (0.2%) and increased to 0.5%. I then counted how long it would take for my triple-down Martingale bet to win. I just finished manually rolling the futures contracts for 1994. Here are the results:
1-day: 96.5% (303/314)
3-day: 98.4% (309/314)
2-weeks: 99.4% (312/314)
4-weeks: 99.4% (312/314)
6-weeks: 99.4% (312/314)
8-weeks: 99.7% (313/314)

Image
Spec7re
Posts: 44
Joined: Tue May 06, 2014 2:56 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Spec7re »

In your examples, how are you choosing when to triple down? Are you waiting for a centain drop amount? Also, when you say sell at the average price, what do you mean? The price between where you bought the original contract and the price you doubled down at?

I find it hard to believe that in 1994 you don't get caught in a situation where you triple down and the price keeps dropping. The rates rises constantly throughout the year, how does the price ever return to the average.
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

One thing we haven't discussed yet is concurrent bets. For example, yields increase for two days in a row. On the first day, I start at 1x and then buy 2x more as my bet. On day 2, my 3x position from the first day is still open, so I increase my position to 9x. At the end of day 2, I have two limit orders open. One for 2x from day 1, the other for 6x from day 2. If the 6x limit order executes, that reduces the basis of the 3x position. With the lower basis, it also lowers the amount I need on the limit order.

And the limit price on an open bet will be reduced by multiple sequential winning bets. I can calculate this by hand, but I'll try to find a way to build it into the model. Looking at 1994 data, the one "failed" bet would have been executed on day 3 as the concurrent bet lowered the limit order price to a value that would have executed on days 3 and 4.
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

Spec7re wrote:In your examples, how are you choosing when to triple down? Are you waiting for a certain drop amount? Also, when you say sell at the average price, what do you mean? The price between where you bought the original contract and the price you doubled down at?

I find it hard to believe that in 1994 you don't get caught in a situation where you triple down and the price keeps dropping. The rates rises constantly throughout the year, how does the price ever return to the average.
As far as when to make a bet, whenever the price is lower than the price that I paid. We haven't really discussed strategies on picking up shares at the daily low.

Here is an example I gave earlier in the thread. I picked numbers that were easy to use. They are not actual transactions that happened:
Say that I have 5 2-year treasury contracts purchased at $110.00. The price drops to $109.50. I buy 10 more contracts at $109.5 and then set a limit order to sell 10 at the price of (110 + 109.5)/2 = 109.75. When the limit order executes, I will effectively have a position of 5 contracts that were purchased at $109.5.
I encourage you (and everyone) to independently verify my math and analysis. I got my futures data from Quandl which I believe got the data from CME. I do my models in Excel, and I'd be happy to walk you through it. The formulas are fairly simple.

And for the record, there are multiple days in a row where prices drop. The bets are still winning 97% of the time on the first day. And there can be what I call concurrent bets where I triple down on an existing bet effectively going 9x.
fidelio
Posts: 217
Joined: Sun May 04, 2008 5:28 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by fidelio »

hhmmm .... i have an old friend who is a vascular surgeon. about 15-20 yrs. ago, he got involved in day trading. he was pretty sick of amputating feet and explained to me his reasoning as to how he couldn't lose as he had a t-1 line to some orange co. brokerage, etc., always made dollars on the upswing or something. i sort of half understood how he was doing this. a few months later his wife advised that he was back to cutting and sewing as he lost $30-40k one day (trading). oh well. meanwhile, i kept packing it in to my 401k, w/ no real investment wisdom beyond jack bogle's annoying one-liners .... happily retired now, making more money than i ever did working.
User avatar
Maynard F. Speer
Posts: 2139
Joined: Wed Mar 18, 2015 10:31 am

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Maynard F. Speer »

There's an interesting article here about Long Term Capital Management (a hedge fund that spectacularly crashed) and the Martingale

http://harvardmagazine.com/2001/01/risk ... eward.html

I think there'll be lessons to learn from that ... LTCM seemed to have invented something very similar - a system that seemed too good to be true, but actually just pushed all the risk further down the tail

The example of where the Martingale goes wrong: you bet $1, you lose; double up to $2; etc. It seems foolproof - how surprising then it only takes being wrong 26 times (not a statistical impossibility) for the stake to have risen to $67 million ... For a $1 profit

You need these odds: what's the highest bet I can cover, and what's the probability I'll hit a chain of events that pushes me past it ... It's clear the brain isn't good at conceptualising this kind of risk
"Economics is a method rather than a doctrine, an apparatus of the mind, a technique of thinking, which helps its possessor to draw correct conclusions." - John Maynard Keynes
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

Maynard F. Speer wrote:There's an interesting article here about Long Term Capital Management (a hedge fund that spectacularly crashed) and the Martingale
Thank you for that article. It was a great read. You aren't the first person to suggest learning the history and mistakes of LTCM. I have been meaning to read "When Genius Failed" when I have a chance. It sounds like I should make some time.
Maynard F. Speer wrote:I think there'll be lessons to learn from that ... LTCM seemed to have invented something very similar - a system that seemed too good to be true, but actually just pushed all the risk further down the tail

You need these odds: what's the highest bet I can cover, and what's the probability I'll hit a chain of events that pushes me past it ... It's clear the brain isn't good at conceptualising this kind of risk
I completely agree that there are strong similarities between my strategy and that used by LTCM. And I should take a serious look to see that I am not repeating their same mistakes.

As you say, I need to set a limit so that I can cover any bet and loss. And I completely agree that there is significant risk involved with a strategy like this. The gains must come from somewhere. I still have a lot of historical data to run through the model. Maybe something that will help everyone discuss this strategy in better detail is to publish my spreadsheets. Google docs is a little more cumbersome to use, but I'm okay with the extra effort.

Looking at the data for 1994 and 2006, the maximum bet concurrency is 2. That is, there are times when a bet is still open, and the strategy has me bet again. That does not necessarily mean that the original bet closes in two days. The original might stay open for a few days while different bets execute.
User avatar
HomerJ
Posts: 15185
Joined: Fri Jun 06, 2008 12:50 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by HomerJ »

So what happened to your original plan of using leverage with a balanced portfolio?

Already bored with it?
Northern Flicker
Posts: 6511
Joined: Fri Apr 10, 2015 12:29 am

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Northern Flicker »

When you add leverage to a Martingale, you increase your return when a win event occurs, but shorten the expected time to ruin.

I would start by analyzing the trading strategy without leverage, such as looking at what happens if the 2-yr yield spikes 50 basis points and then resumes its cyclic behavior without hitting your sell point, then does another spike, etc. If you can convince yourself that you do indeed risk 100% loss, perhaps the analysis of the leverage part will become less important.

-jalbert
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

HomerJ wrote:So what happened to your original plan of using leverage with a balanced portfolio?

Already bored with it?
I am extremely happy with the leveraged balanced portfolio. And boring is often good for investing.

This idea/strategy occurred while I was looking at 2-year treasury futures and their risk profile. One of the open questions from the leverage thread is what happens when the cost of financing exceeds the 2-year yield. It does not make sense to use 2-year treasury futures in the leveraged portfolio as the expected return would be negative. So I was looking at years where that would happen and noticed a pattern.
User avatar
jadd806
Posts: 267
Joined: Mon Aug 17, 2015 4:34 pm
Location: New England

Re: Market timing 2-year treasuries using Martingale-style bets

Post by jadd806 »

Rob Bertram wrote:
HomerJ wrote:So what happened to your original plan of using leverage with a balanced portfolio?

Already bored with it?
I am extremely happy with the leveraged balanced portfolio. And boring is often good for investing.

This idea/strategy occurred while I was looking at 2-year treasury futures and their risk profile. One of the open questions from the leverage thread is what happens when the cost of financing exceeds the 2-year yield. It does not make sense to use 2-year treasury futures in the leveraged portfolio as the expected return would be negative. So I was looking at years where that would happen and noticed a pattern.
What kind of leverage are you using? I don't see much harm in 1.1x or such and have done research on it in the past, but at this point in my investing career my contributions are so quickly outpacing my capital gains that it doesn't quite matter much yet.
Spec7re
Posts: 44
Joined: Tue May 06, 2014 2:56 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Spec7re »

If you don't have a strategy you are using to choose when to triple down, I don't really understand how you are backtesting.
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

jadd806 wrote:What kind of leverage are you using? I don't see much harm in 1.1x or such and have done research on it in the past, but at this point in my investing career my contributions are so quickly outpacing my capital gains that it doesn't quite matter much yet.
Here's a link to the thread on my leverage strategy: viewtopic.php?f=10&t=143037

My leveraged portfolio is 10% stocks / 5% long-term (20+ year) treasuries / 85% short-term (2-year) treasuries. My target leverage ratio is 26x. I deposit $3k/month from my paycheck into the portfolio. If the market goes up and lowers my leverage, I buy more assets. If the market goes down, I let my leverage rise. I only allow myself to sell in order to rebalance. There is a lot more info and a great discussion in the thread I linked.
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

Spec7re wrote:If you don't have a strategy you are using to choose when to triple down, I don't really understand how you are backtesting.
If the day's low is below the price I paid, then triple down.
long_gamma
Posts: 420
Joined: Mon Sep 14, 2015 4:13 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by long_gamma »

Rob Bertram wrote:
Spec7re wrote:If you don't have a strategy you are using to choose when to triple down, I don't really understand how you are backtesting.
If the day's low is below the price I paid, then triple down.
You can not low tick every trade. So basically it means, you will triple down every trade.
Can you tell us, where would you bought the initial trade and the next triple down trade in last three days?

http://www.barchart.com/chart.php?sym=Z ... &template=

Image
"Everyone has a plan 'till they get punched in the mouth." --Mike Tyson
lee1026
Posts: 395
Joined: Sat Jun 21, 2014 7:47 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by lee1026 »

Now that I have had more time to think it though why my knee jerk reaction is that this won't work, let me explain in proper detail.

For something as short as the 2 year treasury, you can model out the "correct" interest rate on the 2 year by computing a set of probabilities on whether the Fed is going to raise interest rates at the each meeting. If there is no term premium, then interest on the 2 year is going to go up and up as time wears on, simply because with each passing day, we are getting closer to a Fed meeting day where they might raise rates. The same effect happens in reverse when the yield curve is inverted, because each day will bring you closer to a Fed meeting day where they might lower rates.

So now, it becomes crucial what you consider "moving sideways". If the market estimations of future Fed rate hikes don't change in your favor, there will be no recovery; the basic bond math will fail to work for you simply because the interest rates will be moving (slightly) against you each day, cancelling out the interest payments.
Park
Posts: 718
Joined: Sat Nov 06, 2010 4:56 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Park »

Rob, market timing or security selection are zero sum games; the expected return is zero, and that's before costs. It's possible to win a zero sum game, but you have to have an "edge".

In some markets, an individual investor may have an "edge" due to their size; microcap stocks would be an example. But the Treasury bond market probably has greater liquidity and depth than any other bond market in the world. For an individual investor, this may be the most difficult bond market in the world to have an "edge" over institutional investors.

Rob, what is your "edge" in the Treasury bond market?
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

long_gamma wrote:
Rob Bertram wrote:
Spec7re wrote:If you don't have a strategy you are using to choose when to triple down, I don't really understand how you are backtesting.
If the day's low is below the price I paid, then triple down.
You can not low tick every trade. So basically it means, you will triple down every trade.
Can you tell us, where would you bought the initial trade and the next triple down trade in last three days?

http://www.barchart.com/chart.php?sym=Z ... &template=

Image
I am glad to hear that the discussion is moving to the execution of this strategy. Does that mean that people are okay with the technical foundation of the strategy? Are there open or unanswered questions that people feel need to be addressed?

So the market closed on October 28th with a low of 109'120. Per the comment from Market Timer, I would place a limit order for a tick higher, so 109'122. I believe the market closed October 29th with a low of 109'110, thus a limit order for 109'112.
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

Park wrote:Rob, market timing or security selection are zero sum games; the expected return is zero, and that's before costs. It's possible to win a zero sum game, but you have to have an "edge".

In some markets, an individual investor may have an "edge" due to their size; microcap stocks would be an example. But the Treasury bond market probably has greater liquidity and depth than any other bond market in the world. For an individual investor, this may be the most difficult bond market in the world to have an "edge" over institutional investors.

Rob, what is your "edge" in the Treasury bond market?
I wouldn't call it an edge, but treasuries have effectively no credit risk. So I lock in a slightly higher yield when I place a bet. I then wait for accrued dividends and volatility to slightly bring the price back up. And the goal isn't to make a fortune, it is to gain a few cents. It's not free money; I am significantly increasing my position which has risk.
long_gamma
Posts: 420
Joined: Mon Sep 14, 2015 4:13 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by long_gamma »

Assuming you placed an order for 109'122 on Oct 29th, it would have been executed early morning of 29th. What price you would have placed the double down order? also was it going to be on the same day or the next day?

Couple of more questions on your back test. Did you test your strategy using daily prices or tick data? Did you use RTH data or Globex data?

I am asking these because intraday round trip executions can not be backtested using daily prices. One cannot to be sure which came first, entry price or exit price.
"Everyone has a plan 'till they get punched in the mouth." --Mike Tyson
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

long_gamma wrote:Assuming you placed an order for 109'122 on Oct 29th, it would have been executed early morning of 29th. What price you would have placed the double down order? also was it going to be on the same day or the next day?
So let's say I originally paid 109'15 for my position. I place my first buy limit order for 109'122. When it executes, I create a sell order for the average of the two which is 109'137. (Technically, the average price is 13.625, but I have to round up to the nearest tick 13.75.) I was watching this last night, and I believe that both of these trades would have executed. I don't have tick data in front of me (and I'm out of town with horribly slow wifi at the hotel which makes doing anything on the internet painful).

So after the close on the 29th, I will place a buy order for 109'112, and a sell order for 109'117. I can say for sure that both these trade would have executed as the market opened at 109'112 and has been sitting at 109'122 for a while.
long_gamma wrote:Couple of more questions on your back test. Did you test your strategy using daily prices or tick data? Did you use RTH data or Globex data?
Daily Globex data.
long_gamma wrote:I am asking these because intraday round trip executions can not be backtested using daily prices. One cannot to be sure which came first, entry price or exit price.
Yep. In my model, I compare today's low with tomorrow's high. It could execute same day, but as you point out I don't know if the low or high happened first.

I want to emphasize that this is not a refined strategy. It is the first thing that came to mind, and I wanted to get input from some of the best financial minds that I know. I have made multiple adjustments based on feedback already, and I am happy to discuss and refine more.
Park
Posts: 718
Joined: Sat Nov 06, 2010 4:56 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Park »

Rob Bertram wrote:I am glad to hear that the discussion is moving to the execution of this strategy. Does that mean that people are okay with the technical foundation of the strategy? Are there open or unanswered questions that people feel need to be addressed?
You've decided to become a Treasury bond trader. You'll be competing against teams of fulltime traders who've been doing this for many years.

To make an analogy to the stock market, it's like you've decided to trade Apple, the largest corporation in America. The link below gives the recommendation of 65 different stock analysts covering Apple.

http://aaplinvestors.net/stats/ratings/

If you want to become a fixed income trader, why not chose a market where you'll have more of an edge? For example, individual traders play a significant role in the preferred share market in my country; that market is too small and illiquid for many institutional traders.
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

Park wrote:
Rob Bertram wrote:I am glad to hear that the discussion is moving to the execution of this strategy. Does that mean that people are okay with the technical foundation of the strategy? Are there open or unanswered questions that people feel need to be addressed?
You've decided to become a Treasury bond trader. You'll be competing against teams of fulltime traders who've been doing this for many years.
I might be missing something. I believe I accepted that fact when I added bonds to a balanced (buy, hold, rebalance) portfolio.
Park wrote:If you want to become a fixed income trader, why not chose a market where you'll have more of an edge? For example, individual traders play a significant role in the preferred share market in my country; that market is too small and illiquid for many institutional traders.
I need the market to be efficient. The price of the security needs to reflect the spot price and accrued dividend accurately, or my strategy doesn't work.
Park
Posts: 718
Joined: Sat Nov 06, 2010 4:56 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Park »

Rob Bertram wrote:
Park wrote:
Rob Bertram wrote:I am glad to hear that the discussion is moving to the execution of this strategy. Does that mean that people are okay with the technical foundation of the strategy? Are there open or unanswered questions that people feel need to be addressed?
You've decided to become a Treasury bond trader. You'll be competing against teams of fulltime traders who've been doing this for many years.
I might be missing something. I believe I accepted that fact when I added bonds to a balanced (buy, hold, rebalance) portfolio.
Buy, hold and rebalance is behavior associated with investing. One can make a case that rebalancing is market timing, but most would consider it investing.

What you're describing in this thread is trading.
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

I guess that I am still not following. I completely agree that I am discussing a form of market timing. It is in the thread title. And I agree that rebalancing is a form of market timing. And they behave in a similar way-- when one asset drops, buy more, then sell when it grows above a certain level. If we agree that rebalancing has a role in investing despite it being a form of market timing, I'm not sure why you want to immediately disqualify this strategy because it is a form of market timing.

I'm not trying to be difficult, but I want to understand your reasoning. If there is a flaw in my reasoning or model, I definitely want to address it.
User avatar
jadd806
Posts: 267
Joined: Mon Aug 17, 2015 4:34 pm
Location: New England

Re: Market timing 2-year treasuries using Martingale-style bets

Post by jadd806 »

Rob Bertram wrote:I guess that I am still not following. I completely agree that I am discussing a form of market timing. It is in the thread title. And I agree that rebalancing is a form of market timing. And they behave in a similar way-- when one asset drops, buy more, then sell when it grows above a certain level. If we agree that rebalancing has a role in investing despite it being a form of market timing, I'm not sure why you want to immediately disqualify this strategy because it is a form of market timing.

I'm not trying to be difficult, but I want to understand your reasoning. If there is a flaw in my reasoning or model, I definitely want to address it.
Now that I've had more time to look into this, what you are doing is essentially momentum trading. Entering on a pullback (i.e. a value point) and counting on the prevailing momentum or trend to carry your trade into profitability. You are golden until the trend changes. I first discovered this methodology when I dabbled with trading the Forex market. I did see a net profit from my efforts, however I felt that it was really an uncompensated risk. Over hundreds of trades and a large time investment, I pretty much managed to match the total returns of the S&P 500 with a massive amount of added risk. I think my Sharpe ratio was like 0.1 or something.

To accelerate my testing, I used a trading simulator which allowed me to trade using historical data just like if I was trading in real time. You may find such a tool useful for testing this strategy of yours.

What are your costs to hold the futures contracts - will the price of trading on margin kill you over time? I am not very familiar with how futures work.
lee1026
Posts: 395
Joined: Sat Jun 21, 2014 7:47 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by lee1026 »

He isn't so much momentum trading so much as he is swing trading. Buying the dips and selling the highs.
long_gamma
Posts: 420
Joined: Mon Sep 14, 2015 4:13 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by long_gamma »

Rob Bertram wrote:
long_gamma wrote:Couple of more questions on your back test. Did you test your strategy using daily prices or tick data? Did you use RTH data or Globex data?
Daily Globex data.
It is better to test with RTH data atleast for the entry order, unless you are planning to open the entry order before globex opens. As you probably aware, these futures can have big overnight range based on international reports.
Rob Bertram wrote:
long_gamma wrote:I am asking these because intraday round trip executions can not be backtested using daily prices. One cannot to be sure which came first, entry price or exit price.
Yep. In my model, I compare today's low with tomorrow's high. It could execute same day, but as you point out I don't know if the low or high happened first.
I would be skeptical of same day trade results, if you are using daily data. Stat's still look good for 2nd day and beyond.

Other comment, I forgot to make earlier was using continuous future data. It is better to splice the data based on the rolls you are typical going to make. I think Quandl defaults to end of the contract to start of the new contract. I presume, you roll one to two weeks early.
"Everyone has a plan 'till they get punched in the mouth." --Mike Tyson
long_gamma
Posts: 420
Joined: Mon Sep 14, 2015 4:13 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by long_gamma »

jadd806 wrote: Now that I've had more time to look into this, what you are doing is essentially momentum trading. Entering on a pullback (i.e. a value point) and counting on the prevailing momentum or trend to carry your trade into profitability.
He is basically doing opposite of momentum trading. Momentum trading is buy the high and sell the low.
"Everyone has a plan 'till they get punched in the mouth." --Mike Tyson
long_gamma
Posts: 420
Joined: Mon Sep 14, 2015 4:13 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by long_gamma »

Rob Bertram wrote:
long_gamma wrote:Assuming you placed an order for 109'122 on Oct 29th, it would have been executed early morning of 29th. What price you would have placed the double down order? also was it going to be on the same day or the next day?
So let's say I originally paid 109'15 for my position. I place my first buy limit order for 109'122. When it executes, I create a sell order for the average of the two which is 109'137. (Technically, the average price is 13.625, but I have to round up to the nearest tick 13.75.) I was watching this last night, and I believe that both of these trades would have executed. I don't have tick data in front of me (and I'm out of town with horribly slow wifi at the hotel which makes doing anything on the internet painful).

So after the close on the 29th, I will place a buy order for 109'112, and a sell order for 109'117. I can say for sure that both these trade would have executed as the market opened at 109'112 and has been sitting at 109'122 for a while.
How long is your iterative process? Are you planning to buy at the lowest tick of the entire series?
"Everyone has a plan 'till they get punched in the mouth." --Mike Tyson
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

long_gamma wrote:
Rob Bertram wrote:
long_gamma wrote:I am asking these because intraday round trip executions can not be backtested using daily prices. One cannot to be sure which came first, entry price or exit price.
Yep. In my model, I compare today's low with tomorrow's high. It could execute same day, but as you point out I don't know if the low or high happened first.
I would be skeptical of same day trade results, if you are using daily data. Stat's still look good for 2nd day and beyond.

Other comment, I forgot to make earlier was using continuous future data. It is better to splice the data based on the rolls you are typical going to make. I think Quandl defaults to end of the contract to start of the new contract. I presume, you roll one to two weeks early.
Correct on both counts. I download the individual contract data and manually roll them. Interactive Brokers will close me out of a bond futures contract the month before the contract date. For example, I'm rolling a September contract in August. (I believe I can hold a short position longer, but shorting is not part of my strategy.) I look at trading volume to determine which day of the week to roll.
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

long_gamma wrote:
Rob Bertram wrote:
long_gamma wrote:Assuming you placed an order for 109'122 on Oct 29th, it would have been executed early morning of 29th. What price you would have placed the double down order? also was it going to be on the same day or the next day?
So let's say I originally paid 109'15 for my position. I place my first buy limit order for 109'122. When it executes, I create a sell order for the average of the two which is 109'137. (Technically, the average price is 13.625, but I have to round up to the nearest tick 13.75.) I was watching this last night, and I believe that both of these trades would have executed. I don't have tick data in front of me (and I'm out of town with horribly slow wifi at the hotel which makes doing anything on the internet painful).

So after the close on the 29th, I will place a buy order for 109'112, and a sell order for 109'117. I can say for sure that both these trade would have executed as the market opened at 109'112 and has been sitting at 109'122 for a while.
How long is your iterative process? Are you planning to buy at the lowest tick of the entire series?
So I only place one buy a day, and it is based on the low of the prior day. When that trade executes, I set my sell limit order. It might execute same day, but I can't be sure looking at daily data. So my model looks at the next day's high. In example I was giving, I was looking at real-time data, so I was certain that it did execute same day.

And my strategy is based on the price that I paid to enter that position which I call my basis. When this strategy is successful, it lowers that basis. So day to day, it is iterative.

Most of the time, bond futures contract prices are slowly trending up, so I am not getting a buy signal. And the longer I hold my position, the more significant the drop necessary to trigger an action, and the less recovery is necessary.
long_gamma
Posts: 420
Joined: Mon Sep 14, 2015 4:13 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by long_gamma »

Rob Thx.

I will follow along your thread. 26x is little bit too much leverage for my taste. If i were to setup similar portfolio, I would rather use options.
"Everyone has a plan 'till they get punched in the mouth." --Mike Tyson
long_gamma
Posts: 420
Joined: Mon Sep 14, 2015 4:13 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by long_gamma »

Rob Bertram wrote: When yields increase, the value of the bond/fund decreases. Holding the bonds to duration will get you to a point of indifference where that NAV loss is offset by higher yield and dividend reinvestment in new bonds with the higher yield. My argument is that doubling down (technically tippling down) will (eventually) pay off. Shrink that rate increase down to a day. The loss in price is relatively small for 2-year treasuries. It can often be recovered by an intra-day spread.

So say I have N contracts of 2-year treasures and the price drops (yield increases). I buy 2N more contracts at the lower price. I set a limit order to sell 2N contracts at the average price. After the limit order executes, I am effectively left with N contracts purchased at the lower price. I call this "resetting my basis."

Rob Bertram wrote:One thing we haven't discussed yet is concurrent bets. For example, yields increase for two days in a row. On the first day, I start at 1x and then buy 2x more as my bet. On day 2, my 3x position from the first day is still open, so I increase my position to 9x. At the end of day 2, I have two limit orders open. One for 2x from day 1, the other for 6x from day 2. If the 6x limit order executes, that reduces the basis of the 3x position. With the lower basis, it also lowers the amount I need on the limit order.


Did you go live with this strategy?

2 year yield shot up continuously recently. If you martingaled, you must be sitting on a big loss.

Image
"Everyone has a plan 'till they get punched in the mouth." --Mike Tyson
Topic Author
Rob Bertram
Posts: 824
Joined: Mon May 05, 2014 12:15 pm

Re: Market timing 2-year treasuries using Martingale-style bets

Post by Rob Bertram »

I did not. Though, the market-timing part of me is wishing that I tried it.

The data I used included 24-hour trading. I would need to automate my trades or find a way to set contingent orders so that when my buy order is executed a sell order is created.

I have only been passively paying attention to the markets over the past couple weeks. Family and holidays are much more interesting. Though, it would be a good "out of sample" exercise to try the model and see how it would have done since I started this discussion in October.
Post Reply