Hi Professor Mark,

When calculating Greeks using pathwise method, you have the following paragraph to describe the method for a discontinuous payoff,

"Alternatively, if the payoff, f, is not continuous, one can divide the integrand into areas where f is continuous and perform the integration by parts individually. One then obtains additional terms from the endpoints of the integral over each area, which match the terms from delta functions."

Can you elaborate more the last sentence please? Say we have an option with the payoff:

f = S for 0<=S<1

f = 3-S for 1<= S < 2

f = 0 elsewhere

Yes, it can be done by decomposing it into vanilla calls and puts. It would be grateful if you could illustrate your point based on this example.

Many thanks,

Kelvin