October 2, 2023

How to test an idea on 150 million ticks in half a minute

We will test the crypto on Bitmex, since there you can easily get ticks with directions for free.
Actually, the idea is very simple:
- we buy if the sum of the volumes of the last 5 transactions is more than 500,000
- we sell if the sum of the volumes of the last 5 transactions is less than -500,000
We trade one conditional cue ball (ticker XBTUSD).
We will use R and the QuantTools package.
We write a little code:
How to test an idea on 150 million ticks in half a minute

Results:
How to test an idea on 150 million ticks in half a minute

How to test an idea on 150 million ticks in half a minute

Everything was calculated somewhere in 38 seconds. Of these, 30 seconds took reading ticks from the disk. Below is the time profile label in milliseconds:
How to test an idea on 150 million ticks in half a minute