How about this bars?

Hi everyone!



I want to ask your opinion on what I have come up with. Since I don't have access to real volume data, I am working with tick bars. But can I do it better? Lets see.



Inspired on what dollar and volume bars are, I sampled the data in a different way. Starting from raw ticks, I created range bars every X amount of pips (let's say 10 pips, for simplicity).



With that, I also gathered two more features:

  • The amount of ticks that happened between the open and close price of those 10 pips
  • The amount of time elapsed between open and close price of those 10 pips.



    After doing that, I divided the amount of ticks by the elapsed time, so I can get a feature that is meassured in ticks/seconds. I see this like "speed". Its like how fast the market is moving in one direction.



    From range bars, I could extract tick volume, because I have the amount of ticks on each bar. But what if for volume I use that "speed" feature? So I did that and calculated dollar bars with that interpretation of volume. Again, I know that its not true real volume. Is more like a speed meter.



    Now, my question is should I say with the range bars with this speed feature or should I use the "dollar bars". I am posting some statistics of both of them, so you can guide me.



    Tick Bars:



    Plot:

    1000 Ticks tick bars



    Histogram:

    1000 Ticks tick bar histogram



    Range Bars:



    Plot:

    Range bars plot



    Histogram:

    Range bars histogram



    "Dollar bars":



    Plot:

    Dollar bars



    Histogram:

    Dollar bars histogram





    One thing I noticed and it might be an issue is that to make those "dollar bars", first I make range bars and from the close of those range bars, I do the dollar bars. May I lose a valuable information?



    I also added some detailed information using pandas profiling!



    Tick Bars:

    Tick bars close profiling



    Range Bars:

    Range bar close profiling



    "Dollar bars":

    Dollar bar close profiling



    I would like to have your opinions and recommendations. Which type of bars is more suitable for a NN? And which does preserves more information? Is the "dollar bar" I did here any worth?



    I would also like to know which approach is better for this trading with ML algos: classification or regression? I'm actualy using a LSTM NN for regression and it seems to do quite well.



    Thank you in advance!

Hi Mario,



Thanks for a detailed question.

 

Which type of bars is more suitable for a NN? And which does preserves more information? Is the "dollar bar" I did here any worth?


In general, the huge price movement and huge volume occur together. sometimes the volumes are hidden or spread out across multiple brokers. Therefore, this novel approach would make sense to sample more frequently when price movement is high. When you derive range bars and speed (dollar) bars from it there is indeed loss of some information. But statistically, it is not much different. I believe it is worth running a backtest on it and see the effectiveness of it.
 

which approach is better for this trading with ML algos: classification or regression?


In trading, the decision which we often want to make is to buy, sell or no position. And we are less interested to exactly predict the price of an instrument. Even if we predict the exact price we would eventually convert to the buy, sell or no position. In other words, we want to get the direction right.

Therefore, I would suggest using classification algorithms to use in your trading.

I hope this helps!

Thank you.


Additional reading (optional):
https://www.fxstreet.com/education/volume-in-the-forex-markets-useful-or-not-201703091034