kernel fitting

Discussion on Quantitative Methods in Finance
Forum rules
DISCLAIMER: We do not warrant or represent that this forum or its content is free of viruses, worms or other code that might be contaminating or destructive. We cannot guarantee that documents or files downloaded from the Site will be free from viruses and we do not accept any responsibility for any damage or loss caused by any virus. Accordingly, for your own protection, you must use virus-checking software when using the forum. You must not post or provide to us via the forum, any document or file which you believe may contain a virus. You must virus check any document or file which you intend to post or provide to us via the forum. You must ensure that any document or file you intend to post to the forum does not contravene any applicable laws or contravene any person's legal rights. We do not accept any responsibility for any damage or loss you may suffer.
Posts: 2
Joined: Mon Oct 31, 2011 5:09 am

kernel fitting

Postby helenbalchin » Tue Aug 28, 2012 4:08 am

hi carol

in kernel fitting, the optimal band width h is found so that it minimizes the sum of squared errors between the empirical density and the fitted density. I'm not sure what is the empirical density here. How do we get this, given we have a random sample to start with? Also, the fitted density means the fitted kernel function, is this right?

Thank you for your help.


Posts: 815
Joined: Sun Sep 28, 2008 10:30 pm

Re: kernel fitting

Postby coalexander » Tue Aug 28, 2012 8:29 am


I see your point. You use the observed sample x_1, ..., x_n to estimate the fitted density \hat f_h(x) = (nh)^-1 \sum K[(x-x_i)/n] where K is the kernel and h is the bandwidth and then choose h to minimise the weighted sum of squared errors between \hat f_h(x) and f(x) where f(x) is the empirical density....but what is the empirical density? Is it a histogram, in which case it depends on a subjective choice of cell width? Or, is each observation x_i weighted equally, in which case the method will be sensitive to outliers and errors in the sample. Probably the latter in standard kernel-fitting routines, but I guess you can specify which method you like if you write your own code.

Can other forum user chip in here, if they have done more than simply use the matlab automatic functions?

Maybe you get some help from here: ... #bq_u_f6-1 under discussion on fitting piece-wise distributions. I also recommend this excellent article: --- it is very clear and concise and has some easy to follow illustrative examples


Return to “Volume I”

Who is online

Users browsing this forum: No registered users and 1 guest