Olive Docs
Options

Volatility Algorithm

Volatility Algorithm

Every time a user buys, sells, or exercises an option, the volatility value is updated like this:

σt2  =  λσt12  +  (1λ)rt12\sigma_t^2 \;=\; \lambda\,\sigma_{t-1}^2 \;+\; (1-\lambda)\,r_{t-1}^2

Where:

  • r_{t-1} uses simple returns where r_{t-1}=P_{t-1}/P_{t-2} - 1
  • P_t is the oracle price at time t
  • lambda is the decay factor
  • sigma is the volatility, calculated by taking the square root sqrt(sigma_t^2)

On this page