Evaluating PDF and CDF given the characteristic function via COS (Fourier-cosine) method. The method is presented in Fang, and C.W. Oosterlee. "A novel pricing method for European options based on Fourier-cosine series expansions." (2008). The implementation in the codes is about approximatin the PDF and CDF of a random variable from its characteristic function, or moment generating function. The method applies to the inversion of the Laplace transform, and was actually implemented to replicate Cont, Sasha, Talreja. "A stochastic model for order book dynamics.". The function in the package is however easy to adapt to a wide class of problems, going beyond the included trivial usage examples.
Martin Magris (2021). COS method (Fang, Osterlee) (https://www.mathworks.com/matlabcentral/fileexchange/67944-cos-method-fang-osterlee), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!