I have a time series and I would like to plot the pdf of an empirical and the lognormal distribution with the same mean and std deviation.
The code I am using is the following:
[n,x] = hist(SPX,50);
mu = m;
sd = s;
ix = -5*sd:1e-3:5*sd;
iy = pdf('lognormal', ix, mu, sd);
plotting the pdf of the empirical distribution seems to work, but I do not understand what the smaller figures, which looks more than a mountain than as a pdf, is showing me In addition, plotting a lognormal distribution with the same mean and std deviaton does no work. Does anybody have an idea what I am missing?