Measuring a System’s Psychological Pressure: The Ulcer Index

Last year I wrote a post suggesting the use of a measurement I invented – the Pain Index – to gauge how easy or hard it would be to trade a strategy based on the maximum draw down of that strategy and the maximum draw down period length within a definite trading period. However this index has several problems related with the statistical significance of the value it “spits out” since the values are calculated based on the maximum draw down and maximum draw down period lengths, two measurements that are considered “statistical anomalies” of a trading strategy, neglecting to give the user an overall estimation of the psychological hurdle that would be to trade the strategy on a “regular basis”. A blog reader suggested a few weeks ago the Ulcer Index as a potential tool to measure a system’s overall psychological pressure in a more statistically meaningful manner, something which will be the objective of today’s post.

When you consider how hard or easy it will be to trade a given strategy it becomes obvious that strategies which have deeper draw down periods that last longer will be much harder to trade. In particular it is also quite clear that the largest point of psychological pressure a trader will need to endure during a given period is related with the maximum draw down and the maximum draw down period length, something which I attempted to measure and normalize using the Pain Index.

However a clear problem arises when we consider that the pain index only considers what might have been the “worst overall case” – a statistical anomaly – over a trading period which probably had tens or hundreds of draw downs with different lengths and depths. The pain index is therefore a measurement of the “worst pain” a trader has to endure to trade a given strategy successfully but it doesn’t give a statistically meaningful measurement of how “bad” it will be to use a certain system overall. In order to solve this problem we need to “group” all draw down periods and their lengths and come up with a calculation that considers all these periods in order to generate a measurement which is statistically much more meaningful.

This is where Peter Martin comes in with his Ulcer Index calculation (more information here). The Ulcer Index is designed as an improvement over the standard deviation of return as a method to measure the difficulty to trade a certain strategy with the idea of giving a statistically significant result based on all draw down periods. The Ulcer Index – which seems to measure the like-hood of the trader getting a stress induced ulcer – calculates the square root of the mean of the squared percentage drops in equity. In simple words you need to follow this procedure :

1. Choose a given time interval (usually it is one day but could be week, month, year, etc)

2. Choose a given number of periods (for example 365 days)

3. Calculate the value of  R for each day. Note that R = 100*((current balance – maximum balance )/ maximum balance)

4. Square the value of  R

5. Sum all values of R and divide them by the number of days.

6. Get the square root of this value (the result is the Ulcer Index).

As you can see the Ulcer Index is very useful as it penalizes draw downs both for their lengths AND their depths. A system that goes into a deep draw down will get a higher Ulcer Index in the same way as a system with shallower but longer draw downs will get the same effect (more days in draw down equals a higher index). The Ulcer Index is therefore a very useful statistical measurement to determine – in a statistically meaningful way – how it will be to trade a system overall.

A system which has a low Ulcer Index will be much easier to trade than a system with a higher Ulcer Index because systems with a higher Ulcer Index will have either deeper or longer draw down periods. You can then use combination of the Pain Index and the Ulcer Index to estimate the “hardship” you will have to endure to trade a strategy successfully. The Ulcer Index will give you an idea of how hard it will be to trade a strategy overall while Pain Index will give you an idea of what the “worst pain” you will have to endure will be. Certainly it will be very useful in the future to implement this measurement within our Asirikuy profit and draw down analysis tool in order to know how “hard” our systems are to trade when seen through the “Ulcer Index Optic”.

Using the Ulcer Index we can also determine another interesting measurement of performance (called the Martin Ratio) which allows us to measure the performance of our strategy and its Ulcer Index when compared to a “risk free return” (the S&P 500- although NOT risk-free –  is used here a big amount of the time as it’s considered a leading market standard to compare performance ). The Martin Ratio – also known as the Ulcer Performance Index (UPI) – calculates the difference between the total return of your strategy and the risk free return and divides it by the Ulcer Index of your strategy. It is the UI analog of the same equation using the standard deviation (which is called the Sharpe ratio).

As you see the Ulcer Index is a useful statistical measurement which allows us to get a good measurement of how easy or hard it will be to trade a given strategy based on both its draw down period lengths and depths. Although the pain index gives a good overall view of what is the “hardest hardship” a trader would need to endure, the Ulcer Index gives a more statistically relevant view of overall psychological difficulty as it uses much more information than merely some “extreme values” (like the pain index does).

If you would like to learn more about my work in automated trading and how you too can develop systems with sound trading tactics please consider joining, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)

Print Friendly, PDF & Email
You can leave a response, or trackback from your own site.

7 Responses to “Measuring a System’s Psychological Pressure: The Ulcer Index”

  1. John says:

    Nice article. However, I think you need to correct one statement. The S&P 500 is not a risk-free asset. It had a drawdown of over 50% in 2008. I use the Ulcer Index in designing stock trading systems, and my software uses the 90-day commercial paper rate for a risk-free comparison. You can use other things–money market accounts, short-term U.S. Treasuries, etc. It just needs to be something that has no risk to your principal. Basically, a risk-free asset can’t lose money. The only exception is if inflation is greater than the risk-free assset’s return, but that’s not considered for most trading metrics.

    • admin says:

      Hello John,

      Thank you for your comment :o) You’re right in that the S&P 500 is definitely NOT risk free in the sense that draw downs EXIST. If you’re going to be strict you probably need to compare your results with a true risk-free performing asset (such as a T bond or something similar as you have suggested) but it is a very common practice for hedge funds and traders to calculate the Sharpe Ratio and UPI with the S&P500 as this is considered “risk free” in the sense that a complete wipeout is deemed “impossible”. So the assumption is that while the S&P500 exists it will always eventually reach a new high, meaning that any speculative investment needs to be compared to this in order to gauge how “good or bad” it is. I definitely agree with you in that this is not “risk free” by any means but it is a fair comparison when used within this ratios, giving you a clear view of how you do against “the market”.

      However it is obvious that to obtain a perspective which is true to the “essence” of these ratios you need to use the “best” real risk free performing asset. I hope this answers your comment :o)

      Best Regards,


  2. Bruno says:

    Hello Daniel,

    Great article!

    I am glad to read that you are considering adding the Ulcer index and maybe the Martin Ratio to the Asirikuy drawdown analysis tool :)

    I think this will add great value to the risk analysis of systems.


  3. erick says:

    it would be good to also have the calculated sharpe ratios for each strategy and portfolio, which i have not seen either here or at asirikuy. have i missed them?

  4. John says:

    I prefer the lesser-known Sortino Ratio to the Sharpe Ratio. The Sharpe Ratio punishes a trading strategy for any form of volatility. The Sortino Ratio only punishes downside volatility. That makes more sense to me.

    • erick says:

      yes i quite agree, but the sharpe is useful for comparing to other funds because it is most often listed for other funds. all of these ratios are only useful in comparison to other funds’ ratios or to a “best practices” metric. whether one uses a risk-free rate from the s&p or t-bond really does not matter; the “correct” risk-free rate is what other people use so you can compare properly.

Leave a Reply

internal_server_error <![CDATA[WordPress &rsaquo; Error]]> 500