A multichord motional Stark effect MSE system has recently been built on the MAST tokamak. In MAST the π and σ lines of the MSE spectrum overlap due to the low magnetic field typical for present day spherical tokamaks. Also, the field curvature results in a large change in the pitch angle over the observation volume. The measured polarization angle does not relate to one local pitch angle but to an integration over all pitch angles in the observation volume. The velocity distribution of the neutral beam further complicates the measurement. To take into account volume effects and velocity distribution, an ab initio code was written that simulates the MSE spectrum on MAST. The code is modular and can easily be adjusted for other tokamaks. The code returns the intensity, polarized fraction, and polarization angle as a function of wavelength. Results of the code are presented, showing the effect on depolarization and wavelength dependence of the polarization angle. The code is used to optimize the design and calibration of the MSE diagnostic.