Vertox Profile picture
Quant is love, Quant is life. DM if you're a freelancer and need work.

Jul 4, 2023, 10 tweets

Structural Breaks, what they are, how to spot them and how they appear in finance.

🧵
1/n

What is a Structural Break?

A structural break is when a timeseries suddenly starts behaving very differently.
This could be when it switches regimes for example.

2/n

What are some examples for structural breaks?

-Shift in local mean
-Much higher / lower volatility
-From Mean Reverting to Trending or the other way around
-Sudden different regression coefficients
etc.

3/n

How to detect Structural Breaks?

Method 1: CUSUM Filter
Let's say you have a mean reverting process that looks like the one below, we can cumulatively add up the change of this variable and set it to 0 whenever we exceed some threshold, let's say 0.005.

4/n

Now consider the following variable and look at what happens to the cusum filter.

It goes above out upper threshold which means we got a structural break at that point, at this point it resets to 0 meaning that this is now our new normal behavior.

5/n

Now look at the following variable: you will notice that there is a sudden increase in variance.
Let's define a new variable which is the standard deviation of our variable of let's say the past 30 values.
We can now run the cusum filter on the volatility of our variable.

6/n

Here I used a threshold of 0.002 .
As you can see it actually detected 2 structural breaks in a row, we can get around this by having more data.
Let's simulate 5000 data points instead of 500.

7/n

Using a threashold of 0.005 we get the following results.
The values for the thresholds are basically something you need to play around with historically.
Too high of a threshold and you don't catch structural breaks.
Too low and you capture too much randomness.

8/n

There are other tests used for detecting structural breaks like the chow test.
It basically fits models to different segments of your time series and then compares how different the coefficients are.

9/n

Structural breaks are often pretty exciting moments with potential to make lots of profit from.

Structural Break in correlation or vol? Run a momentum / mean reversion strat depending on the type of stuctural break.
etc.

10/n

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling