Folks who are invested in Tesla may find the situation somewhat less humorous — Tesla’s stock price has dropped 18% over the past month. That’s a lot to lose, but can it really be causally linked to Musk’s antics on twitter?
As it turns out, yes, it can. Following the approach taken by Alex Hayes and Fabian Dablander, we can use the {CausalImpact} package to compare Tesla’s stock price pre/post Musk’s takeover of twitter, using the S&P500 as a synthetic control.
Code
library(tidyverse)library(riingo)library(CausalImpact)# pull in stock from tiingostonks <-bind_rows(riingo_prices("TSLA"), riingo_prices("SPY") )# adjust for tesla 3-1 stock split in augstonks <- stonks %>%select(ticker, date, close) %>%mutate(close =if_else(date < lubridate::mdy("8/25/22") & ticker =="TSLA", close/3, close))
Looking at the two tickers side by side, Tesla seems to follow the index’s movement until the takeover.
Code
stonks %>%mutate(date = lubridate::as_date(date)) %>%ggplot(aes(x = date,y = close,color = ticker)) +geom_line(linewidth =1) +scale_color_brewer(palette ="Dark2") +facet_wrap(~ticker, scales ="free_y",ncol =1) +geom_vline(xintercept = lubridate::mdy("10/27/22"),linetype ="dashed") +scale_x_date(labels = scales::label_date(format ="%b")) +scale_y_continuous(labels = scales::dollar_format()) +theme(legend.position ="none") +labs(title ="STONKS: Tesla's and S&P500's daily close over the past year",x =NULL,y =NULL,caption ="Data from Dec 16, '21 -- Dec 16, '22")
Plugging this in blindly to CausalImpact() shows that Musk’s twitter antics have had an effect on Tesla’s price.
Prior to Musk’s twitter takeover, Tesla’s shares could be reliably estimated by the S&P500. After the takeover, however, Tesla’s share price has fallen outside of what the model would expect based on S&P500 data. The implied cost to Tesla shareholders is about $77 per share on average, though the credible interval could put the true cost anywhere between $17 and $133 per share.
This makes pretty strong assumptions — that Musk’s antics don’t affect S&P500 prices and that no other event is influencing Tesla’s price but not the S&P500 price. There’s lot’s more worth digging into in the paper (Brodersen, 2015) that {CausalImpact} accompanies. Since this was mostly a quick exploration on a Friday afternoon, however, I’ll leave the additional investigating to the reader. For me, it’s back to watching the site crash and burn.
Citation
BibTeX citation:
@online{rieke2022,
author = {Rieke, Mark},
title = {Chief {Twit}},
date = {2022-12-16},
url = {https://www.thedatadiary.net/posts/2022-12-16-chief-twit/},
langid = {en}
}