Skip to content

lamhochit/crypto-vwap-curve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💰 Crypto VWAP Curves

Motivation

VWAP curve plays an important role in TradFi as it is the basis of many trading algorithms, with VWAP being one of the most common benchmark for execution algorithms. Being able to anticipate volumes going through intraday allows traders to be in line with the market and also take advantage of liquitidy.

Due to TradFi's open/close mechanisms, a "Volume Smile" is using formed, meaning there will be more liquidity at the ends of the open and close auction, forming a smile shape.

Volume Smile

Traders are expected to participate heavily during the start of the AM session and towards the end of the PM session in order to achieve an average price similar to the market VWAP.

As crypto trades 24/7, we try to explore how the volume profile behaves in crypto.

Getting Started

The package allows you to easily retrieve historical volumes from Binance and construct their volume profile. load_historical_data pulls historical candlesticks from the exchange, generate_curves construct curves daily and aggregate them into an average curve.

The below code shows how we construct the cumulative curve for BTC Spot from Binance

from load_curves import load_historical_data, generate_curves

hist_df = load_historical_data('BTC/USDT')
cum_curve_df = generate_curves(hist_df)

Analysis

Intuitively, without open and close auctions, it is unlikely that a volume smile will be formed in crypto markets. However, it is worth noting that the first bin (UTC 0) stands out. Initial guess for the behavior is that similar to TradFi markets, there is often a fixing for portfolios and people often choose 00:00 as the rebalance time, which leads to a spike in volume.

BTC Spot Bin Curve BTC Spot Cum Curve

ETH Spot Bin Curve ETH Spot Cum Curve

A similar pattern is also observed for Perps.

BTC Futures Bin Curve BTC Futures Cum Curve

ETH Futures Bin Curve ETH Futures Cum Curve

However, the volume profile seems to exhibit weak seasonality in 8 hour intervals. Which is likely to be related to the settlement mechanism of perpetual futures (funding rates are paid out every 8 hours).

Releases

No releases published

Packages

No packages published