Omega.jl icon indicating copy to clipboard operation
Omega.jl copied to clipboard

Analytical Expectations

Open zenna opened this issue 6 years ago • 0 comments

Can we get an analytical expectation in Black Scholes model?

https://github.com/zenna/OmegaModels.jl/blob/master/models/BlackScholes/src/BlackScholes.jl

Value of lastsim is uncertain due to both σ and internal normals.

For instance, if we were to simulate for just just two time steps (and write in a sliglty different way)

x = 0
x1 = normal(x, σ)
x2 = normal(x2, σ)
xy = x2 || (x1, σ)
  • mean(x2) has analytical solution for fixed x1, σ

  • mean(x2 - k) also has analytical solution

  • mean(max(0, x2 - k)) also has analytical solution (truncated gaussian)

  • Do we want rcd wrt to all parents, or just σ? I think it comes down to which aspects of the model we wish to constrain in order to match the expectation. If we only include σ then then the model remains a brownian motion. It will have to find values of σ which make the constaint true. If we include all the other variables then the posterior won't be brownian motion. This means the meaning of implied will be unclear.

  • Should x0 be a random variable? It should probably be the value of the stock today, not zero.

  • If we take rcd wrt to only σ, does there still exist analytical expectations This seems harder to determime. One approach would be to propagate expectatiosn. E.g. expectation of x1 has analytic solution, then perhaps expectation of x2 is expectation of x1, and so on. Is this true?

  • How could we infer/annotate code to get these analytical solutions Related to #117

  • What happens without analytical solution Approximate with samples. What about gradients? Backpropagate through the sampling algorithm. Hard. What if we don't backpropagate, just get a bunch of samples, compute a number.. no this won't work. You;d need to backprop through sampler to get gradients. Might be possible with zygote but very tricky.

zenna avatar Jul 01 '19 23:07 zenna