Why is the normal distribution line not appearing? I did succesfully with another data, but not this different data. Thank you.
hist(MSFT$msft_return,
col="red",
xlab="Return",
ylab="Frequency",
main="Return of MSFT")
rug(jitter(MSFT$msft_return))
x=MSFT$msft_return
h=hist(x, col = "red", xlab="Return", ylab = "Frequency")
xfit=seq(min(x), max(x), length=100)
yfit=dnorm(xfit, mean=mean(x), sd=sd(x))
yfit=yfit*diff(h$mids[1:2])*length(x)
lines(xfit, yfit, col="blue", lwd=2)