Financial Analytics with R (Part 1) – Upside and Downside Capture Ratio


I will be taking a bit of a break from Oil & Gas research. Recently, I was going through the performance of several hedge funds when I noticed an interesting metric: the Upside and Downside Capture Ratio. The Upside and Downside captures an investment’s performance against a reference. This reference is usually an index. The goal of this tutorial is to quantify how a common stock, say Apple, performs against the market. The index chosen to represent the market, Wilshire 5000, is the broadest measure of the U.S economy.

Unlike a linear correlation, the ratios gives better perspective of how dependent an investment is on the market’s rise or fall. For instance, Algonquin Capital, a Toronto-based hedge fund, had an downside capture of -0.51 against the S&P 500 (Algonquin Capital, 2017). This means that, since inception, the value of the investment has grown significantly even in a bear market. The downside capture for a hedge fund should be as low as possible.


Figure 1, As far as mathematics go, the Upside and Downside Capture Ratio is surprisingly intuitive

The Upside and Downside Capture Ratio looks at cumulative return over during market gain and decline respectively (Figure 1). The exponential term gives greater weight to gains/losses reaped over a shorter period of time.

Figure 2, A good hedge fund should be able to deliver above-average returns in both a bull and bear economy. The Upside and Downside Capture Ratio successfully quantifies its ability to do so
I broke the calculations into a series of functions with R. In my next post, I will upload all coding into Github.
#generates data from ticker, calls monthlyReturn and year_sep 
#divide index data into specified range and call the bull and bear functions respectively
  annual_x<<- (x[substr(index(x),1,4)==year | substr(index(x),1,4)==year2])
#divide investment data into specified range and call the bull and bear functions respectively
  annual_y<<-(y[substr(index(y),1,4)==year | y[substr(index(y),1,4)==year2])
#isolate periods of monthly cumulative gain
#isolate periods of monthly cumulative loss
#calculate upside gain
#calculate downside gain 
The Wilshire 5000 Total Market Index was chosen because it provided the broadest measure of the U.S economy. Therefore, it gave a very reasonable approximation of the direction the market was moving overall.
getSymbols(“^W5000”,from = ‘2014-01-01’,to = ‘2016-12-31’)
#clean data with na.omit 

Extracting financial data from Apple was not difficult. I called the cfa method with “AAPL” (Figure 3). The upside return and downside return are also global variables.

Figure 3, Screenshot of my output. Simple, easy and fast.
The results show that the upside and downside capture ratio is 334.9% and -183% respectively across 2015 and 2016. Small sample size for the index was not an issue. 9 months, out of 24, saw a fall in cumulative return for Wilshire 5000 Total Market Index. The remaining months marked a period of growth. Altogether, an investment made in January 2015 on the Wilshire 5000 would yeild 8.1% by December 2016.
Even during a weak market, Apple Inc. (AAPL) demonstrates profitability (Figure 3). The stock price continues to grow – but at approximately half the rate as it would in a rising market. Future steps include cycling through a large database of stocks to rank securities that perform under different circumstances.
The Upward and Downward Capture Ratio quantifies a company’s susceptibility to changes in the market. In creating a portfolio robust enough to withstand market fluctuations, the success of an investment can be attributed to shrewd security selection rather than from outside forces as the market. In the example performed with Apple Inc., I established that the stock will grow even when the market is experiencing a downturn. However, it can not be considered fully independent from the Wilshire 5000 Total Market Index.

Morning Side Investing Glossary. Upside and Downside Capture Ratio. Retrieved 06/23/2017, from

Algonquin Capital. Funds Performance. Retrived 06/21/2017

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s