CUSUM is an algorithm for change-point detection. It's kind of magical. Here is a financial application, which is very important in itself, to showcase its magic.
A short informal 🧵, to be rewritten in a more formal technical note. Ready, let's go.
1/
Imagine you have a strategy a stream of daily (or, better, intraday) returns r[t].
One of the very basic problems in life is to know when your strategy's performance is degrading. Solving this can make or break you.
2/
Stop-loss policies, among many other things, intuitively serve also this purpose: to tell you that the strategy is not performing as it should. And they're so simple that even billionaires can understand them.
But is there a better way?
3/
Say that the volatility sigma[t] of your returns is fixed and it is known. z-score your returns.
x[t] := r[t]/sigma[t]
*If* your returns are iid, then the expected value of x[t] is the sharpe ratio of your strategy.
4/
Let's rephrase the problem. I expect the sharpe of my strategy to be at least S_H (if your sharpe is 15 and you made $15m last year, stop reading. I don't care about you). And I have to worry if the sharpe of my strategy is less than S_L.
5/
For example: S_H = 1.5/sqrt(251) ~ 0.01 (we are looking at daily sharpes) and S_L=0.
6/
CUSUM's (one-sided) procedure works like this:
1. z-score returns (we did this already)
2. define y[t]:= x[t] -(S_H + S_L)/2. This is "detrending" the z-scored returns, splitting the sharpe in the middle.
3. if the drawdown of y[t] reaches threshold D_M, then stop the strategy.
7/
In formulas, you define the drawdown d[0] := 0
d[t] := min {d[t-1] + y[t-1], 0}
So, CUSUM is a "stop loss of the rescaled and detrended time series of returns".
Stop-loss is a special case. How? When S_L=-S_H. Then the de-trend is 0. The z-scoring doesn't matter
8/
Intuition: imagine that your strategy has sharpe >= S_H. Then the series has unit vol and positive drift. It will have small drawdowns. When sharpe <= S_L, it has guaranteed negative drift. It's going to draw down. The larger the gap, the starker the difference.
9/
Where does the threshold come from? There are some approximations, but it's easiest to simulate the sequences and to choose a value that controls the false positive rate.
10/
What you have to know is that this procedure is an optimal stopping rule. Like so much of sequential analysis, e.g., the secretary problem, it feels magical.
But CUSUM doesn't have a self-contained exposition.
11/
The wikipedia page is horrid. So here is something to get you started.
12/
This survey by Lai, so you see the likelihood ratio underlying engine.
13/
The proof of CUSUM optimality by Moustakides. Frankly, almost unreadable.
14/
This is super-simple to the point that it doesn't explain the "why"
15/
One day, I'll try to write a self-contained, simple but rigorous exposition. But it's midnight and tomorrow I wake up at 6:30AM.
I hope this made you curious, though.
16/
@threadreaderapp unroll
• • •
Missing some Tweet in this thread? You can try to
force a refresh
I ran a mini-test for ChatGPT o-1. Since yesterday I said that Jensen's inequality underlies so much of everything (), I asked a questions that boils down to Jensen's. A 🧵. 1/
I just listened to @NateSilver538 's interview by @tylercowen . I was reminded of some podcasts on rational decision making that stayed with me. Also, I am reading about retail trading, and it's related. What follows is a very incomplete list.. 🧵 (1/8)
There's an article by @jasonzweigwsj on "Why Your Fund Manager Can’t Beat Today’s Stock Market" that I find interesting because it poses important questions (but I question the analysis). So a longish🧵👇 (1/n) wsj.com/finance/invest…
The question: The CBOE DSPX Dispersion Index is up and the 3MCBOE implied Correlation is down. The intuition is that, if stock returns are less correlated, there are more independent bets to be made, and if you have skill, more money to be made too. (2/n)
Since brevity is the soul of wit (and also of lingerie), here are my reservations. They are three.
First, these metrics are quite literally made up, and have only a very tenuous relationship with the expected number of independent bets. (3/n)
So I am non-compete now. LinkedIn profile notwithstanding, I have not been forcibly unemployed that long for hedge fund standards.
And I happily worked for a long time in the math dept. of IBM Research.
All my recent tweeting is an interstitial activity in between jobs. (2/4)
It'll drop a bit in six months. In between jobs, I also teach courses at some local uni (Cornell, NYU), try to help strangers, and write books. I am writing one right now, ambitiously titled "The Elements of Quantitative Investing". (3/4)
There is a paper that I would strongly recommend: "Optimal Turnover, Liquidity, and Autocorrelation" by Baldacci, Benveniste, and Ritter. 🧵 (1/5) papers.ssrn.com/sol3/papers.cf…
I will post more about the paper, because a) there is a lot to unpack in terms of applications and interpretation; b) the proof is a bit elliptic, and so I will expand it.
Meanwhile, take a read. (2./5)
TL;DR:
It solves the multiperiod problem for very general alphas: Markov, non-anticipative, deterministic...
and for arbitrary cost and covariance matrices.
In practice, there is a lot to like about quadratic cost/linear impact. A well-calibrated model is indistinguishable from 3/2. (3/5)