The sweet taste of… failure?

I’m always doing research. Sometimes these are large, multi-month projects, but other times they are just a quick look to see “what the data says”, and I share some of those results with you here. However, most research does not yield results–when we dig for treasure, we usually find rocks. That is part of the process; painful? Sometimes. Frustrating? Depends on your perspective, I suppose, but sometimes what we don’t find is as valuable as what we do find. I thought I would share the results and thought process behind a question that I asked the market this afternoon.

The question

Yesterday’s close in the EURUSD was extreme, by historical standards. I know that very large moves in markets are indicative of imbalances, and I know that trading edges sometimes come around these extremes. I have to ask a two part question:

  • How extreme was the close in the EURUSD?
  • If it was extreme (I think it is, but was it really?), then what usually happens following an extreme move in the euro?

The procedure and first level data analysis

So, I first grabbed all the daily closing prices for the EURUSD. Since this thing hasn’t been trading that long, I just got all the data. I also calculated our SigmaSpike measure, which expresses each day’s return as a standard deviation of the previous 20 trading days’ returns. I see that the EURUSD closed down -1.577%, which is -6.9 sigma. That seems extreme, but let’s take a look at the data:

Summary stats for EURUSD daily data, SigmaSpikes and raw returns.
Summary stats for EURUSD daily data, SigmaSpikes and raw returns.

If you aren’t used to reading those outputs, just look at the smallest box (highlighted in red above) which lists the 4 smallest observations in the dataset. This is the largest SigmaSpike selloff in the history of the EURUSD, so that is something. However, this is a derived measure; I have imposed some structure on the market data by choosing period of lookback, etc, so it also makes sense to look at raw returns. In this case, yesterday’s close does not appear to be so extreme. In fact, it isn’t even in the 1st percentile. So, I probably need to proceed looking at both raw returns and SigmaSpikes for this project.

Since I have a reasonably extreme close, the next question I want to ask is “what usually happens after extreme closes?” Now, we need to refine that question a bit, so I took each trading day, and calculated, for each day, the return 5 days, 20 days, 60 days, 120 days, and 252 trading days after that day. (These correspond, more or less, to weekly, monthly, quarterly, half year, and one year returns.) Yes, there are other ways, but I just want to do a quick back of the envelope calculation here.

I have another small problem: if I want to look at what happens a year after an event, data from less than a year ago will not allow me to do that. I can deal with that several ways, but, in this case, I just drop recent data where the yearly return is an “error” value. (I also lost the first 21 trading days of the EURUSD history because I needed those to calculate the first SigmaSpike.) I should double check the stats to make sure that trimming this data does not materially change the data. (It doesn’t.)

All days

eur2
Summary stats for all trading days (returns 5, 20, 60, 125, and 252 days after)

So this is a good time for a sanity check. Does this data make sense? My average daily return in the trimmed sample is .0000707, so I should check and see if that compounds approximately to the returns I see 5, 20, etc. days out. I don’t expect it to line up exactly, but it should be very close. If not, maybe I have an error in my data or in my setup.

Don’t be overwhelmed; the panel above shows a lot of numbers, but it’s ok to just focus on the Mean column, which shows the mean return for those days after each day in the data set. This is our baseline, since it includes all days, and we want to compare our filtered group against that baseline.

After large down days?

Returns following large down days, as measured by returns and SigmaSpikes
Returns following large down days, as measured by returns and SigmaSpikes

Next, let’s look at the same data, but only selecting the days following large down closes. Compare the means in these tests with the “all data” panel, and do we see a pattern? I think maybe I do, at first glance. It looks like the EURUSD tends to be weak shortly after strong down days. For instance, the ‘ret’ 5 day test shows a -0.002 return vs. the +0.0035 return in the ‘all data’ test. It also looks like maybe the EURUSD is a lot stronger a year out since I see +0.0377 vs. .0167 for the all data. Nearly 4% vs. 1.7%, so it seems like something might be going on there–maybe we have a pattern where the EURUSD is weak in the near term after a strong down day, and then recovers and is stronger half a year or a year out. However, there is a problem. (Actually, there are a few, but let’s start with an obvious one.)

After large up days?

Returns following large up days, as measured by returns and SigmaSpikes
Returns following large up days, as measured by returns and SigmaSpikes

I assume most things in markets should be more or less symmetrical. Yes, I understand there are reasons psychologically why we might think that a market going up or down could be different, and perhaps different dynamics do drive uptrends and downtrends. Regardless, if I see an effect that is not symmetrical, that is a red flag and demands further investigation. With currencies, especially, “up” and “down” are simply conventions since we’re trading relative value. If I can see a reverse effect to the large down days with large up days (i.e., I’d want to see up then down here), then maybe we have something interesting. But, alas, it is not meant to be. In fact, the large return panel looks very similar for both ups and downs, which tells me there probably is not a real effect. Think about that for a moment. Go back and look at the data, thinking about a week, a month, half a year, and a year after a very large down day, and then after a large up day–we probably “should not” see the same market direction if we have a valid test/pattern here.

