Inspired by recent headlines like Fear Overtakes Greed in IPO Market after WeWork Debacle and This Year’s IPO Class is Least Profitable since the Tech Bubble, today we’ll explore historical IPO data and next time we’ll look at the the performance of IPO driven-portfolios constructed during the ten-year period from 2004 – 2014. I’ll admit I’ve often wondered how a portfolio that allocated money to new IPOs each year might perform since this has to be an ultimate example of a few headline gobbling whales dominating the collective consciousness. We hear a lot about a few IPOs each year but there are dozens about which we hear nothing.
Here are the packages we’ll be using today.
library(tidyverse) library(tidyquant) library(plotly) library(riingo) library(roll) library(tictoc)
Let’s get all the companies listed on the NASDAQ, NYSE and AMEX exchanges and their IPO dates. That’s not every company that IPO’d in those years, of course, but we’ll go with it as a convenience for today’s purposes. Fortunately, the
tq_exchange() function from
tidyquant makes is painless to grab this data.
nasdaq <- tq_exchange("NASDAQ") amex <- tq_exchange("AMEX") nyse <- tq_exchange("NYSE")
Big time warning alert, not only have we missed companies that IPO’d and are not listed on those exchanges, we have also missed companies that IPO’d and have ceased to exist, i.e. the companies that went bust, i.e. the very companies that would absolutely sacre the heck out of us before we invested in things like recent IPOs. You would need to correct for Major survivor bias should you choose to explore this for actual trading. As we’ll see next time, even without those dead companies, portfolios built upon these IPOs are very risky. And, while we’re on the caveat theme, nothing in this post is financial advice in any way.
Back to the exciting part, the code!
Notice how we pulled in data from three different data sources but our objects have the same column structures. That’s due to some nice work from the
tidyquant authors and it makes our lives easier in the next step, wherein we use
bind_rows() to combine to one object.
After binding these data togther, we
select(symbol, company, ipo.year, sector) to isolate a few columns of interest. We will also filter out any tickers with
ipo.year equal to NA with
company_ipo_sector <- nasdaq %>% bind_rows(amex) %>% bind_rows(nyse) %>% select(symbol, company, ipo.year, sector) %>% filter(!is.na(ipo.year)) company_ipo_sector %>% head()
# A tibble: 6 x 4 symbol company ipo.year sector <chr> <chr> <dbl> <chr> 1 TXG 10x Genomics, Inc. 2019 Capital Goods 2 YI 111, Inc. 2018 Health Care 3 PIH 1347 Property Insurance Holdings, Inc. 2014 Finance 4 FLWS 1-800 FLOWERS.COM, Inc. 1999 Consumer Services 5 BCOW 1895 Bancorp of Wisconsin, Inc. 2019 Finance 6 VNET 21Vianet Group, Inc. 2011 Technology
In the next installment, Jonathan will explore the data set.
Visit Jonathan’s Reproducible Finance Blog to download the R code and complimentary scripts.
Disclosure: Interactive Brokers
Information posted on IBKR Traders’ Insight that is provided by third-parties and not by Interactive Brokers does NOT constitute a recommendation by Interactive Brokers that you should contract for the services of that third party. Third-party participants who contribute to IBKR Traders’ Insight are independent of Interactive Brokers and Interactive Brokers does not make any representations or warranties concerning the services offered, their past or future performance, or the accuracy of the information provided by the third party. Past performance is no guarantee of future results.
This material is from Reproducible Finance and is being posted with permission from Reproducible Finance. The views expressed in this material are solely those of the author and/or Reproducible Finance and IBKR is not endorsing or recommending any investment or trading discussed in the material. This material is not and should not be construed as an offer to sell or the solicitation of an offer to buy any security. To the extent that this material discusses general market activity, industry or sector trends or other broad based economic or political conditions, it should not be construed as research or investment advice. To the extent that it includes references to specific securities, commodities, currencies, or other instruments, those references do not constitute a recommendation to buy, sell or hold such security. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.