Theindexpriceiscalculatedbasedontheweightedaverageofthelatesttransactionpricesfrommultipleexchanges.
Eachoptionscontracthasanindex.Forexample,BTC/USDToptionscontractsuseBTC/USDTindexpricetocalculate.Contractsforthesametokenwithdifferentexpirationdatesusethesameindexprice.Forinstance,BTCweekly,bi-weekly,andquarterlyoptionsalluseBTC/USDTindexprice.
Sampledatasampling:getthelatestpriceoftheexchangesinthetablethroughAPIevery6seconds(basedontheindexupdateinterval).
Denominationcurrency:Ifthedenominationcurrencyofanexchangeisdifferentfromthedenominationcurrencyofatradingpair,thedenominationcurrencyoftheexchangewillbeconvertedintothedenominationcurrencyoftheindexpriceaccordingtotheexchangerate.
ExponentialExceptionHandling
Thepriceofasingleexchangedeviatessignificantlyfromotherexchanges.Solutionsareasbelow:Iftherearemorethan2validexchangeswithintheindices,whenthepriceofacertainexchangedeviatesmorethan±3%fromtheaveragepriceofotherexchanges,forsuchexchange,itspricewillbecalculatedas±3%oftheaveragepriceofotherexchanges:Forexample:Let'ssaytheBTCpriceofXexchangeis518USD,andthepricesofotherexchangesare500,501,502,503,504(USD).Theaveragepriceofotherexchangesis502.5,sothepriceofXexchangedeviatesfromothersby(518-502.5)/502.5=3.08%,whichismorethan3%.Insteadof518USD,systemwilltake502.5*(13%)=517.57asXexchange'sprice.Therefore,thefinalindexwillbe(517.57500501502503504)/6=504.59USD
Ifthereareonly2validexchangesintheindex(thereareonly2exchangesintheindex,orduetomarketlosses,someexchangeswillbetemporarilyexcluded).Ifthepricedeviationobtainedbythetwoplatformsisgreaterthan25%,itisconsideredthatthepricedeviationfromtheindexpricecalculatedlasttimeisnormal,andtheotheronehasanoolongindex.Atthistime,theindexpricetemporarilyanchorstheexchangewiththenormalprice.
Iftheindexpriceisbasedonthepriceofonlyoneexchangeatatime(allotherexchangeshavebeenabnormallyremoved).Ifthedeviationbetweentheobtainedpriceandtheindexpriceobtainedattheprevioustimeisgreaterthan25%,itisconsideredthatthereisanoolongindex,andtheindexpriceistakenfromtheprevioustimeprice.
Exchangemarketdataislost.Solutions:Ifacertainexchangefailstoobtainmarketdataatacertainpointintime(theexchangeisclosed,themarketisinterrupted,oranattackisencountered),thepriceatthatpointintimewillbecalculatedbasedonthelatestvalidpriceobtained.Ifthevaliddataobtainedbyanexchangeinthepast100datapoints(10min)islessthan10points(10%),wewillconsiderthepriceofthisexchangetobeuninstructiveandweightthepriceoftheexchange.Temporarilyadjustedto0.Aftertheexchangerecoversdata,ifatleast90ofthepast100datapointsarevalid(90%),thenwewillrestoretheweightoftheexchange.
Singleexchangepricesdeviatedsignificantlyforalongtime.Solutions:Whenthepriceofanexchangedeviatessignificantlyfromotherexchangesforalongtime,webelievethatthepriceofthatexchangemayloseitsguidingsignificance,andthesampleandweightoftheindexwillbeadjusted.Thespecificadjustmentplanissubjecttotheplatformannouncement.
ExchangeRateCalculation
Theexchangerateforperpetualswapsandoptionscontractsissampledfrom"Huobi",whichissampledeveryminute.
https://api.huobi.pro/general/exchange_rate/list
JoininusWeChat:dm19103QQGroup:1083210627Telegram:https://t.me/huobidmofficialHuobiFuturesOfficialMediaAuthenticatorpleaseclickhere>>>
郑重声明: 本文版权归原作者所有, 转载文章仅为传播更多信息之目的, 如作者信息标记有误, 请第一时间联系我们修改或删除, 多谢。