Upside Potential Ratio
The Upside Potential Ratio was authored by Frank A. Sortino. It is designed to evaluate how well an investor is compensated for the risk taken. The higher the Upside Potential 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. The user must select linear bars but may change the input (close), period length, beta and a safe return value. This indicator’s definition is further expressed in the condensed code given in the calculation below.
See Upside Potential Ratio
See also Sortino Ratio
How To Trade Using the Upside Potential Ratio
The Upside Potential Ratio may be used to evaluate a instrument’s performance. No trading signals are calculated.
How To Access in MotiveWave
Go to the top menu, choose Study>Performance>Upside Potential 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.
Calculation
//input = price, user defined, default is close
//period = p1, user defined, default is 30
//minium return = mar = user defined, default is 5 percent
//pow = power, sqrt = squart root
//sma = simple moving average, sdDev = standard deviation
//index = current bar number
barMin = 0; BarSize bar = getBarSize(); if (bar.getType() == BarSizeType.LINEAR) barMin = bar.getInterval(); else return; minPerYr = 60*24*30*12; priorP = price[index-p1]; mar = mar /100; //convert percent to decimal barsPerYr = minPerYr/barMin; pdRet = Math.pow((1 + mar), p1/barsPerYr) - 1; //minium acceptable return/period compounded ret = (((price/priorP)-1)); upside = upside(index, p1, pdRet, RET); .... Method upside(int index, int period, double mar, Object key) ret = 0, upSide = 0, dnSide = 0; for (int i = index-period+1; i lessOr=index; i++) ret = price[i]; if (ret moreThan mar) upSide = upSide + (ret - mar) * (1 / period); endIf if (ret lessThan mar) dnSide = dnSide + Math.pow((ret - mar), 2) * (1 / period); endIf endFor if (dnSide moreThan 0) return upSide / Math.sqrt(dnSide); else return null; endIf EndMethod ....