.
gives the inverse cumulative function for the standard normal distribution. It follows that NORMSINV(RAND()) gives a random sample from a standard normal distribution. df['NORMSINV()'] = norm.ppf(df['RAND()']) df Finally, we create a column called S0, that is, the past value of equity at time -T (5