The Martin Ratio or Ulcer Performance Index was authored by Peter G. Martin. The higher the Martin Ratio the better the instrument’s performance. The main ingredients are current price and a prior price which are adjusted with the user defined safe return. An average and the Ulcer Index are taken; and the Martin Ratio is their quotient. The user must select linear bars but may change the input (close), period length and a safe return value. This indicator’s definition is further expressed in the condensed code given in the calculation below.
How To Trade Using the Martin Ratio
The Martin Ratio may be used to evaluate an instrument’s performance. No trading signals are calculated.
How To Access in MotiveWave
Go to the top menu, choose Study>Performance>Martin Ratio
or go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.
Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.
//input = price, user defined, default is close
//period = p1, user defined, default is 30
//safe = safe return percentage, user defined, default is 2
//av = average, pow = power
//sma = simple moving average
//index = current bar number
//sqrt = square root
safe = safe / 100; //convert percent to decimal BarSize bar = getBarSize(); if (bar.getType() == BarSizeType.LINEAR) barMin = bar.getInterval(); else return; minPerYr = 60*24*30*12; barsPerYr = minPerYr/barMin; adjSafe = Math.pow((1 + safe), p1/barsPerYr) - 1; //safe return per period compounded priorP = price[index-p1]; ret = ((100 * (price/priorP)-1)) - (adjSafe*100); //safe return subtracted here to reflect Sharpe 1994 revision av = sma(index, p1, ret); ulcer = ulcer(index, p1, ret); Plot: martin = av/ulcer;