Out of nothing but pure curiosity, I explore the profitability of a NASCAR based investment strategy. See the code for this experiment here
In this strategy, one will invest in publicly traded NASCAR sponsors with weights in proportion to the finishing position of the sponsored cars in the previous race. For instance, the Food City 500. Eleven cars had publically traded sponsors that finished, but let’s look at three in the table below.
Out of the cars with publicly traded sponsors, Kyle Larson with McDonald’s finished first, followed by Jimmy Johnson with Lowe’s and Kevin Harvick with Busch Beer. These rank one, two and three. I take for each rank and then divide by the sum of all for that race. The result is asset weights that get applied to the next weekly period of returns.
Before going too far, I will make some points.
- There was no theory behind this approach, just something fun
- This was more of an exercise in data scraping and wrangling
- Many NASCAR sponsors are private, so this was slightly limited
I was surprised to not find clean and readily available NASCAR data lying around. So, I had to improvise and build my own dataset. I found the website RacingReference that did the trick for this job. It has tables of the results of each race. Using a package called
rvest I can quickly pull these down and extract the table elements into a large data frame containing the results of the last 100 races, and their sponsors.
Unfortunately, the tables on RacingReference don’t contain the sponsor’s stock symbol where applicable. Why would it? So, after sorting the sponsors by frequency, I create a list of terms that I can use to link to publically traded companies. For instance, I have the term “FedEx” point to the stock symbol FDX to capture sponsors “FedEx Ground” and “FedEx Freight”. I have “Dew” point to symbol PEP to capture any “Mountain Dew” sponsorships. The list goes on.
I can then join the stock symbols to the race results where appropriate and rank them by finishing position.
For the stock price data, I use Alpha Vantage. This API is free with registration online. I directly query this API for weekly price data for the tickers in my dataset and transform the prices into weekly returns. Each race will determine the weights applied to the next week’s returns.
With all the pieces in place, I can join returns to the race results on the stock ticker symbol and aggregate by date to construct my portfolio returns. See the performance below separated by year (a season is usually Feb – Nov).
While 2016 was a huge success, the rest of the years did not perform all that well. 2016 seems to be driven by big weeks from Dollar General, FedEx, Monster, Lowe’s, and Shell. However, unless I can establish a causal link (or at the least a reliably high correlation I can speculate about) between stock car and stock performance, I’d chalk this up to luck.