So I wanted to price the following Express Certificate with this specific payout structure:
If S1 > S0 -> 105.25 , else ->
If S2 > 0.95*S0 -> 110.5 , else ->
If S3 > 0.9*S0 -> 115.75 , else ->
If S4 > 0.85*S0 -> 121 , else ->
If S5 > 0.65*S0 -> 126.25 , else -> 100*(S5/S0)
S0 to S5 are Stock prices in year 0 up to year 5. If the barrier doesn't get hit, the payout happens and the remaining years can subsequently be ignored, if, however, the stock price is at or below the barrier, no payout will be made that year, instead another comparison will be made in a year with a slightly lower barrier and so on. If year 5 is reached and the underlying price is under 65% of the initial underlying value, the buyer must suffer a loss proportional to the drop in stock value (100*S5/S0), if it's above 65% of the initial value, a payout of 126.25 will be achieved.
Here's my mathematica monte carlo pricer for this express certificate:
I'm using the SE Uploader tool, so I generated this code which you can copy (including the Import at the beginning) into your Mathematica App and it will automatically load my notebook into your current notebook.
Here's also the visual representation of my notebook:
r is the risk-free rate, sigma is the implied volatility, n is the number of iterations and summe is a variable that accumulates the payoffs throughout the loops. a is just there so that the s5 value is not recalculated in the same loop, as my s[x_] function changes with every single call.
What I don't get is why I get a price way above 100, which was the initial issue price for this express certificate. Is my geometric brownian motion formula wrong? Have I made a mistake somewhere in the "for" loop? Any suggestions are greatly appreciated! Thanks!