Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The ad hoc method of parameter estimation used here needs some explaining. It looks like the author is trying to minimize the distance between the two lines on the y-axis which is not traditionally how you fit parameters to a distribution and will lead to weird results.

Notice that if you estimated a Gaussian the traditional way: by just computing mean and sample variance you do get wider tails caused by a higher variance estimate. Likewise the estimations for the Cauchy are definitely off using this technique (and precisely because of the Cauchy's infinite/undefined variance you shouldn't use the mean, like the author does, to estimate the center of the distribution).

Since the author uses mean for the estimate and sample sd in the other code I'm confused why this isn't used as the estimate for the variance in the guassian? If you want to demonstrate some sort of numerical optimization it would be better to use a correct, more standard technique like minimizing the negative log likelihood of the data given the parameters.

On top of all this there's very unnecessary amounts of superfluous R code in here. With rnorm and rcauchy there's no need to role your own sampling function



Hi, I'm the author, thanks for the feedback!

> The ad hoc method of parameter estimation used here needs some explaining

I tried to imitate a "least squares regression" actually. I confess I wasn't sure if this was the most appropriate approach. I will run the analysis again using the more standard technique you suggested and compare the results.

> Since the author uses mean for the estimate and sample sd in the other code I'm confused why this isn't used as the estimate for the variance in the guassian?

The mean value from the density estimate was used for fitting both the Gaussian and Cauchy models because they are symmetric functions, in an attempt to reduce this one-dimensional (single variable) fitting error.

Later on the mean is removed when estimating prices since I was assuming a driftless stochastic process for the underlying stock.


Is this what you mean by "log normalization"? https://www.spec2000.net/08-normalization.htm

I haven't read much further, perhaps you make it explicit later on.


I took the natural logarithm of the stock's daily returns. Then when estimating option prices I performed the reverse operation:

> exp(1) ^ dist[["x"]]

In this link you can find more information: - https://www.google.com/amp/s/quantivity.wordpress.com/2011/0...


OK well that is not commonly called "log normalization". It is called "using log returns".


Fixed that, thanks! (should take effect in a while)


Hi again,

So I ran the analysis again using the standard MLE technique you suggested and got the following results:

- Gaussian Model: σ = 0.0473

- Cauchy Model: σ = 0.1443

Quite an improvement from the original least squares regression approach I used!

You can find the updated plots below:

- [Probability Distributions] https://imgur.com/da8dRzm

- [Option prices chart] https://imgur.com/5hey110


For reference, I just updated the code and plots in the article. I also did some minor changes to the text and fixed an issue with the generation of random samples, which had a small impact in the estimations.

Left some notes at the end describing these changes, along with a reference to the original version.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: