Dust flux, Vostok ice core

Dust flux, Vostok ice core
Two dimensional phase space reconstruction of dust flux from the Vostok core over the period 186-4 ka using the time derivative method. Dust flux on the x-axis, rate of change is on the y-axis. From Gipp (2001).

Saturday, July 30, 2011

Deconstructing algos, part 4: Phase space reconstructions of CNTY busted trades suggests high speed gang-bangs in the market

Today we consider the algos picked up by Nanex on June 21, 2011 in CNTY using the data appended here.


The figure shows the action in Century Casinos over 10 seconds on June 21. The range is pretty impressive, far more than boring old gold stocks which take weeks to months to trade over such a range.

As promised, I present below phase space portraits (using the methodology described here) from various intervals during the trading day. As you will see, they represent a new art form--flash impressionism! But first, to cleanse our digital palates, let's look at the phase space portrait of a boring, non-algofied commodity stock. I present to you the phase space portrait for the entire trading day (July 28, 2011) of Denison Mines (DML-T) with a lag of 100 ms.


Not terribly thrilling, is it? In fact as we have seen previously, a lag of 100 ms shouldn't produce anything of interest. For stocks not under the influence of algos, you usually need a lag of several days to show real structure, although with lags of minutes to hours you might notice blips in the phase space portrait of stock price.

Now, let's get down to business. First in our gallery of flash impressionism is the two-dimensional phase space portrait of CNTY data over an interval that includes some algo activity.


Timewise, virtually all of the plot takes place in the straight segment (the tail in the backwards Q). The big loop and the little tangle at the lower left all take place during 12:17:24. The straight segment would represent normal trading activity with a 100 ms lag (apart from the wide range in price over approximately 90 s of trading). All the rest is highly unusual.

Next up is a reconstruction of 2 s of trading.


The big bowl of spaghetti above all happened within 2 s. Let's leave out interpretation for a moment and head on down the gallery. Next is another boring straight segment, where I have plotted the individual states (busted trades) instead of the trajectory.


This is what you'd expect for a stock investigated at the 100 ms scale. A straight line. The volatility (from $3 to $8 in only eight minutes) is a little higher than I'm used to . . .

Then we get back to a really neat bit of flash impressionism from 2 s of busted trades. It looks a little different from the bowl of spaghetti, mainly because it covers an episode of steadily climbing prices.


The algo hits a wall. And then one second later we get this.


Does this really look like the same algo that produced the bowl of spaghetti? The bowl of spaghetti had a certain grace; the graph above looks a little angular, like an artist beginning a new phase. 

About a minute later, we find . . .


This last algo again differs in architecture from the bowl of spaghetti.

There are other short intervals of frantic action, but we will look at only two more.


So what is going on here? Is there a single algo? Two duelling algos? Something more?

The key difference is the "blocky" character of the last several graphs. That" blockiness" arises in phase space from repeated trades at a single price. The blockiness is absent in the bowl of spaghetti as one entity moved the share price around (was this a test?). The blockiness that followed was the result of numerous followers blasting away at the same price.

I think (but cannot prove) that the initial strange behaviour in the share price was noticed by other algos, which began to look for short episodes of volatility in the share price to exploit it for very short term gains. The initial bowl of spaghetti was manipulation from a single algo--a signal (perhaps unintentionally) for other algos. The blocky trajectories are the follow-on gang-bang of the stock as the other algos join in.

The next step is to see if similar activity shows up in other stocks. Is this sort of thing prevalent in the market?

Longer term, I need to develop methods for automatically adjusting the lag in response to the scale of the variability of the price action. 

4 comments:

  1. you've gotten to the point of translating the current "casino stock gambling" as it relates to HFT and scientific analysis. good work.

    ReplyDelete
  2. I have been thinking about this, since reading this post on the ZH site. You will need to add volume (3D chart) to help with interpretation. I also had the opportunity to talk to an anonymous HFT programmer on a discussion thread at slashdot. I think the blockiness is mainly algebra written in the code and the curviness occurs when "calculus and statistics are used to tune" the algo (in the words of the HFT programmer).
    Great stuff
    ---Stares straight ahead

    ReplyDelete
  3. I am working on that now. I have done this for a few simple reconstructions and will have some of the more intense ones finished later this week

    ReplyDelete
  4. What questions would you ask an HFT programmer, to help with the understanding of the algo's behavior, if you could, at this point?
    I look forward to seeing more -very cool.
    (Sorry for all the commas; think William Shatner's Captain Kirk.)
    ----Stares Straight ahead

    ReplyDelete