Thinking about regimes

EURUSD returns as time series, filtered for large moves
EURUSD returns as time series, filtered for large moves

One possible explanation is that these really big days all came in a cluster, and that our test is capturing the same market period with a lot of overlap; we could be triggered “long” and then “short” on consecutive days, and then our test would show a very similar profile a few days out, since we’re basically covering the same data. One way I could explore this would be to introduce a “cooling off” period after a signal. For instance, perhaps we could not take another signal for a month or something. I am always suspicious about adding constraints, because it gives us a metaphorical knob to turn, and turning those knobs can lead us to overoptimization. I’d much rather know what the pristine market data says before I start fishing around for something good, and I’m very careful after taking a few cuts through the data.

The time series chart above shows a lot of clustering. I expect some, but this is pretty extreme, and that may be why my hypothesis (which was, roughly, there would be statistically significant non-random price movement following sharp downward days in the EURUSD) is coming up short on proof.

One more thing

I’ve dragged this out a bit longer than I had to (and taken ten times longer to write it up than it took to do the test!) Early on, when I first pulled out the filtered days, I also considered how small the mean returns were in relation to the standard deviation. That’s something that is not considered often in technical analysis, but it’s very important for any real statistical work. In this case, there was so much variation against such a small effect that this test failed tests of statistical significance, which is one of the first things I do to see if it’s worth digging deeper. It wasn’t worth digging deeper, but I did for the purpose of this blog post. 🙂

I truly expected to find an effect here, and I was going to write blogs about it, and even use the information from the study to help manage the euro short that we’ve held (since 7/15/14) in the daily research I write. However, I was wrong. We have to let go of our wrong ideas about the market as quickly as we execute our stops on losing trades. Hit that bid, and move on.

Perhaps there are other ways to manipulate the data, and perhaps there’s something I missed, but what I am looking for are robust statistical tendencies because that is where I think traders will find the enduring edges. There’s another lesson here–on the vastly different characteristics between asset classes (if this was a stock or a stock index, I know what we would have found with a study like this, but currencies are quite different)–but that’s a lesson for another day. Think deeply. Think objectively, and don’t be afraid to be proven wrong.

 

 

AdamHGrimes

Adam Grimes has over two decades of experience in the industry as a trader, analyst and system developer. The author of a best-selling trading book, he has traded for his own account, for a top prop firm, and spent several years at the New York Mercantile Exchange. He focuses on the intersection of quantitative analysis and discretionary trading, and has a talent for teaching and helping traders find their own way in the market.

This Post Has 8 Comments

  1. sc

    Thanks for providing a great blueprint to analyse interesting market moves in a quick and clear way. Yet again I will be copying your approach!

    1. Adam Grimes

      Yes, I hope the concept and at least the general idea of how to think about market problems is helpful… and to realize that most efforts don’t actually find anything. 🙂

  2. irdoj75

    Thanks, nice example. I tried to replicate and while I am getting conceptually the same conclusions, few of the numbers look fairly different and once again give me a bitter flavor of how difficult this really is – especially getting your raw input (data source + clean-up) right…

    I agree on the symmetrical aspect on currencies, but would argue that for other instruments the symmetry may be distorted not only due to psychological aspects as you mentioned but also due to e.g. short restrictions on major players or also the nature of the market. I tried to replicate your b/o approach from WA on commodity futures and saw a much stronger tendency on the long side while the FX were mostly balanced.

    1. Adam Grimes

      Makes sense… also keep in mind that there will be long strings of time where one side works better than the other.

  3. Ken

    Thanks a lot for the example. I tried replicating the example, trying to test it on other asset classes. But it seems that my numbers look fairly different from yours. Using the net return of 1.567% on that day, and a 20 day STDEV of 0.403%, i only got a sigma of 3.89. Just wondering if i messed up on my STDEV calculations, the sigma number looks way off if I had used the annualized STDEV instead. Any thoughts? Thanks!

    1. Adam Grimes

      Offset your stdev one day, so you are comparing today’s return against the 20 day stdev as calculated on the previous day. This keeps a very large day from inflating the stdev calculation for that day.

      1. Ken

        Hi Adam, That’s very true. Thanks for the advice. I managed to replicate the results.
        I did a quick test, replicating the idea on some of the equities such as AAPL and GOOGL and indices like HSCEI over a 5 year period. Haven’t done a statistical analysis, but from a quick scan through, i find that the spikes does not seem to provide much advantage. Stocks seem generally weaker 3 days after a sharp spike up (possibly some consolidation), and relatively flat after a 7 days. Will try to test it further.
        Just curious, would you think that a volume spike could be indicating of a volatile move soon?

  4. Tim

    Hi Adam
    When looking at statistical significance are you concerned if some of your observations have overlapping returns?

Comments are closed.