This page has been archived and commenting is disabled.

Guest Post: Deconstructing Algos, Part 4 -Phase Space Reconstructions Of CNTY Busted Trades Suggests High Speed Gang-Bangs In The Market

Tyler Durden's picture




 

Submitted by The World Complex

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.

 

- advertisements -

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Sun, 07/31/2011 - 17:50 | 1510476 Mike2756
Mike2756's picture

Has anyone wired an etch-a-sketch to do some trading?

Sun, 07/31/2011 - 18:13 | 1510545 DormRoom
DormRoom's picture

dag, Basquiat was doing this type of image analysis in the 80s.

Sun, 07/31/2011 - 17:51 | 1510481 caerus
caerus's picture

flash impressionism is a great term...some of these diagrams are reminiscent of representations of brownian motion...i haven't really thought about this much but it seems to me that if these can be represented mathematically then the functions must be self referential...they are beautiful in any case

Sun, 07/31/2011 - 18:40 | 1510636 Stares straight...
Stares straight ahead's picture

All joking aside: Are you plotting price against the volume for each stock?  Why are the X and Y axes in the same denominations?

If so, the blocky algo patterns would seem more "normal" as the machines would pepper in the same prices at increasing or decreasing volumes OR pepper in rising or falling prices at the same volumes.  This would seem inherently more methodological at higher rates of exchange that computers would allow.  And I suspect , the work of one algo working systematically thru the prices (attempting trigger stops or just snapping up pennies differences in prices). The curvey lines seem more biological, as if several human bidders are seeking an equilibrium without knowing what the other humans are doing.  However, within the space of milliseconds, human activity is instinctively not possible.  So, competing algos, makes better sense.  But again, how do they nail each other within that tiny fraction of time??  Something else is happening perhaps?  I hope ZHgers will brain storm this phenomenum, it is fascinating!

We now return to our regularly scheduled program...

 

Sun, 07/31/2011 - 21:11 | 1511077 mickeyman
mickeyman's picture

I haven't yet. I plan to map the size of the trades over each of the states in the state space, so you would have a contoured density map overlying the flash impressionistic painting. Some of the blocky trades actually have a lot of volume pouring through at a single point, so the blocky figure might look light a street map with a few skyscrapers. But I'm still learning how to handle and process the data.

Sun, 07/31/2011 - 21:32 | 1511189 Stares straight...
Stares straight ahead's picture

TerraHertz below pointed out an excellent opportunity to get some Q and A time with an HFT programmer.  It is just fascinating to read the comments.   But the guy is getting so much shit from heated comments that I fear he wont be participating too long. Better get over there and pose some questions...

http://developers.slashdot.org/comments.pl?sid=2357190&cid=36936764

Sun, 07/31/2011 - 21:55 | 1511255 caerus
caerus's picture

this is all fascinating stuff...but at the sake of appearing simplistic...should we briefly revisit the two variable function paradigm?  dependent/independent variable?  what are we looking for?  imo these price functions are the result of a supposedly independent intelligence pursuing profit...never mind that a machine is the middle man...someone has to program them...a worthy solution presupposes a well defined premise...

Mon, 08/01/2011 - 08:56 | 1512094 Mec-sick-o
Mec-sick-o's picture

@Stares straight: "All joking aside: Are you plotting price against the volume for each stock?  Why are the X and Y axes in the same denominations?"

This is a way to observe some complexity behavior and phase on a single variable in time.  So the plot being X and Y, X is price in time n=0 and Y is same price in time n=-1.

It is the same data variable on both axis, with the only difference being each sample is 100ms apart.

Xn=Xn, Yn=Xn-1

Xn-1=Xn-1, Yn-1=Xn-2

so on...

Sun, 07/31/2011 - 17:52 | 1510483 zorba THE GREEK
zorba THE GREEK's picture

Are you sure these aren't early Picasso sketches?

Sun, 07/31/2011 - 17:55 | 1510487 SumSUN
SumSUN's picture

I for one, salute the brave new world under skynet's control.

Sun, 07/31/2011 - 19:01 | 1510710 MrBinkeyWhat
MrBinkeyWhat's picture

I think Skynet is doing a bang up job. Terminators next?

Sun, 07/31/2011 - 17:56 | 1510494 zorba THE GREEK
zorba THE GREEK's picture

I bid $10,000 on the large-nosed man with the thin chin.

Sun, 07/31/2011 - 18:24 | 1510549 Stares straight...
Stares straight ahead's picture

I thought it was Inspector Cluso with a huge erection.

The third one down I have named, "Big Dog Humping Bernank in Lateral Fetal position"

(I think you can detect a pattern in my thoughts) 

Sun, 07/31/2011 - 22:21 | 1511330 zorba THE GREEK
zorba THE GREEK's picture

I bid $15,000 for Big Dog Humping Bernanki.

Sun, 07/31/2011 - 17:58 | 1510501 AldousHuxley
AldousHuxley's picture

...When you finally wake up (put on the sunglasses) you will realize that your freedom is? a facade...

 

Movie They live where he sees the real world, the other reality

http://www.youtube.com/watch?v=Zqi5KGljJZk

Sun, 07/31/2011 - 18:00 | 1510508 masterdjm
masterdjm's picture

Algo Rorschach

Sun, 07/31/2011 - 18:01 | 1510509 bbq on whitehou...
bbq on whitehouse lawn's picture

Somtimes it seems that ZH is a sinking lifeboat in the middle of the ocean. Yes its nice to see a boat of sanity, but if we are all drowning i couldnt think of a better class of people to drown with.

Sun, 07/31/2011 - 18:10 | 1510535 UGrev
UGrev's picture

Cue Violins!

Sun, 07/31/2011 - 19:09 | 1510745 AldousHuxley
AldousHuxley's picture

zero hedge = in the end we all die

 

but at least you will die in peace knowing the truth

Sun, 07/31/2011 - 22:49 | 1511364 Rusty Shorts
Rusty Shorts's picture

... on a long enough time line. $ = money. $ = time. $ = sin wave. $ = time cube. $ = time cloak.

Sun, 07/31/2011 - 18:26 | 1510589 Tao 4 the Show
Tao 4 the Show's picture

There is much one can do if you have enough data points and know the math. 10,000 points or more are best, but if you have even 1000 during a particular time period, ther are many measures that might give some insight into the algo.

Sun, 07/31/2011 - 18:34 | 1510613 mfoste1
mfoste1's picture

i think i see pinky and the brain in one of them

Sun, 07/31/2011 - 18:36 | 1510623 RiverRoad
RiverRoad's picture

Re bbq on whitehou...:  ZH will be the ONLY lifeboat floating around when the dust settles here (sorry about that metaphor) with everybody and their brother trying to climb in.  Paddle guys!  Paddle!

Sun, 07/31/2011 - 18:38 | 1510629 Oligarchs Gone Wild
Oligarchs Gone Wild's picture

Yes SEC, this is fair price discovery.  Move along.

When you blast through rock to drive 2-3 MS optical performance between trading exchanges, thats another sign of efficient markets evolving.

Co-location is simply for efficient cloud computing enhancements to better serve the common man.

Behold.  Gangs of New York 21st century style.

 

Sun, 07/31/2011 - 18:53 | 1510671 Goldilocks
Goldilocks's picture

From the movie… “Airplane”

Steve McCroskey: Johnny, what can you make out of this?
[Hands him the weather briefing]

Johnny: This? Why, I can make a hat or a brooch or a pterodactyl -

Sun, 07/31/2011 - 19:02 | 1510713 bill1102inf
bill1102inf's picture

"Did I leave the iron on?"

Sun, 07/31/2011 - 19:18 | 1510776 carbonmutant
carbonmutant's picture

Thinking patterns...

Sun, 07/31/2011 - 19:45 | 1510834 TerraHertz
TerraHertz's picture

Here's your chance to have a chat with some people who program the HFT algos. Thread at slashdot started by an HFT programmer, with a few others chiming in.

