MATLAB code for simulating random trading

The code generates a random path for an underlying and simulates the introduction and trading of knock-out calls and puts. One can experiment how trading is affected by the leverage/maturity of the newly introduced products and also by investors' holding period. It also creates figures, like the ones below.