DIA Nexus Documentation
  • Nexus Overview
  • Intro to Nexus
    • How it works
    • Nexus vs. Lumina
    • Integrated Chains
  • Data products
    • Token Price Feeds
    • RWA Price Feeds
    • Randomness
    • Fair-value Feeds
  • How-to Guides
    • Fetch Price Data
      • Solidity
      • Vyper
      • Demo Oracles
      • Chain-specific Guide
        • Aleph Zero
        • Alephium
        • Edu Chain
        • Hydration
        • Kadena
        • LUKSO
        • Somnia
        • Stacks
        • Superseed
        • XRP Ledger (XRPL)
    • Generate Randomness
      • Solidity
      • WASM
      • Demo Oracles
      • Chain-specific Guide
        • Alephium
    • Migrate to DIA
    • Fund the Oracle
    • Build a Scraper
      • Development Cluster Stack
      • DIA Test‐Space with Docker Compose
      • DIA Test‐Space with Minikube
      • Add a new exchange scraper
      • Add a new foreign scraper
      • Add a new liquidity scraper
      • Additional notes
  • Request a Custom Oracle
  • Reference
    • Architecture
      • Data sourcing
      • Data computation
      • Data delivery
    • APIs
      • Token prices
        • RestAPI
          • Request Samples
        • GraphQL
          • Request Samples
      • RWA prices
    • Pricing Methodologies
      • IR: Interquartile Range Filter
      • MAIR: Moving Average with Interquartile Range Filter
      • VWAP: Volume Weighted Average Price
      • VWAPIR: Volume Weighted Average Price with Interquartile Range Filter
      • LST fair price
    • Data Sources
      • CEXes Data
      • DEXes Data
    • Smart Contracts
      • DIAOracleV2.sol
      • DIARandomOracle.sol
    • Randomness Protocol
  • Resources
    • Audits
    • Community & Support
    • Security Bounty Program
    • Research
      • Return Rates in Crypto Farming
      • Crypto Volatility Index
      • Compounded Rates
      • Polkadot Medianizer
    • T&C
      • Licence Agreement
      • Contributor Covenant Code of Conduct
      • Disclaimer
Powered by GitBook
On this page
Export as PDF
  1. Resources
  2. Research

Crypto Volatility Index

PreviousReturn Rates in Crypto FarmingNextCompounded Rates

The CVI is calculated on top of bid/ask information received from crypto (BTC) option markets. First of all, the current level of the orderbook is recorded and placed into a timestamped order. Instruments for each strike price are monitored, both for Call and Put options.

Instruments are named uniquely to identify them. For example, BTC-03JUN2020-6000-C is the name of a Bitcoin call option expiring at 3rd of June 2020 for a strike price of 6000 USD.

To calculate the CVI, the option levels of two dates are considered: The next Friday that is at least one month away from now and the first Friday with available options before that date. With that we ensure that the future market is observed appropriately.

Options typically expire on Fridays only, thus we can only observe them for these dates.

The CVI is then calculated using this formula:

x=100⋅{T1σ12[NT2−N30NT2−NT1]+T2σ22[N30−NT1NT2−NT1]}⋅N365N30x = 100 \cdot \sqrt{\{T_1\sigma_1^2[\frac{N_{T_2} - N_{30}}{N_{T_2}-N_{T_1}}]+T_2\sigma^2_2[\frac{N_{30} - N_{T_1}}{N_{T_2}-N_{T_1}}]\}\cdot\frac{N_{365}}{N_{30}}}x=100⋅{T1​σ12​[NT2​​−NT1​​NT2​​−N30​​]+T2​σ22​[NT2​​−NT1​​N30​−NT1​​​]}⋅N30​N365​​​

where N describe the minutes until the respective event (e.g. minutes in a year, 30 days or minutes until expiry of option T1). T1 and T2 are the fractions of minutes left until expiry of these options compared to the minutes in a full year.

The variances are calculated as such:

σ2=2T∑iΔKiKi2eRTQ(Ki)\sigma^2=\frac{2}{T}\sum_{i}\frac{\Delta K_i}{K^2_i}e^{RT}Q(K_i)σ2=T2​i∑​Ki2​ΔKi​​eRTQ(Ki​)

with the sum of deltas being defined as the intervals between strike prices for each strike price. R is the risk-free lending rate and Q(k) is used to describe the average of the bid-ask-spread for an option K_i.

The CVI starts at a value of 1000.