this is a question from a quant interview (FO quant for IR Exotics for a big 4). First it might be useful when preparing your interviews, second, any brainstorming will be appreciated. Note that no more information other than the below was given.
Let us consider the following SDE:
$dS_t = \sigma(S_t) dW_t$
$S_0 = S(0)$
We are after $P = E(phi(S_1))$, the expectation of $phi(S_1)$.
Sigma and phi are some arbitrary functions, W is a Brownian motion.
Describe two algorithms that would (approximatively) compute P. One algorithm is a stochastic approach, the other one is a partial differential equation approach.
Code it (in C++ or Java).
- My answer:
1.Simulate the underlying $S_i$
2.Get the $\sigma_i$ using some assumption on the functional form of $\sigma(S_t)$
3.Assume some distribution for the function PHI (for example that is normal) and get the price using the Moment Generating Function of the Normal -i.e. $E(e^X) = e^{\mu+\frac{1}{2}\sigma}$