Skip to content

Instantly share code, notes, and snippets.

@tvladeck
Last active October 11, 2015 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvladeck/5295f34c842fd81334ea to your computer and use it in GitHub Desktop.
Save tvladeck/5295f34c842fd81334ea to your computer and use it in GitHub Desktop.
Estimate the implied growth of high multiple equities
function (lgr, pe.market, pe.stock, years = 10,
irr = lgr) {
# Args:
# lgr: the "low growth rate", or the expected earnings growth of the
# market at large
# pe.low: the market price / earnings ratio for equities
# pe.high: the p/e ratio of the high multiple equity
# irr: the investor's targeted IRR - most likely this should == lgr
# years: the number of years you want to look out
# Returns: the implied earnings growth of the high multiple equity
years <- 1:years
market.earnings <- 1 / pe.market
stock.earnings <- 1 / pe.stock
# given a growth rate for the "high growth" equity, and a sequence
# of years, this function calcuates the discounted difference in
# revenue between the high-growth equity and the low-growth equity
forgone.earnings <- function (gr) {
sum(( (stock.earnings * (1 + gr)^years) - (market.earnings * (1 + lgr)^years) ) / (1 + irr)^years)
}
# this finds the value of the growth rate at which the
# "forgone.earnings" of the high-growth stock is 0
uniroot(forgone.earnings, c(-1, 10))$root
}
# FB
Implied.Growth.Rate(0.05, 15, 171) #=> ~ 0.50
# Amazon
Implied.Growth.Rate(0.05, 15, 312) #=> 0.61
# LinkedIn
Implied.Growth.Rate(0.05, 15, 1040) #=> 0.86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment