The liquidity performance is related to the release of information. Bank of America earnings reports show dates of last 8 reports as
Download data and add the liquidity index. Liquidity index is calculated as
\[L = \frac{|R_t|}{Vol_t}\]
where \(|R_t|\) is the absolute value of the return, \(Vol_t\) is the volume traded. The index is then smoothed over 20 days to get the following results.
require(zoo)
#use the zoo package so that I can use the rollmean function below
BAC <- read.csv("Other/BACLI.csv")
# the part in quotation is whereever your data is stored
BAC$Date <- as.Date(BAC$Date, format = "%d/%m/%Y")
BAC <- BAC[rev(rownames(BAC)),]
BACR <- diff(BAC$Close) / BAC$Close[-length(BAC$Close)]
BAC <- cbind(BAC[-1,], BACR)
#calculate the liquidity index
LI <- abs(BAC$BACR)/BAC$Volume*10000000
LIS <- rollmean(BACR, k = 10)
plot(BAC$Date[1:708], LIS, type ='l', main = "BAC Liquidity Index", xlab = "Date")
#just use the last 708 rows because the rolling mean does not cover whole set
BAC <- cbind(BAC[-c(1:9), ], LIS)
Now add the dates to the graph. As red lines.
plot(BAC$Date[1:708], LIS, type ='l', main = "BAC Liquidity Index", xlab = "Date")
earnings.Dates <- c("14-10-2015", "15-07-2015", "15-04-2015", "15-01-2015", "15-10-2014", "16-07-2014", "16-04-2014", "15-01-2014",
"16-10-2013", "17-07-2013", "17-04-2013", "17-01-2013")
earnings.Dates <- as.Date(earnings.Dates, format = "%d-%m-%Y")
abline(v = earnings.Dates, col = "red")
# abline create a verticle (v) line at earnings dates
There does not appear to be any particular pattern around the time of the earnings reports. However, if we create some dummies for before and after the date, these can be used to assess the
#create the dummy variables
BAC$D1 <- NA
BAC$D1 <- as.numeric(BAC$Date %in% earnings.Dates)
# One day before
BAC$D2 <- NA
BAC$D2 <- as.numeric((BAC$Date + 1) %in% earnings.Dates)
# One day after
BAC$D3 <- NA
BAC$D3 <- as.numeric((BAC$Date - 1) %in% earnings.Dates)
eq1 <- lm(BAC$LIS ~ BAC$D1 + BAC$D2 + BAC$D3)
# lm is the function for a linear model
summary(eq1)
##
## Call:
## lm(formula = BAC$LIS ~ BAC$D1 + BAC$D2 + BAC$D3)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.0168708 -0.0028379 -0.0001725 0.0028923 0.0146551
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0006597 0.0001705 3.870 0.000119 ***
## BAC$D1 -0.0011193 0.0012871 -0.870 0.384814
## BAC$D2 -0.0003293 0.0012871 -0.256 0.798142
## BAC$D3 -0.0011318 0.0012871 -0.879 0.379526
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.004419 on 704 degrees of freedom
## Multiple R-squared: 0.002203, Adjusted R-squared: -0.002049
## F-statistic: 0.518 on 3 and 704 DF, p-value: 0.67
None of the dummies (D1 = 1 on day of earnings; D2 = 1 on day before earnings; D3 = 1 on day after earnings) are statistically significant.
Maybe an event study would be better. More on that later.
Meanwhile,
Thanks to xkcd