指数价格由预估指数价格.ECOIN(BTC/ETH/XRP/EOS) 计算得出的,以下通过BTC的指数价格计算来举例。
.EBTC是这些交易所:Bitstamp、CoinbasePro、Kraken、Gemini和Bittrex的加权BTC现货交易价格之和。加权均数(交易量权重)是各个交易所上一个月的月交易量。
这5家交易所中,如果其中有一家的现货价格与其它4家的价格有明显的偏离,那.EBTC也会出现偏差。因此,Bybit会把各个交易所与.EBTC之间的价差也计入考量,由此来计算指数价格。与.EBTC价格相差最大的交易所在指数价格的计算中,权重将是最小的。
$$ \text{交易量权重(A)} = {{ \text{上个月交易量(A)}} \over {{\text{上个月交易量(A)}} + { \text{上个月交易量(B)} }+ { \text{上个月交易量(C)}}}} $$
$$\text{.EBTC} = {\text{交易量权重(A)} \times \text{A报价} + \text{交易量权重(B) } \times \text{B报价} + \text{交易量权重(C) } \times \text{C报价}}$$
$$\text{价差} = {\text{|交易所价格} - .EBTC|}$$
通过各个交易所的价差平方后的倒数进行调整,我们就能得到交易所的权重。
$$ \text{交易所权重(A)} = {{1 \over \text{价差(A)}^2} \over {{1 \over \text{价差(A)}^2} + {1 \over \text{价差(B)}^2 }+ {1 \over \text{价差(C)}^2}}} $$
指数价格就是由交易所的现货价格乘以各自的交易所权重而得来的。
$$\text{指数价格} = ({\text{A报价: } \times\text{交易所权重A)}}) + ({\text{B报价} \times\text{交易所权重B}}) + ({\text{C报价} \times\text{交易所权重C}})$$
当以下条件被触发时,Bybit会暂时从指数计算中移除交易所:
1. 交易所的最新报价超过1分钟没有变化。这样可以剔除流动性不足或服务中断的交易所。
2. 交易所的报价与其他4家报价的平均值偏差超过3%。这样可以避免价格异常的发生。
举例:
1.当各个交易所的BTC报价较为接近时:
$$\text{A报价: } = {$10,048.00}$$$$\text{B报价: } = {$10,046.00}$$$$\text{C报价: } = {$10,056.00}$$ $$\text{.EBTC} = {1\over3} \times {$10,048.00} + {1\over3} \times {$10,046.00} + {1\over3} \times {$10,056.00} = {$10,050.00}$$$$\text{价差(A)} = {|{$10,048.00} - {$10,050.00}|} = $2.00 $$$$\text{价差(B)} = {|{$10,046.00} - {$10,050.00}|} = $4.00 $$$$\text{价差(C)} = {|{$10,056.00} - {$10,050.00}|} = $6.00 $$
各个交易所调整后的权重为:
$$ \text{交易所权重(A)} = {{1 \over {$2.00}^2} \over {{1 \over {$2.00}^2} + {1 \over {$4.00}^2 }+ {1 \over {$6.00}^2}}} = 0.7346938775510203 $$$$ \text{交易所权重(B)} = {{1 \over {$4.00}^2} \over {{1 \over {$2.00}^2} + {1 \over {$4.00}^2 }+ {1 \over {$6.00}^2}}} = 0.18367346938775508 $$$$ \text{交易所权重(C)} = {{1 \over {$6.00}^2} \over {{1 \over {$2.00}^2} + {1 \over {$4.00}^2 }+ {1 \over {$6.00}^2}}} = 0.08163265306122448 $$
因此,.BTCUSD的指数价格为:
$$\text{指数价格} = \text{交易所权重(A)} \times {$10,048.00} + \text{交易所权重(B)} \times {$10,046.00} + \text{交易所权重(C)} \times {$10,056.00} \approx {$10,048.29}$$
2.当某个交易所的报价与其它交易所的报价偏差较大时:
$$\text{A报价: } = {$10,060.00}$$$$\text{B报价: } = {$10,040.00}$$$$\text{C报价: } = {$10,500.00}$$ $$\text{.EBTC} = {1\over3} \times {$10,060.00} + {1\over3} \times {$10,040.00} + {1\over3} \times {$10,500.00} = {$10,200.00}$$$$\text{价差(A)} = {|{$10,060.00} - {$10,200.00}|} = $140.00 $$$$\text{价差(B)} = {|{$10,040.00} - {$10,200.00}|} = $160.00 $$$$\text{价差(C)} = {|{$10,500.00} - {$10,200.00}|} = $300.00 $$
各个交易所调整后的权重为:
$$ \text{交易所权重(A)} = {{1 \over {$140.00}^2} \over {{1 \over {$140.00}^2} + {1 \over {$160.00}^2 }+ {1 \over {$300.00}^2}}} = 0.5041840271699171 $$$$ \text{交易所权重(B)} = {{1 \over {$160.00}^2} \over {{1 \over {$140.00}^2} + {1 \over {$160.00}^2 }+ {1 \over {$300.00}^2}}} = 0.3860158958019677 $$$$ \text{交易所权重(C)} = {{1 \over {$300.00}^2} \over {{1 \over {$140.00}^2} + {1 \over {$160.00}^2 }+ {1 \over {$300.00}^2}}} = 0.10980007702811527 $$
因此,.BTCUSD的指数价格为:
$$\text{指数价格} = \text{交易所权重(A)} \times {$10,060.00} + \text{交易所权重(B)} \times {$10,040.00} + \text{交易所权重(C)} \times {$10,500.00} \approx {$10,100.59}$$
从第二个例子中我们可以看到,当某个交易所的报价与其它交易所有明显偏差时,相较于.EBTC而言,经过权重调整后的指数价格能够更好地用于计算未结盈亏。