Slippage and Spread: how to get them
#1
Smile 
Hey guys!


I know it's a roucky question, but backtesting is a serious thing and i don't really want to set my papertrade with random values.
I read a bunch of thread on here, but i've never found anybody discussing about how to set up slippage and spread (in case there are any, pls tell me Smile )   

Hence the question is: 
how do you guys usually set those 2 values? 
do u get them from the internet (even if i didn't find any website from which get them) or do you calculate them by yourself?


Cheeeers!
  Reply
#2
What I usually do is just look at the orderbook multiple times during different volatility. The truth is that even if you have the perfect numbers actual trading is always different from a simulation (since the act of trading would change order flow).

Not sure if you've seen it, but here is a video that explains slippage and spread: https://youtu.be/r0yc1sonYvo It does feature a random spread calculation but that video is more about understanding the concepts.
  Reply
#3
Ok thank you mike, also for the vid! I got the concepts but i was just wondering if there was a way to get like an average value for them or not... and ok, the answer is no Sad
thanks for the suggestions!
  Reply
#4
The answer is "not yet"!

I am actually working on a new idea around market data within Gekko:

Right now Gekko only stores 1 minute candle data (OHLC), I like to keep this data as it's quite easy to get historically (through the importer for example). I want to store more data that allows every minute: mainly ticker data (bbo and topsize) and maybe depth data (a few numbers, NOT the whole book). But in a way that Gekko uses these numbers if they are available, and defers to the current calculations based on OHLC data if it's not.

This is easy stuff, but I want to come up with a single data format that we don't have to change down the road because:

a) It doesn't have enough data to more accurately simulate orders.
b) It takes up too much data on disk.

Which is why it might take a while.
  Reply
#5
Awesome! Looking forward to see that on gekko.
I'm pretty sure the answer is "no", but Is there also a way to retrieve volume data from gekko? The use of bayes or neural network would be much more precise if we would have also this info available.
  Reply
#6
Just on your slippage point - in the gforms plugin it records the difference between advice price and actual price for live bots and gives you an average difference. It's not slip in the conventional sense but (if my understanding of how backtesting works is right) it gives a realistic figure to use in backtesting  - assuming you have ran a live bot on the market for a bit.
  Reply
#7
Quote:Is there also a way to retrieve volume data from gekko?

You mean general trade volume? Yes: every candle has a volume property, indicating how much asset was traded during this period.

Quote:It's not slip in the conventional sense but (if my understanding of how backtesting works is right) it gives a realistic figure to use in backtesting - assuming you have ran a live bot on the market for a bit.

Yes that would be a great number!
  Reply


Forum Jump:


Users browsing this thread: