Redirecting

Friday, May 07, 2010

More on the Crash - Possible Triggers, and High Frequency Trading

So I wrote this piece earlier, talking about possible explanations for the carnage today, but not liking any of them.  Then I remembered an email I got from a former broker of mine around 2:15pm today, talking about the carnage in the BRL-JPY exchange rate.  You can look at the Yen vs other currencies too, but the bottom line is that the yen spiked before the S&P tanked.  What does this mean?  Well, the yen is the base currency for the "carry trade."  You can borrow Japanese Yen, pay their interest rate (basically zero) and invest in other currencies and their markets.   You earn the difference in interest rates - the carry. 

The email I got was actually a little different from the standard carry trade explanation:
"Please see attached chart -- BRLJPY is down 6.2% today and moving quickly, looking at this cross vs SPX you can see it bottomed earlier than equities and have mirrored. This represents probably the single biggest Japanese retail FX position. As I mentiond this morning we saw some very big moves in FX vol and Japan is largely closed this week, this could lead to a much bigger move when Japan comes back next weekRisk assets are becoming highly correlated again."

I think his point was that this indicated a massive de-risking by Japanese customers - selling their higher yielding BRL (Brazillian Real) positions, shifting back into their low yielding yen positions.

Now, there are some facts:  1) markets were selling off already before the big crash.  2) there is some significant global instability, centered around questions about what will happen in Europe.  Another former colleague of mine writes:

"there is a huge problem in Europe with over night Commericial paper market. check out EURBS5 ; the market completely closed and there was no money today.

estimate balance sheet of european banks is 5.5trillion of which 1.5 trillion is funded overnight using commercial paper - sounds like this is the major concern"
In plain English, the fear is that Europe is about to undergo a Lehman-esque scenario where none of the banks are lending to each other.  I would expect the ECB and even the US Fed to step in and provide ample liquidity, but in any case, there are some serious tremors effecting global credit and equity markets.

And then comes number 3 - the one that everyone will be talking about:  It's almost impossible to argue that algorithms didn't play a role in today's price action.  As I wrote earlier, it seemed likely to me that this looked to be a case of Algo's Gone Wild, feeding of each others signals and resulting in a crazed feedback loop of selling.  However, the guys I've talked to so far who are major players in the electronic trading space have told me that they had no issues with their models today - things were normal, and the computers didn't "take over" or "go bezerk" or rack up massive losses.  If there are any readers out there running quant models - please let me know your thoughts. 

The same big electronic trader suggested that one possible explanation is that an algorithm gets into a "sell loop," where it is sending out a sell order which, for some reason or another doesn't get immediately acknowledged, or doesn't get acknowledged within the threshold for the algorithm.  So, the algo, thinking its order didn't make it,  spits out another order, which doesn't get acknowledged,  and it spits out another, etc etc etc.  Why would the algo be coded to send out a new order before it had an "out" on the prior order?  I don't know - that seems odd to me, (any algo writers out there?  please share your knowledge in the comments section) but I remember a great story that my boss used to tell on our trading desk about how in the old days, when they sent a program trading order to sell a basket of stocks, the old dot-matrix printer behind them would loudly whir to life and print up a confirmation that the basket went.  One day, trying to sell a basket, they got no confirmation.   Silence.  So they hit the button again.  And again... and again... Until finally someone shouted - "THE PRINTER IS OUT OF PAPER,"  as they watched the market fall under the cascade of sell orders that had just been sent.

A third big player in this space just told me "all the HFT guys pulled out of the market instantly," which seems to jive with an article that the WSJ wrote this afternoon.  The high frequency traders don't want this chaos either - it makes it more dangerous for their models to get hooked long or short stock.

While I don't want this to become a debate over the merits of high frequency trading, we need to acknowledge a few things:  1) there is a red herring argument that one of my loyal readers already made in a prior comment thread, to the tune of "but you said that HFT algos would provide all the liquidity we need!"   No  - what HFT proponents say is that HFT algos provide liquidity, which is always a good thing. I would always prefer liquidity to lack of liquidity.  Now people are going to crucify them for NOT providing liquidity! Well, which is it?  If you're complaining that you don't like the HFT liquidity, here's what happens when you don't have HFT liquidity!  I read comments on other blogs that said things like "I was trying to buy near the lows but HFT algos kept out bidding me by a penny!"  Well - wouldn't that be good? Wouldn't that STOP the price decline, if HFT algos kept putting in higher bids?!?!?


On the other hand, 2) there is no doubt that higher speed markets (like we currently have) will have higher speed price movements in boundary scenarios like today.    Price movements get exacerbated by speed - but notice that prices recovered quickly too. So, that begs the question - who got hurt today?  After all, I asked my dad, "did you see what happened in the market today?"  "Yeah - the Dow was down 300 something points."  he replied.  "Yes - but it was down 1,000 at one point!"  I explained.  He had no idea - it didn't effect him!  It shouldn't effect most people!  If you left your trading desk to take a dump you might not have known anything crazy had happened when you got back.  If you are a normal retail investor who isn't staring at the screen or watching CNBC all day, you probably didn't even know what happened!


The obvious answer of "who got hurt?"  is anyone with a stop-loss order.  Let's go to Investopedia for a definition, and a perfect example of what the problem is:


"An order placed with a broker to sell a security when it reaches a certain price. A stop-loss order is designed to limit an investor's loss on a security position.

Also known as a "stop order" or "stop-market order". 

They continue:

"Setting a stop-loss order for 10% below the price you paid for the stock will limit your loss to 10%. This strategy allows investors to determine their loss limit in advance, preventing emotional decision-making.

It's also a great idea to use a stop order before you leave for holidays or enter a situation in which you will be unable to watch your stocks for an extended period of time."

Ahhh.. But there's a problem, isn't there - and you saw it today.  When the stock hits your limit and triggers your stop order, it sends a market order.  Obviously, in gapping markets, this can be deadly.  For this reason, I'd suggest never using a stop market order - if you really want to have that order in there, use a stop LIMIT order, perhaps with a limit even a decent percentage below your stop price - so that when the order gets triggered, you are trying to execute a sell order with a limit slightly below your trigger price - but not at the market.  It all gets back to the fact that I would never use a market order... but let's continue:

NASDAQ has declared that they will cancel trades where the price varied by more than 60% from the prevailing price at the time (I reported earlier that I'd been told the threshold would be 30%).


Now, I liked the comment I read on a Clusterstock post this evening that said:

"I am waiting for someone to explain why the algos  should be entitled to an expectation that the exchanges  will cover their butts when their trading programs go nuts"

That's a great point.  If we're going to allow pervasive algorithmic trading then why do any trades get canceled at all?  I THINK that the NASDAQ is canceling these trades in the interest of orderly markets, which certainly is a reasonable goal, but again, it's about bailouts and responsibility.  Of course, they also don't want Mom and Pop Retail to have to eat the results of their stop orders gone bad, but in bailing out Mom and Pop Retail, they are also bailing out the electronic algos  - if there were any, and it seems likely that there must have been SOME - who sold cheap stocks.

Ok - so, in an effort to avoid a lengthy "HFT SUCKS!" - "NO - HFT IS AWESOME" debate, I want to leave you with two quotes from bloggers I read regularly, and which I think are both very valid.  First, the "algo's certainly didn't help" point,  from one I've been quoting a lot lately, The Reformed Broker, Josh Brown:

"The "Fat Finger" thing is nonsense.  Maybe someone made a sizable error, but one cannot deny the fact that the algo-driven tradebots poured gasoline on the fire.  The machines were triggering stops and wrecking everything in sight before human beings with qualitative senses could get a handle on what was happening."

And then, the "this has happened before, without computers, and it will happen again, with computers" view from TPC:

"There’s all sorts of speculation over what caused the crash today.  The answer is simple.  Pure unadulterated fear.   Everyone is looking for someone to blame, but we’ve seen this happen in markets for hundreds of years.  It happened before there were computers and it now happens that there are computers.  Today was a classic fear filled day.  We saw huge downside in many debt and forex instruments before the crash and the equity markets were the last to capitulate.  The bids fell off the board and the sellers just continued to hit the bids.  There might have been some “fat finger” trades or some electronic trading that contributed, but this was primarily fear.  Good old fashioned fear.  This has always happened in markets and will always happen in markets.  It’s as simple as that as far as I’m concerned.

Investors are scared out of their minds as China looks like it is slowing substantially and Greece and the EMU appear to be on the brink.  There are real fundamental reasons for the recent declines in stocks.  In addition, it’s important to remember that there are a mountain of longs that have piled into the market in recent weeks and months with the expectation of a nice easy recovery trade.  That is clearly off the table and there is a huge trade being unwound here.  Greed has quickly turned to fear."
The only quibble I have with TPC's comment, again, is that I don't think that fear explains stocks getting hit so hard that they fall to prices of a few pennies.  I've never seen nor heard of that before, and I don't think it would have happened if we had old school specialists standing in the middle slowing down every order.   That's not to say that I think old, slow, trading is better, however. 

-KD

10 comments:

Anonymous said...

Hi Kid,
not for nothing, but I prefer felix salmon's version of what happened (http://blogs.reuters.com/felix-salmon/2010/05/06/how-a-market-crashes/)

there's always a tendency to grasp for explanation of every gyration in the mkt. I'm not saying that the mkt is selling off in a vacuum here, but the thing is that the selling accelaerated in the afternoon session when there wasn't much news coming out.

Regards,
Your No. 1 Fan

Transor Z said...

KD, on the pennies thing. Your friends at ZH and elsewhere are going to say that this just means the algos are churning the market decoupled from fundamentals, that there is no value trading volume to speak of, that it's all a sham fueled by the Fed dumping liquidity into the system. The momentary fall to pennies was a peek behind the curtain.

You know you're not going to be able to duck getting back into the ring on this one, right? ;-)

Seriously though, I'm sure I'm not the only one here who wants to read your take/debunking on that point.

-TZ

Anonymous said...

algo guy here. noone would write an app that just keeps sending out orders without acks. Not just because its a bad idea, but also because finra would be all over you in a heartbeat for not marking your trades properly (long/short).

Considering that the giant decline happened on pretty much *no* volume, I think other factors are at work. I believe the core problem here was a real order imbalance with lots of volume (which took us down the original 350), then nyse halts these stocks, the market orders get rereouted (regnms and all) to ECN's where there is much less liquidity, and what liquidity is normally there is mostly provided by the nefarious HF strats who were rightly scaling back risk. So the 10K shares that might have been a downtick on nyse blows throught the BATS book completely.

just my .02

Anonymous said...

Hi Kid,

not for nothing, but to err is human. To Really Screw Up, You Need a Computer.

It's 1987 portfolio insurance redux. No, portfolio insurance did not cause Black Friday, but once the the slide started, it sure as amplified it.

Ditto for HFT.

Regards,
Your No. 1 Fan

Kid Dynamite said...

anon #1 fan - absolutely - no one is debating that things get accelerated by our technologically "more sophisticated" markets. i mentioned that in the post.

anon the Algo guy - yes. thank you - someone mentioned that to me and I forgot to explain it - that's probably the single best explanation of what happened - liquidity gets rerouted to market centers that simply aren't carrying thick order books, and, KABOOM

transor: i DO think that the market was decoupled from fundamentals! i can't debunk that! however, that doesn't meant that the solution is to turn off the machines! a solution that would be just as crazy would be to prohibit media sources from writing about the "Crash" so that all the retail investors who weren't watching intraday would be unwise and content - unaware that it ever happened. To say that there is no value trading volume to speak of is easily debunked by the fact that the stocks that traded down to 1c didn't STAY at 1c...

Yangabanga said...

@Anon 1:06am

I think you are on the money.

Fundamentally this is an imbalance and the result of a sudden loss of liquidity (rightly due to HFTs pulling out to protect risk)

However I don't think it would take a halt. For these stocks the MM's spooked too. Because the tape gapped down on low volume (which I think has to point to an error of some kind), maybe they thought they were missing news of armageddon in greece or in the gulf and hit the panic button.

Now look at the rapid bounceback. Any HFT outfit worth its salt, just like any MM in NYSE worth anything who sat on the sidelines for long lost a huge opportunity to make money. Others didn't and got back in before any halts. boom we are right back up and those guys got paid.

So while HFTs will get blamed, actual humans who were supposed to be making markets (like on PG) also pulled out too and net-net the system worked efficiently to deal with it to restore balance.

also the contagion effect is clearly in force here because many people are trading baskets and correlations and so whatever was the root cause quickly spread to others. sure all of this is abetted by computers/HFT and makes things more extreme, but it happened plenty of times in the past without them.

So of course there were winners and losers which is why nasdaq is canceling trades to ensure an "orderly" market after the fact. And of course when the populists and press start to make hay about this they HAVE to BLAME someone... in this case something...

Kid Dynamite said...

algo anon's point was made by James Angel, a G'town prof:

"“The LRP model doesn’t work,” Angel said. “The idea that when the market is going crazy you can slow down trading in one market and not others means that sell orders were churning through the books at every other market. NYSE dropped out of the running.” "

http://www.bloomberg.com/apps/news?pid=20601087&sid=aUGhj_upCaio&pos=4

Mr. Mom said...

en

Mr. Mom said...

I find the LRP structure hard to blame for the mess since a number of NASDAQ stocks like AAPL, which went as low as 200 and as high as 100,000, also get affected by that move. These types of moves have been taking place on electronic venues for nearly a decade: ACLS, COCO, DNDN and RMBS all crazy and back in minutes over the years. They are just a part of the game. Sometimes they happen in isolation, like NLY on Monday. Sometimes the whole market gets taken out. A similar 500 point insta-tank happened in 2007. They are part of the market landscape that I do not see going away.

Leigh said...

The printer story is priceless, hahahaha.