An Implementation of Quality Minus Junk

David Kane, Ryan Kwon, Anthoney Tsou
May 29, 2015

What is Quality?

Characteristics that an investor should be willing to pay extra for

alt text

How is Quality Measured?

\[ \frac{P}{B} = \frac{\text{profitability} * \text{payouts}}{\text{required return} - \text{growth}} \]

Profitability

Growth

Safety

Payouts

The Quality Minus Junk Strategy

Short low-quality (junk) stocks

Go long high-quality stocks

Results in high risk-adjusted returns

Example Quality Measurements

library(qmj)
data(quality)
keep_quality <- c("ticker", "profitability", "growth", "safety", "payouts", "quality")
head(quality[keep_quality], n = 10)
   ticker profitability      growth      safety    payouts   quality
1    ANGI    -0.1575365 24.55764246 -0.89076389 -1.8699982 21.639344
2    SBCF    -0.9552288 21.17749195  0.23623565 -1.0820805 19.376418
3    UHAL    -0.3350943 19.25596295 -0.16064717 -1.9855567 16.774665
4    GUID     0.2245725 13.61798234  0.09569998 -1.5591484 12.379106
5     BRO     0.1484205 -0.04063592 11.76587071  0.2254432 12.099098
6    CFFN     5.7540587 -0.04904148  5.73770806  0.2292110 11.671936
7    UTMD    -3.3070925 16.48412446 -1.72466975  0.1363612 11.588723
8    CENX    -0.1912805  3.43982232  6.17675052 -0.1956603  9.229632
9     CXW    -0.3283571  3.22020489  4.10097444  0.1910389  7.183861
10    RSE     3.6209141  0.04701919  1.88766753  0.9855644  6.541165

Let's Take a Look at ANGI

Observe change in NI, GPROF, GPROF relative to TA, NI relative to TA over time

library(dplyr)
data(financials)
angi_financials <- filter(financials, ticker == "ANGI")
keep_fin <- c("year","NI", "GPROF", "TA")
angi_financials[keep_fin]
  year     NI  GPROF     TA
1 2011 -49.04  73.63 111.40
2 2012 -52.89 128.72  96.23
3 2013 -32.99 205.57 105.64
4 2014 -12.07 262.25 154.54

alt text

Filtering Companies with Excessively High Singular Components

  ticker profitability   growth     safety   payouts  quality
1   ANGI    -0.1575365 24.55764 -0.8907639 -1.869998 21.63934
head(filter_companies(quality, "growth")[keep_quality], n = 10)
   ticker profitability       growth     safety    payouts   quality
5     BRO     0.1484205 -0.040635919 11.7658707  0.2254432 12.099098
6    CFFN     5.7540587 -0.049041480  5.7377081  0.2292110 11.671936
8    CENX    -0.1912805  3.439822322  6.1767505 -0.1956603  9.229632
9     CXW    -0.3283571  3.220204886  4.1009744  0.1910389  7.183861
10    RSE     3.6209141  0.047019195  1.8876675  0.9855644  6.541165
11   PDCO    -0.7411908 -0.052962782  0.1659304  6.7805708  6.152348
12   MTSC    -0.2509800  2.281272629  3.9553538  0.1548377  6.140484
13    CYS     1.8326580 -0.040161679  3.2979754  0.8379886  5.928460
14    HZO     2.7058184 -0.010954666  1.1415603  1.5434407  5.379865
15    PFG     0.6628262 -0.009983522  4.3283077  0.1303343  5.111485

Customizing Data

data(companies)
# sample_companies <- companies[c(71, 80, 100, 202),]
sample_companies <- data.frame(ticker = c("AFFX", "AGIO", "AIRM", "ARG"), name = rep("_", 4))
raw_info <- get_info(sample_companies)
raw_prices <- get_prices(sample_companies)
custom_financials <- tidyinfo(raw_info)
custom_prices <- tidy_prices(raw_prices)
market_data(sample_companies, custom_financials, custom_prices)[keep_quality]
  ticker profitability     growth       safety    payouts    quality
1   AIRM    0.82518428  1.1491124  0.008294749  0.8367818  2.8193732
2    ARG    0.58935581 -1.1100242  1.353540616  0.2005718  1.0334440
3   AFFX   -0.01039531  0.4530143 -0.334102735  0.4090937  0.5176099
4   AGIO   -1.40414478 -0.4921025 -1.027732631 -1.4464472 -4.3704271

Help Pages

help(package="qmj")
?companies
?get_info

alt text

Thank you!

Installation:

#library(devtools)
#install_github("anttsou/qmj")

Contact Info:

David Kane- dave.kane@gmail.com

Ryan Kwon- rynkwn@gmail.com

Anthoney Tsou- anttsou@gmail.com