askmike / gekko

A bitcoin trading bot written in node - https://gekko.wizb.it/
MIT License
10.07k stars 3.94k forks source link

No history for backtest #977

Closed decoye closed 7 years ago

decoye commented 7 years ago

Hey hey,

i tried the current stable and develop releases for some new features. i found out that i am not able to make back tests in the way i am used to.

so my former way way to type node gekko -c config.js -b into the command line.

This now brings me the following error...

2017-08-16 15:13:32 (INFO): Scanning local history for backtestable dateranges.

ERROR: No history found for this market

What exactly am i missing?

The UI also does not find the history data.

askmike commented 7 years ago

Do you have trade history? This behaviour should not have changed that much.

decoye commented 7 years ago

yes trade history is there, 2h hours in history.

askmike commented 7 years ago

2h hours, meaning 2 hours? That's not a lot. If Gekko says it cannot find the history your DB might be corrupted or so..

decoye commented 7 years ago

with a very old gekko version im using 2h of history is very much enough. the db has just been created from this test of the new version.

askmike commented 7 years ago

So you want to run a backtest over 2 hours of history in total? What candleSize do you have in mind? If you run over hourly candles that would only mean it ticks twice before it is over.

decoye commented 7 years ago

it is not in my interest to run real backtests i want to check out the version, and gekko does not find any history.

askmike commented 7 years ago

Could you quickly import a day using the importer and try again? I remember having limited the backtest period, since it doesn't make sense (imo) to backtest over 2 hours.

decoye commented 7 years ago

let me ask you a question, you are not backtesting more than 2 hours of data for a strategy? at what candle sizes are you testing?

askmike commented 7 years ago

you are not backtesting more than 2 hours of data for a strategy? at what candle sizes are you testing?

Is this question directed towards me? If so I don't understand the question.

decoye commented 7 years ago

yes.

your statement was:

I remember having limited the backtest period, since it doesn't make sense (imo) to backtest over 2 hours.

so i wondered if you would not be backtesting for longer then 2 hours.

askmike commented 7 years ago

Ah yes, sorry!

So there is a limit on the backtester in a way where you can not backtest for less than a few hours. You can definitely backtest longer than 2 hours, just not shorter. So if you have less than 2 hours of data you cannot backtest.

decoye commented 7 years ago

2017-08-20 10:27:45 (INFO): Setting up Gekko in backtest mode 2017-08-20 10:27:45 (INFO): 2017-08-20 10:27:45 (INFO): Setting up: 2017-08-20 10:27:45 (INFO): Trading Advisor 2017-08-20 10:27:45 (INFO): Calculate trading advice 2017-08-20 10:27:45 (INFO): Using the strategy: DEMA 2017-08-20 10:27:45 (INFO):

2017-08-20 10:27:45 (WARN): The plugin Trader does not support the mode backtest. It has been disabled. 2017-08-20 10:27:45 (INFO): Setting up: 2017-08-20 10:27:45 (INFO): Performance Analyzer 2017-08-20 10:27:45 (INFO): Analyzes performances of trades 2017-08-20 10:27:45 (INFO):

2017-08-20 10:27:45 (WARN): Performance Analyzer wanted to listen to the undefined, however the is disabled. 2017-08-20 10:27:45 (WARN): Performance Analyzer wanted to listen to the undefined, however the is disabled. 2017-08-20 10:27:45 (INFO): Scanning local history for backtestable dateranges.

ERROR: No history found for this market

decoye commented 7 years ago

this is the whole output that i get

askmike commented 7 years ago

How much history do you have?

On 20 Aug 2017 09:30, "decoye" notifications@github.com wrote:

this is the whole output that i get

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/askmike/gekko/issues/977#issuecomment-323571459, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7MD6__Q32MKb7ZZD8VTWRQ8PeHGjMnks5sZ-6bgaJpZM4O45Y_ .

decoye commented 7 years ago

1 days and 3 hours. I feel like its not writing the history where gkko exoects to find it. But in /history the files are written.

askmike commented 7 years ago

Can you upload your config.js as well as the contents of the history folder?

decoye commented 7 years ago

history.zip sample-config.js.zip

here are the database and the config. ive attached the sample config as its also not working with this one.

askmike commented 7 years ago

Why do you think you have 1 days and 3 days of data? It looks like you don't have any data to me.

decoye commented 7 years ago

Because the log says it runs since 3 days ago :)And makes perfectly fine trades. null

askmike commented 7 years ago

How are you running the trader (UI or CLI)? In case of CLI, what is the config used for the live trader?

decoye commented 7 years ago

I use the cli Command is node gekko -c config.js null

askmike commented 7 years ago

So the same config you zipped above? In that case the problem is that you are not storing candles because you have not enabled the candleWriter. Enable that if you want to store candles to disk!

decoye commented 7 years ago

Oh damn. Okay thats what changed to the version that i am using.I missed that step. Thanks man.In my very old config it was activated by default. null

askmike commented 7 years ago

Ah yes, I will add to the CLI docs that if you upgrade you need to make sure you manually migrate your config!

decoye commented 7 years ago

Thanks mike!

null