Can Visits to Car Dealers Predict Relative Stock Price Performance of Automotive Manufacturers?

Thomas Young, Ph.D.
5 min readSep 1, 2021

--

A Case Study of Using STATA to Analyze Big Data

Source: @marcusp via Unsplash

Knowing how car dealers are doing can be valuable information prior to the release of their quarterly financial reports. One potential gold standard source for data on how car dealers are doing is cell phone point-of-interest data. In this study, SafeGraph’s data was used to inspect visits to car dealership locations to four large dealers — GM, Ford, Toyota, and Honda. This information was then connected with the stock price performance of each respective company and analyzed for a potential relationship.

Getting started

To get going, the first step was to gather mobility data from SafeGraph’s repository. For academics, this data is free by simply signing up with your .edu email address. For non-academics, the best place to start is with the sales team at SafeGraph. They’ll walk you through the details.

@Fabio via Unsplash

Downloading the data

The raw data will show up with the .gz file extension. This is a compressed format. To create a complete series, you’ll need to combine all the files. The following example code extracts one month of data and creates a STATA .dta file for that month.

clearcd “D:\SafeGraph\MonthlyDec2020toCurrent\patterns\2021\08”local parts “1 2 3 4”foreach x of local parts {append using “patterns-part`x’.dta”, force}save “D:\SafeGraph\MonthlyDec2020toCurrent\patterns\2021\08\y202107.dta”, replace

After creating each monthly file, the data was limited to only the relevant industry and the monthly files were combined together. The following STATA code accomplishes these two tasks.

*Concatenate the data setsclearcd “D:\SafeGraph\automotives”local parts “011 012 101 102 103 104 105 106 107”foreach x of local parts {append using “y202`x’automotives.dta”, force}save “D:\SafeGraph\Automotives\automotives.dta”, replace

The next step was to combine the point-of-interest visit data with the stock market performance data. The ticker symbols for GM, Ford, Honda, and Toyota were extracted and merged with the car dealers’ visit data by day.

After reshaping and cleaning, the code for which is shown below, the raw visits data comprised 47,990,280 firm-day observations (daily observations for each firm) from January 2019 through June 2021 across 81 variables.

use automotivesfreplace raw_visit_counts = 0 if raw_visit_counts == .drop if date_range_start == “”drop if iso_country_code == “GB”drop if iso_country_code == “CA”drop if date_range_start == “”drop if placekey == “”drop if location_name == “”drop if street_address == “”drop if city == “”drop if region == “”drop if latitude == .drop if longitude == .drop brands top_category sub_categorydrop category_tags safegraph_brand_ids parent_placekey phone_number open_hours opened_on closed_ondrop date_range_end tracking_closed_since visits_by_daydrop visitor_home_cbgs visitor_country_of_origin distance_from_home related_same_day_brand related_same_month_branddrop bucketed_dwell_times popularity_by_hour popularity_by_daydrop poi_cbg visitor_home_aggregation visitor_daytime_cbgsdrop iso_country_code geometry_typereshape long day, i(placekey location_name date_range_start) j(day_of_month)

Of note, the analysis included Acura and Honda as part of the Honda, GM/GMC/Chevrolet were included as part of GM, Lincoln and Ford were considered part of Ford, and Lexus and Toyota as part of Toyota.

@yxvi via Unsplash

Raw Visits

The first view of the data follows. Raw visits counts to these four car dealers. Visits peaked in January 2020 at 13.1 million and bottomed at 6.4 million in April 2020 The most recent count was 10.0 million in June 2021.

Geographic Coverage

The next view shows the geographic coverage of the data. As one would expect, SafeGraph raw visits data captures a large swath of the car dealership universe.

The Stock Prices

The next view is the stock price performance of the four companies. Interestingly, since January 2019, the strongest performer has been Ford at 104%, followed by GM at 86%, Toyota at 50% and Honda at 22%.

Visits for the Four Companies

The next view has visits for the four companies. GM has the largest reported visits, followed by Ford, Toyota, and Honda. For June 2021, GM had 1,343,000 raw visits, Ford had approximately 737,000 visits, Toyota had 592,000 visits, and Honda had 420,000 visits.

Raw Correlation

The next view is the raw correlation of the month-over-month change in visits with the month-over-month change in each company’s stock price. The overall R-squared of the model is low at 0.06, although the p-value of the change in visits is less than 0.01 with a coefficient of 0.14. What the results really mean, though, is that you can gain an edge on your investing competitor by using alternative data, such as SafeGraph’s point-of-interest counts.

Scatterplot by Company

The last view is the month-over-month percentage change in each company’s stock price with the month-over-month percentage change in raw visits by company. Each colored line represent the linear correlation of the two measured for each company. Can you guess which company has the strongest positive relationship between raw visits and stock price performance?

Interestingly, Ford has the strongest positive relationship, followed by GM. Honda shows a small relationship, while Toyota’s stock price performance has almost no relationship.

Summing up

As one might expect, the alternative data of cell phone tracking from SafeGraph provides insight into where a company’s stock price is heading. In the investing world, this insight can be a gold mine, potentially offering the ability to beat the market (or at least your competitor).

Questions?

I invite you to ask them in the #safegraphdata channel of the SafeGraph Community, a free Slack community for data enthusiasts. Receive support, share your work, or connect with others in the GIS community. Through the SafeGraph Community, academics have free access to data on over 7 million businesses in the USA, UK, and Canada.

--

--

Thomas Young, Ph.D.

Partner @ Econometric Studios, Partner @ Bear White Investments, Associate EconoWest.