make a dataset of annotations. add them with geom_vline
annot_df <- data.frame(x=c(.8,.7),
Sample=c('In-Sample','Out-of-Sample'),
Line = rep("S&P 500",2))
#then
~your graphing code~ +
geom_vline(data = annot_df,
mapping = aes(xintercept=x,color=Line)) +
scale_color_manual(values = c("S&P 500"="black"))