Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume Imbalance strategy #9

Open
drew2323 opened this issue Jul 26, 2024 · 0 comments
Open

Volume Imbalance strategy #9

drew2323 opened this issue Jul 26, 2024 · 0 comments

Comments

@drew2323
Copy link
Owner

Introduction

Use real time trade data to extract volume imbalance metrics and add those as additional OHLCV columns.

The component ingests online trade data(I tried with realtime SIP trades data for US stocks, but can be easily adapted to crypto) and during OHLCV aggregation it provides those additional metrics:

  • BuyVolume: The total volume of trades that resulted in an increase in the price.
  • SellVolume: The total volume of trades that resulted in a decrease in the price.
  • BuyTrades (Up ticks): The count of trades that led to a price increase.
  • SellTrades (Down ticks): The count of trades that led to a price decrease.
  • No Change: The count of trades that did not affect the price.

These new columns allow us to calculate various other imbalance metrics such as:

Order Imbalance

  • Net Volume: Difference between Buy volume and Sell volume.
  • Order Imbalance Ratio: Ratio of Buy volume to Sell volume.
    This can help identify periods of imbalance where one side (buy or sell) dominates, which may indicate potential reversals or continuations.

Cumulative Volume Delta (CVD)

  • Cumulative Volume Delta: Running total of Buy volume minus Sell volume.
    CVD can provide a continuous measure of buying and selling pressure over time, highlighting trends and divergences.

Volume Weighted Average Price (VWAP)

  • VWAP Buy: VWAP calculated using Buy volume.
  • VWAP Sell: VWAP calculated using Sell volume.
    Comparing Buy and Sell VWAPs can give insights into the average price levels at which buying and selling are occurring.

Market Profile

  • Price Levels with Highest Buy Volume: Price levels where the most buying volume occurred.
  • Price Levels with Highest Sell Volume: Price levels where the most selling volume occurred.
    Market profile analysis can show where significant buying or selling interest is concentrated, helping to identify support and resistance levels.

Volume Price Trend (VPT)

  • VPT Indicator: Sum of ((Current Close - Previous Close) / Previous Close) * Volume.
    The VPT indicator can help measure the strength of price movements by considering both price and volume changes.

Trade Imbalance Analysis

  • Buy-Sell Ratio: Ratio of number of Buy trades to Sell trades.
  • Buy-Sell Volume Ratio: Ratio of Buy volume to Sell volume.
    These ratios can provide a quick view of market sentiment and potential shifts in buying or selling pressure.

Delta Volume at Price (DVAP)

  • Delta Volume: Difference in volume traded at each price level for Buy and Sell trades.
    DVAP can show the net effect of buying and selling at specific price levels, revealing areas of accumulation or distribution.

Suggested Approach

Utilize VBT to analyze the statistical significance of various metrics, especially across combined timeframes. Use these metrics for entry and exit signals or integrate them with other metrics. Alternatively, they can serve as features for SL models.

Additionally, we can leverage each team member's experience to iteratively build a VBT-supported pipeline for hyperparameter tuning, robustness testing, CV, and WFO. This way, we can maximize the strengths of VBT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant