Crypto-Options Volatility Surface Calibration and Arbitrage This project's aim is to calibrate implied volatility surface for options on criptocurrencies.
The necessary data has been pulled from Deribit API (Deribit is world's biggest bitcoin and ethereum options exchange). The file get_data.py contains a class Parser which provides with possibility to either fetch live data for n minutes, or to get historical data using tardis_dev library, but its free usage is limited to getting data for the first day of the month. Corresponding method returns a dataset containing currency, type of the option, days until expiration, strike, mark price, mark implied volatility and underlying price.
For surface calibration, SABR model has been used. SABR is a stochastic volatility model, which attempts to capture the volatility smile in derivatives markets. The name stands for "stochastic alpha, beta, rho", referring to the parameters of the model. File SABR.py makes use of an approximation formula presenting the implied volatility of European call option as a function of strike and today’s forward price, i.e. σ(K,f), derived by singular perturbation analysis by P.S. Hagan and his co-workers[1].
It also implements the closed-form solution of Black-Scholes model.
Non-linear least squares problem is solved using Levenberg–Marquardt algorithm implemented in Levenberg_Marquardt.py.
The main result of the project is the calibrated volatility surface (SABR calibration.ipynb):
Volatility smile has been modeled fairly well:
Testing on new data (test SABR calibration.ipynb) also shows good perfomance:
Implementing other stochastic volatility models, for example, Heston model. Testing different options trading strategies and looking for potential arbitrage opportunities on this market.
[1] P. S. Hagan, D. Kumar, A. Lesniewski, D. E. Woodward: Managing Smile Risk, http://www.math.ku.dk/~rolf/SABR.pdf, 2002.