https://se.mathworks.com/help/fininst/spreadbyls.html
spreadbyls - Price European or American spread options using Monte Carlo simulations - MATLAB
This MATLAB function returns the price of a European or American call or put spread option using Monte Carlo simulations.
monte carlo simulations