the Ulcer Index ... and the Martin Ratio
motivated by email from Dan M.
When we were talking about Drawdown, I never knew that ...

>Huh? Drawdown?
What!? You've forgotten already! We look at the moving maximum of historical prices
... and we look also at the current price and see how far the latter has dropped below the former, like so

That drop is the Drawdown and ...
>Yeah, I remember ... but what's the Ulcer Index?

The Ulcer Index is a measure of the cumulative Drawdown. It's ...

>The total blue area, right?
Not exactly. It's the root-mean-square (RMS) of the historical Drawdowns, and it's called the "Ulcer" Index because ...

>Don't tell me. Let me guess.

Anyway, it's the brainchild of Peter Martin and can be used (like Drawdown) as a measure of risk ... especially ulcer-generating risk.

>What about Standard Deviation as "risk"?
Let's not go there ... or there

In fact, the Ulcer Index can be used in place of the Standard Deviation (in many cases), like the Sharpe Ratio, for example.
Instead of dividing by the Standard Deviation, you divide by the Ulcer Index, giving the Martin Ratio.

In any case, you calculate the weekly (or daily or monthly) Drawdowns, say D1, D2, ... Dn, over the last n periods (daily, weekly or monthly) then calculate the RMS value:
Ulcer Index = SQRT[ (1/n) (D12 + D22 + ... + Dn2) ]

>What's n?
I dunno. You pick the number of historical periods that makes you happy, like n = 100 or 200 or whatever.
Note that each Drawdown is a percentage drop from the moving maximum price, so the Ulcer Index is expressed as a percentage as well.
For example, suppose we take weekly Drawdowns and pick n = 156. That's the last three years of weekly prices ... since 3*52 = 156.

We'd get these pretty charts, where we let n increase from n = 1 to n = 156 (spanning the three years from Sept, 2004 to Sept, 2007).
>It can go up and down?
Sure. If there are long periods when the Drawdown is small, the RMS value (that's the Ulcer Index) goes down.

For example, XOM had a Drawdown history like this
The maximum was 15.1% but there was a recent period when it was zero or, at least, smallish
... which accounts for the recent, decreasing Ulcer Index for XOM = Exxon.

>I assume there's a spreadsheet?
Yes ... an addition to the Drawdown spreadsheet noted here.
The Ulcer addition looks like this:

Note that you can vary the portfolio allocation of the four stocks and get an Ulcer Index for your portfolio.
Just as with the Standard Deviation, you might expect the diversification to reduce the Index.

>That's it?
That's it! Just click on the picture to download the spreadsheet.
I might note that you can do some Ulcer calculations for a single stock by downloading three years of weekly prices ... like so (for the S&P500 = ^GSPC):

Of course, you also get all the Drawdown stuff for each stock.

>That's it?
That's it!

See also Peter Martin's website.

Martin Ratio vs Sharpe Ratio

It's interesting to compare the Martin to the Sharpe Ratio.
Let's take a bunch of stocks (from the DOW) and calculate a bunch of Ratios.
We get this:

Type in 30 Yahoo stock symbols, pick a Risk-free Rate (so we can calculate the Ratios) then click the DOWNLOAD button. Neat, eh?

>But, when ordered by Martin Ratio, they're also ordered by Sharpe Ratio.
Uh ... close, but no cigar.
Anyway, to play with the spreadsheet, just ...
>Click on the picture.
You got it!

By the way, since prices are downloaded and weekly returns generated, you can calculate any other number you wish in cells E2, F2 and G2. (based upon the prices & returns).
They'll be stuck in columns L, M and N. In fact, the picture above should be modified, 'cause the spreadsheet's now got this:
... where the Standard Deviation has been added in cell H2 and there's somethjing for you to add, in cell I2.

Of course, E2 to I2 can contain any calculation you like.
>That's confusing.
Just download the spreadsheet and play!
For example, instead of the Sharpe Ratio you may want the Sortino Ratio or you may want to calculate, in cell I2, Kurtosis or maybe CAGR or maybe Beta or maybe ...
Don't you see? Whatever you calculate it'll get stuck in columns L, M, N, O and P and there's a SORT button so you can sort them and ...