- UID
- 223380
- 帖子
- 289
- 主题
- 51
- 注册时间
- 2011-7-11
- 最后登录
- 2014-8-7
|
3#
发表于 2011-10-2 18:20
| 只看该作者
Usually it involves trying to fit a histogram of a distribution to some kind of theoretical distribution. So, for example, if it were a normal distribution, you'd be looking for the mean and standard deviation of a normal distribution that makes for a best fit between the theoretical and the actual data. If it's another distribution, there are different parameters, and you want to try to find the ones that make for the best fit.
You may have to transform the data before you do that, by the way. If you have levels data for stocks, you might need to turn that into returns to do the fitting. Or logged returns.
How you measure the fit is another challenge. The statistically purest way would be to run up a chi squared test and check for (lack of) significance. A more quick-and-dirty method might be to compute the difference between expected frequencies and observed frequencies for each bin of the histogram and try to minimize the sum of squares of the differences (or sum of absolute values of differences). You could then have solver try to solve for the parameters of your distribution while trying to minimize the sum-of-squares.
It's all a bit challenging if you don't know what distribution you are trying to fit. |
|