Density plot of FTSE returns
data( EuStockMarkets )
EuStockMarkets
x = EuStockMarkets[,4]
x = diff( log(x) )
# Plot kernel density estimate
plot( density(x, bw = bw.bcv(x) ), lwd = 2, main="", sub="", ylab="", xlab = "", las=1 )
xx = seq( -0.06, 0.06, 0.001 )
lines( xx, dnorm( xx, mean(x), sd(x) ), lty = 1 )