In this homework, we interested in creating a plot consisting E/P ratio and lagged percentage growth change. The E/P ratio here is the reciprocal of the well-known P/E ratio, which is frequently used to measure a company’s value, which has the prediction ability in company’s future returns. The lagged percentage growth change is a measurement of the company past 3 years average growth change. By plotting this two variable, which can give us an indication of the relation between investor’s paying for the stock to the company’s earning.
To study the problem, the data was imported form the WRDS CRSP database and this report provided the P/E figure as well as the summary statistics of the final merged data set. The figure has E/P on the y-axis, and (the 3-year average of the) lagged change in percent earnings on the x-axis. The point radius was sized by the log-firm-cap. One to mention, X and Y are both truncated at \(10^{th}\) and \(90^{th}\) quantiles.
E/P ratio: \[\text{E/P ratio} = \frac{\text{Earnings Per Share}}{\text{Stock Price}}\]
3-year average of the lagged change in percent earnings \[\text{Percentage change} = \frac{\text{Beginning Balance - Final Balance}}{\text{Beginning Balance}}\]
Log-firm-cap \[\text{Log-firm-cap} = log(\text{Shares Outstandings} \times \text{Stock Price})\]
Variable included explanations:
GVKEY: Standard and Poor’s Identifier The fundamental Compustat company identifier.
FYEAR: Fiscal Year
This item represents the fiscal year of the current fiscal year-end month.
CSHO: Common Shares Outstanding This item represents the net number of all common shares outstanding at year-end, excluding treasury shares and scrip.
EPSPX: Earnings Per Share (Basic) Excluding Extraordinary Items This item represents basic earnings per share before extraordinary items and discontinued operations.
RE: Retained Earnings This item represents the cumulative earnings of the company less total dividend distributions to shareholders.
PRCC_F: Price Close - Annual - Fiscal
## ep.ratio change mkt.cap
## Min. :-0.210000 Min. :-21.379 Min. : 1.842
## 1st Qu.:-0.009897 1st Qu.: 2.621 1st Qu.: 6.854
## Median : 0.024504 Median : 9.838 Median : 8.399
## Mean : 0.009917 Mean : 11.849 Mean : 8.325
## 3rd Qu.: 0.052729 3rd Qu.: 19.406 3rd Qu.: 9.917
## Max. : 0.102894 Max. : 53.956 Max. :14.309
Most company’s EP ratio are in between \([-0.1,0.1]\). From the plot, the E/P ratio does not have an impact on lagged change in the percent earnings. The company with -20% loss or 40%+ gain may have same E/P ratio. The clustering are around 0-20% percent change which have a positive E/P. The negative E/P ratios are sparsely distributed for the companies with more than 20% loss or more than 40% growth. The main take away from this may be if your are on a steady growth, you are more likely to have the positive E/P ratio. The possible reason might be belief in consecutive growth indicating a promising future.
#drop no-use cols
data = hw6 %>% select(GVKEY,fyear,csho,epspx,re,prcc_f)
#calculate ep ratio
ep.ratio = data %>%
filter(fyear == 2020) %>%
group_by(GVKEY) %>%
summarise(ep.ratio = epspx/prcc_f,.groups="drop") %>%
drop_na()
#truncate ep.ratio
ep.ratio.tr = ep.ratio %>%
filter(ep.ratio > quantile(ep.ratio,0.1,na.rm=T) & ep.ratio< quantile(ep.ratio,0.9,na.rm=T))
#calcualate percentage change
pct.diff = data %>%
group_by(GVKEY) %>%
summarise(change = mean(diff(re)/re[-1])*100,.groups="drop") %>%
drop_na()
#trunctate mkt.cap
pct.diff.tr = pct.diff %>% filter(change > quantile(change,0.1,na.rm=T) & change< quantile(change,0.9,na.rm=T))
merge.data = inner_join(ep.ratio.tr,pct.diff.tr, by = "GVKEY")
#calculate market cap
market.cap = data %>%
filter(fyear == 2020,GVKEY %in% merge.data$GVKEY) %>%
group_by(GVKEY) %>%
summarise(mkt.cap = log(csho * prcc_f),.groups="drop") %>%
drop_na()
merge.data2 = left_join(merge.data,market.cap, by = "GVKEY")
final.data = merge.data2 %>% select(GVKEY,ep.ratio,change,mkt.cap)
final.data = final.data[complete.cases(final.data),]
#Draw Plot
ggplot(final.data,aes(x=change, y = ep.ratio, size=mkt.cap))+
geom_point(aes(color = mkt.cap),shape=16)+
scale_radius(range=c(0,6),breaks = c(0,5,10,15,20,25,30,35,40,45,50))+
scale_color_gradientn(colours = rainbow(10))+
theme_classic()