calibration of a local volatility model

Generally speaking, when calibrating a local volatility model a la Dupire to European vanilla calls, should I use the numerically (PDE or Monte Carlo) solved price for the vanilla call in the cost function or is there an analytical formula for vanillas in local volatility model I could use to speed up the optimization and to reduce the error made in solving numerically for the vanilla call?

I would appreciate any references to this problem.

Thanks

Vanillas, as in ordinary call/put options, are given by their market values. If you refer to vanillas on strikes and maturities not found on the market, then there are no general useful analytic formulas as far as I know (I might be wrong, of course). It would depend on the chosen form of the local volatility parameterization.

A classical reference on how to interpolate and construct local vol from market prices can be found in the article: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1694972 by Andreasen and Huge. This text is quite brief and contains the main ideas, but don't go too much into finer details.

The Master thesis (by a student of Huge) "Calibrating the local volatility model" by Lykke Rasmussen is a nice reference that clears up a lot of the details.

This blog post by Le Floch is also very worth looking at https://chasethedevil.github.io/post/dont-stay-flat-with-andreasen-huge-interpolation/ It seems like piecewise linear interpolation of local vol proxys is a lot more stable than the piecewise constant in the original article.

I have implemented the methods myself (using the linear interpolation of Le Floch). Basically one is constructing a finite difference scheme and combine it with a global minimizer, like Levenberg-Marquardt, to calibrate certain local vol proxy constants.

To get a good stable calibration can be tricky, from my experience, especially calibrating over small time steps where the difference in option prices for different strikes are on completely different scales. But when it works, the calibration is typically excellent.

New and refined methods are developed constantly though, so it is worth to keep an eye on the lastest research.