The Meixner process is a four-parameter Lévy process that originated in the study of orthogonal polynomials and has been shown to be able to reproduce stock returns on several major exchanges with remarkable accuracy. In this Demonstration we test this fact for the S&P 500 index, following results described in . We obtained the date for S&P 500 using the Mathematica
. We used the Mathematica
to obtain a smooth density function approximating the distribution of the data. We then compared the distribution thus obtained with the Meixner distribution using Shoutens' parameters. This confirmed that the Meixner distribution does indeed provide an excellent fit to the data. We then again used the function FinancialData
to obtain S&P 500 index prices for the following decade. Although the new fit was somewhat worse, we found that by manipulating the parameters by hand, using Mathematica
's dynamic functionality we could quickly obtain a better fit. We used the distance in variation (the integral of the absolute value of the difference between densities) as a measure of the goodness of fit, as Mathematica
is able to compute it remarkably quickly. The value obtained by hand is included as a bookmark with the name "better fit". Finally, using this value as a starting value and applying the function NMinimize
to the distance in variation, we were able to find a fit to the data for the 2001–2010 period that is almost as good as the one obtained by Schoutens for the earlier one.