Skip to content
All library documents

Aligning Dollar Bar Sampling Across Multiple Instruments

Article Quant Q&A · Author: apt45

Summary

The document considers how to adapt a return-prediction neural network from time bars to dollar bars when its features and prediction schedule depend on regular clock times. Dollar bars do not arrive at the same time or count across instruments, so the question is how to define consistent prediction events and input features for a multi-asset model.

The proposed idea is to trigger predictions at shared cumulative dollar-volume thresholds. For example, thresholds could be based on the minimum cumulative traded value across instruments, so predictions wait until each instrument has reached a comparable activity level. A dollar-volume threshold could also replace a clock time as a feature reference. The response is brief and illustrative; it gives no empirical comparison, detailed alignment procedure, or guidance on missing observations and differing liquidity. These suggestions are starting points rather than validated modeling rules.

Key ideas

  • Dollar bars replace fixed clock intervals with thresholds based on traded value.
  • A multi-instrument model needs a rule to align observations across instruments.
  • One suggested trigger uses the minimum cumulative volume across instruments.
  • Dollar-volume milestones can serve as feature reference points in place of clock times.

Tags

Full text
# Sampling dollar bars for ML model of multiple tickers


# Sampling dollar bars for ML model of multiple tickers












I have a Neural Network model that provides predictions for the future returns of a portfolio comprising stocks and cryptocurrencies. The original model operates on standard time bars and generates daily predictions at a specific time, utilising processed OHLC (Open, High, Low, Close) candlestick data as input.

My question is general and the details of the model are not important. The most important thing is that the features are computed from the time bars. For example, the input dataset can be the intraday 5min candles for each instrument, where some processing is involved on the values of the candles.

I would like to extend this Neural Network model to make it work with dollar bars, instead of time bars. The first questions that comes to my mind are

- The original model is time-dependent, issuing predictions daily at specific times. When transitioning to dollar bars, this time sensitivity is lost. How can we establish criteria for determining when the model should make predictions? For a single-instrument model, one possible approach might involve assessing the average daily count of dollar bars within a given sampling size and making predictions accordingly. However, when dealing with a multi-instrument model, how can we adapt this criterion?

- What are the most prominent features that can be derived from dollar bars and are suitable for serving as inputs to a neural network? In the earlier example, the input dataset consists of a dataframe containing 5-minute intraday candles. We can reliably anticipate that there will be a 10:00 AM candle for any instrument every day. Consequently, by choosing this candle as a feature, we ensure that the input dataset consistently contains information about the 10:00 AM candle. However, when dealing with dollar bars, there is no assurance that two instruments will share the same dollar bar. So, it seems there is an ambiguity on how I can univocally define the input features for a Neural Network model.

Suggestions? Insights?

## Answer by Shadi (score 0)

https://quant.stackexchange.com/a/77255

- For q1, maybe calculate cumulative volume per day and select n thresholds at which to predict, such as `min(cumsum(volume of a1), cumsum(volume of a2)) in [1M$, 2M$, ...]`

- For q2, instead of "10am" you could use "volume=1M$"

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.