INVITE-ONLY SCRIPT
Perpetual swaps basis

What
This is a perpetual swaps basis that works for both BTC and ETH (check settings).
A perpetual swaps basis, or 'perps basis' for short, looks at the price of a perpetual swap contract and compares it to a spot index. The point of the indicator is to see whether the perps market or spot market is trading higher/lower.
Indicator values will be positive when perps are trading higher than spot.
Indicator values will be negative when perps are trading lower than spot.
Analysis
Generally speaking a spot bid is considered bullish because it's a more accurate representation of real demand. When perps are trading higher it's usually because directional traders are aggressively going long which is dangerous/bearish because this is leveraged money that can easily get shaken out. It could also be that perps are trading higher because spot is selling off hard, but this is also bearish so the result the same.
Summary: most of the time a perps premium is bearish, and a spot premium is bullish.
I would never trade based on 'signals' of this indicator alone, but it does offer valuable confluence in your market analysis.
Data
In the settings you can either select the individual basis for each perp contract of the three biggest derivatives venues (Binance, Bybit, OKX) or you can select my custom global basis.
For the individual basis I've recreated to the best of my ability the official spot indices that these exchanges use and compared those to the perp contracts.
For the custom global basis I've made my own weighted perps price index and spot price index and then compared these indices to each other to get a more global overview of how perps are trading versus spot.
The perps index includes the following contracts: Binance linear USDT, Binance inverse USD, Bybit linear USDT, Bybit inverse USD, OKX linear USDT, OKX inverse USD.
The spot index includes the following markets: Binance USDT, OKX USDT, Bybit USDT, Coinbase USD, Kraken USD, Bitfinex USD, Bitstamp USD.
Extra notes
I will update all of the indices when necessary.
Some of the basis' will look weird on certain timeframes if you go far back enough in the past. This is because the OKX USDT spot market data used to be bugged in a weird way on TradingView and this is an important market that I just had to include. So past data that includes this market will look very erratic. This is only a problem for past data, it currently works fine, so current data is correct.
仅限邀请脚本
只有作者授权的用户才能访问此脚本。您需要申请并获得使用许可。通常情况下,付款后即可获得许可。更多详情,请按照下方作者的说明操作,或直接联系ByzantiumScripts。
请注意,此私密、仅限邀请脚本未经脚本版主审核,是否符合网站规则尚未确定。 TradingView不建议您付费购买或使用任何脚本,除非您完全信任其作者并了解其工作原理。您也可以在我们的社区脚本找到免费的开源替代方案。
作者的说明
For access send me an email: TheByzantineGeneral@gmail.com
More info about my indicators you can find here: https://www.byzgeneral.com/indicators
Send me a private message for access to my invite only indicators.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
仅限邀请脚本
只有作者授权的用户才能访问此脚本。您需要申请并获得使用许可。通常情况下,付款后即可获得许可。更多详情,请按照下方作者的说明操作,或直接联系ByzantiumScripts。
请注意,此私密、仅限邀请脚本未经脚本版主审核,是否符合网站规则尚未确定。 TradingView不建议您付费购买或使用任何脚本,除非您完全信任其作者并了解其工作原理。您也可以在我们的社区脚本找到免费的开源替代方案。
作者的说明
For access send me an email: TheByzantineGeneral@gmail.com
More info about my indicators you can find here: https://www.byzgeneral.com/indicators
Send me a private message for access to my invite only indicators.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。