Options
Volatility Algorithm
Volatility Algorithm
Every time a user buys, sells, or exercises an option, the volatility value is updated like this:
Where:
r_{t-1}uses simple returns wherer_{t-1}=P_{t-1}/P_{t-2} - 1P_tis the oracle price at timetlambdais the decay factorsigmais the volatility, calculated by taking the square rootsqrt(sigma_t^2)