Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Bot behaves different in real trading than in sim #185

Closed
mifau opened this issue May 23, 2017 · 13 comments
Closed

Bot behaves different in real trading than in sim #185

mifau opened this issue May 23, 2017 · 13 comments
Labels

Comments

@mifau
Copy link

mifau commented May 23, 2017

I was trying to trade on gdax for more than 24h using 4.x bot, and had no transactions (there were no tries of sell/buy at all).
Then I run a simulation for --days 1, and got few transactions.
So I assume there could be a difference between behavior in the simulation and in the real life.

Or maybe I'm just missing something?

@demesm
Copy link

demesm commented May 23, 2017

sim runs on an entire day, quickly, it doesnt trade frequently by default. read the readme

@mifau
Copy link
Author

mifau commented May 24, 2017

By default not, but I'm not on defaults.
ema=18, period=3m....
So I can clearly see that simulation != trade

@mifau
Copy link
Author

mifau commented May 24, 2017

I've verified that today again... (--days 1)
Simulator shows over 11%, when the real life operations gave less than 4% (as shown in second from right column - after reset)

I assume it's just because of time needed to sell/buy in the real life.
Looks like this time is too optimistic in the simulator

@ruimgoncalves
Copy link

In this topic I've been playing around with simulation with --period=1m and the bot makes in 60 days a staggering 4073% over vs by hold in gdax.ETH-BTC. It makes in average 80 trades a day.
After seeing this issues I wonder if it is even possible for the bot to pull this off in the real world.

@demesm
Copy link

demesm commented May 24, 2017

are you guys seriously expecting the same results from live trading as running a sim on dissimilar prices and trends?

@mifau
Copy link
Author

mifau commented May 24, 2017

What do you mean saying "dissimilar' ?
They should be the same if we're talking about same time periods.
If I'm looking at the real life time period...let's say...from yesterday till today (24h)...and then I run simulator with --day 1, time period are the same.
So prices and trends should be as same.
Right?

We can try to make some correction there....by trials&errors at least. Or maybe parameter which will say how much time (or buy/sell trials) are needed to be closer to the real life scenario.

It's not so important though.
Maybe some info in README could help with such comments as mine ;)

@cweagans
Copy link

cweagans commented Jun 8, 2017

@demesm If I run live trading all day today (Midnight to 11:59pm), and tomorrow, I go back and run the simulation on today's data for the same time period, the result should be the same, no?

@carlos8f
Copy link
Contributor

In this topic I've been playing around with simulation with --period=1m and the bot makes in 60 days a staggering 4073% over vs by hold in gdax.ETH-BTC. It makes in average 80 trades a day.
After seeing this issues I wonder if it is even possible for the bot to pull this off in the real world.

I've been doing tests with 1m period aggressive trading (see #246 (comment)) to see how to remedy this false hope in the simulator. I think I will need to apply an avg. amount of slippage to each order, probably 0.045% that I've experienced in live trading.

@githubee
Copy link

githubee commented Jun 16, 2017

My average slippage is higher during the past 24h. I think thats one of the reasons that sim showed +50% or smth and realtime trading yielded -19%. I checked in in sim.

@githubee
Copy link

githubee commented Jun 16, 2017

I also noticed that when the bot is buying the 2nd best bidder price is not reflected in the bot price. I mean the bot is for example trying to buy at 1,100 and the next bidder is 1,099 - which is fine initially. If the next bidder changes his price to 1,050 for example, the bot is not correcting his own bid to 1,051 (which I would expect).

@DeviaVir DeviaVir changed the title Bot bevahes different in real trading than in sim Bot behaves different in real trading than in sim Sep 19, 2017
@ether-btc
Copy link

@githubee you would like to use the option --markup_pct=0.5 (ex. here 0,5%) for that together with the options --order_adjust_time=1000 (ex. here ~1sec) and maybe these options with it as well: --order_poll_time=2500 --wait_for_settlement=2500

--markup_pct puts orders with the %-difference above or below last sell price (sell/buy respectively) and --order_adjust_time corrects those offers in that amount of ms (5000ms = ~5sec)

that is, to my knowledge. I am still figuring things out as a rookie.

@benjamincburns
Copy link

benjamincburns commented Jan 3, 2018

Discussion on #868 is likely relevant. The process of executing an order on the sim is much simpler than with real exchanges. I suspect the bugs I mention in my most recent comment there are to blame for a lot of the discrepancy. That said, there are definitely still plenty of noise sources in real trading which can't be simulated in an exact way - slippages, order depth, etc.

@DeviaVir
Copy link
Owner

Dear issue reporter,

We have slightly changed our github issue policy and would now kindly request folks that have questions that they ask them in our zenbot subreddit.

You can find it here: https://reddit.com/r/zenbot

This issue will be closed, but if you disagree with your ticket being marked as a question feel free to leave a comment defending your case.

Thanks for contributing time and effort!

Greetings,
🤖

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

No branches or pull requests

9 participants