The NASCAR Investment Strategy

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.

Date Ticker Rank return weights weighted_ret
2018-04-16 MCD 1 0.0013857 0.6321311 0.0008759
2018-04-16 LOW 2 0.0087300 0.2325480 0.0020301
2018-04-16 BUD 3 -0.0083702 0.0855496 -0.0007161

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 e^{-rank} for each rank and then divide by the sum of all e^{-rank} 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).

Screenshot 2018-04-23 23.41.48.png

Screenshot 2018-04-23 23.41.58.png

Screenshot 2018-04-23 23.42.08.png

Screenshot 2018-04-23 23.42.18.png

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.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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