Simulation solutions of the Stochastic Differential Equation

dS/S = dt + dX

This is the simplest stochastic differential equation that is used to model asset prices -- its solution is a lognormal random walk with drift coefficient and diffusion coefficient .

By the analysis in the preceding lecture notes, we know to expect the solution S(t) to be a lognormally distributed random variable.

In this simulation, you get to use the slider bars to set and , and then have the simulation repeatedly construct a (lognormal random) path with the parameters you have chosen. You can compare the stochastic simulation (blue graph) with the solution of the deterministic differential equation dS/S=dt (pink graph). At the right of the graph, the number of times the path ends in each of the intervals delineated by the black lines is tallied (after you set and , you can choose how many intervals you would like to consider).

After you have done a number of simulations (you may need to do at least one or two hundred to get good statistics) you can see the results of the simulation (for t=1) summarized against the theoretical probability distribution. In order to help you complete a large number of simulations quickly, you may click on the "many" button to do them 25 at a time.

Step-by-Step Instructions: