33.  Flash Crash Example

These are draft notes extracted from subtitles. Feel free to improve them. Contributions are most welcome. Thank you!
Please check the wiki guide for some tips on wiki editing.

Contents

02 Change Interval Solution

And the correct answer is minus 0.02708 and0.0256 and this is obtained by taking the meanover here and adding in the standard deviationplus minus up multiplied by 1.96.

03 Outlier Frequency

So here is the real question, suppose you usethis confidence interval to detect abnormalbehavior and abnormal behavior mean, you go toyour boss and you complain, he’ll stop tradingthen how often during a day would you expect todetect abnormal behavior in your trading, ordifferently how frequently does this confidenceinternal trigger on any given single day.

04 Outlier Frequency Solution

And the answer is way too frequently, 3,500 on just asingle day you’d be taking your boss all the time andthe reason is very simple. You take the 70,000over here and you apply a five percent internalover here and if everything is normal youdistribute it what you believe it is, you get3,500 outliers in expectation every day.

05 New Interval

The trick is to change these numbers over hereto numbers that trigger once in a decade andthis is as simple as changing the 1.96 to 6.5which is really kind of a minor change, but thismakes all the difference. The percentage nowbecomes so small, you get one trigger per decade.So let’s quickly compute what the numbers looklike for 6.5.

06 New Interval Solution

And these are the numbers I get: minus 0.0881,0.08662. And this is a wider confidence internvalthan before, that means we trigger lessfrequently and we find less frequently problems withour trading statistics.So let’s now dive in on May 6, 2010, when theApple stock crashed and see if we could havedetected that crash and saved ourselves from risky trades.

07 Calculate Change

So, let me give you examples for twoconsecutive prices. So, here’s one examplewhere the stock changed from 286.85, 286.83.First you calculate the Delta T, which toremind you was the difference of those twothings, Xt+1 - Xt, normalized by Xt. So, whydon’t you give me your calculation of Delta T,into this box over here.

Important:
Note that a percent sign is missing from the quiz. The answer has to be in percent:

08 Calculate Change Solution

I get 0.00697 when I plug this in.

09 Abnormal 1

And now, here’s the important question,is this abnormal, yes or no?

10 Abnormal 1 Solution

And I would say, no, because this value fallswell into – between this confidence intervalfrom here to here.

11 Abnormal 2

I give you three more examples from that day.Because at some point, we got from 247.6 to247.55, some other time 242.5 to 240.0 and thenwe got from 205.71 to 201: all within afraction of a second. I’m just going to askyou the same question as before, do youconsider these abnormal, relativeto this confidence interval over here?

12 Abnormal 2 Solution

And it turns out, the first one is still okay,but the last two would have been abnormal.And the reason is when you work out the Delta Tin percent, you find that this one over here is a0.104% change, but it’s just too much for a singletrade. And this one is an amazing 2.3% changewithin a single trade. And those clearly triggerthe abnormality behavior. Let’s look at the data.

13 Summary

And this here is our Delta T,over time, for Apple’s stock on May 6, 2010.And you’ll find during the day it trades very normallyand all of a sudden you get this amazing oscillation hereof the stock first going down and then going up againand that is really indicative of something bizarre happening.And our statistic would have found itand might have saved you some money.So, that’s my example from financial data.In the next few minutes we’re going to pick a different example.