http://developers.slashdot.org/comments.pl?sid=2357190&cid=36936764

"I am an HFT programmer"

Plus another discussion of the same topic here:

http://news.ycombinator.com/item?id=2828538

Sun, 07/31/2011 - 21:45 | 1511224 Stares straight...
Sun, 07/31/2011 - 20:14 | 1510890 Reptile Master
Reptile Master's picture

Yeah those graphs are not the images I was hoping to see after the jump.

Sun, 07/31/2011 - 21:02 | 1511038 harlanaladd
harlanaladd's picture

A couple of those look like a self-portrait Kurt Vonnegut once did.  (A very nice touch, he was the inventor of Ice-9).

Mon, 08/01/2011 - 00:45 | 1511583 Godisanhftbot
Godisanhftbot's picture

I notice most of these raids have the same appearance.

Note the raids in NLY and  AGNC Friday.

Seen way too many of these to beleive that they are naturally occuring events, like flatus.

 

 

 

 

Mon, 08/01/2011 - 01:06 | 1511632 digilante
digilante's picture

Is this just Lagrange and Hamilton, or strangely more attractive, like Lorenz?

Mon, 08/01/2011 - 01:50 | 1511695 caerus
caerus's picture

ahh...lagrange and hamilton i understand...these were two equivalent formulations of the least action principle...the philosophy was the same...only the math was different...see the brachistocrone problem...imo what is the same is the idea that action (the difference in energies in a system) is a quantity that should be (and is) minimized as the system evolves mechanically through time...newton's mechanics is equivalent but more cumbersome (less elegant)...im not sure what you mean by the lorenz reference...i remember his physics as a geometric interpretation of special relativity...i think there is a fundamental disconnection between the theories as both lagrange and hamilton ascribed to the newtonian (non relativistic) concept of time and lorentz (as i remember it) is decidedly relativistic

Mon, 08/01/2011 - 12:56 | 1513237 Use of Weapons
Use of Weapons's picture

He's asking if they're strange attractors or not, which is a decent question given the interactions between them. I'd like to see them modeled in 3D, showing the time sequeneces and interactions more accurately - i.e. so we can tell if the interferences are parasitic or negatory [i.e. Are the secondary / tertiary algos feeding off the first, blocking it, or merely aping it, and leading to odd interactions?] What is the MS delay on each algo? (because, if you can figure the MS delay, you can likely figure out the geographic location of the source - ding ding ding).

tldr;

If algos start interacting in a chaotic fashion, then no HFT programmer has a fucking chance of determining the outcome - which is precisely what everyone is worried about.

 

 

http://www.chaoscope.org/

Tue, 08/02/2011 - 10:33 | 1516643 mickeyman
mickeyman's picture

Too soon to tell. The nat gas flash crash looked like Lorenz. 

http://worldcomplex.blogspot.com/2011/06/flash-crash-nat-gas.html

Wed, 09/14/2011 - 04:15 | 1667230 chinawholesaler
chinawholesaler's picture

Inflatable Products
Name Card Holder

Wholesale Raincoat
Wholesale Playing Card
Promotional Gifts

Wholesale Glove
Lady Beauty Care
Mouse Pad

Wholesale Mat
Baby Products Suppliers
Promotional Products

Business Gift
Safety Products
Wholesale Mirror

Wholesale Pen
Wholesale Flashlight
Computer Accessories

Hair Products
Arts Crafts
Reflective Safety Vest

Safety Suppliers
Wholesale Vuvuzela
Wholesale Mug

Wine Set
Wholesale Radio
Wholesale Candle

Poncho Raincoat
Wholesale Clap Hands
Promotional Gifts

Beauty Equipment
Recorder Pen
Wholesale Pedometer

CD Holde
Garden Decorations
Wholesale Tellurion

Wholesale Umbrella
Wholesale Poncho
Wholesale Lighter

Wholesale Cup
Silicone Products
Wholesale Massager

Wholesale Swimming Products
Wholesale lable
Wholesale Keyboard

China Wholesale

Do NOT follow this link or you will be banned from the site!