Pages:
Author

Topic: Gekko - a javascript trading bot and backtesting platform - page 26. (Read 147846 times)

hero member
Activity: 900
Merit: 1000
Crypto Geek
What I mean is that at a setting of 0.80/-0.80 I find that it tends to get to miss the very small timescale(daily), get it wrong on the short timescale(weekly) but get it right on the medium (monthly) scale.

This is of course very general and it hasn't been tested enough. The short weekly timescale is a shame. For example in the log here I have:

What values do you run it at?
Always seems to buy low and sell high for me... but it did catch the more major dips so far which is handy

Been running it for a few days, tweaking it ever so slightly and watching the results.

One thing I've noticed is a profit calculation hasn't been shown afaik for me in the time I've been running the bot in simulation mode.

http://imgur.com/S3ik8WH

Any known reason for this I've missed.

That is what it suppose to do. It follows the flow of the market so if the 'flow' changes a lot in a short time you will lose some money.
But once the market moves big in a certain way for a longer time period you will be on the right side.
sr. member
Activity: 352
Merit: 250
What values do you run it at?
Always seems to buy low and sell high for me... but it did catch the more major dips so far which is handy

Been running it for a few days, tweaking it ever so slightly and watching the results.

One thing I've noticed is a profit calculation hasn't been shown afaik for me in the time I've been running the bot in simulation mode.

http://imgur.com/S3ik8WH

Any known reason for this I've missed.

That is what it suppose to do. It follows the flow of the market so if the 'flow' changes a lot in a short time you will lose some money.
But once the market moves big in a certain way for a longer time period you will be on the right side.
hero member
Activity: 900
Merit: 1000
Crypto Geek
What values do you run it at?
Always seems to buy low and sell high for me... but it did catch the more major dips so far which is handy

Been running it for a few days, tweaking it ever so slightly and watching the results.

One thing I've noticed is a profit calculation hasn't been shown afaik for me in the time I've been running the bot in simulation mode.

http://imgur.com/S3ik8WH

Any known reason for this I've missed.
sr. member
Activity: 287
Merit: 250
Been running it for a few days, tweaking it ever so slightly and watching the results.

One thing I've noticed is a profit calculation hasn't been shown afaik for me in the time I've been running the bot in simulation mode.

http://imgur.com/S3ik8WH

Any known reason for this I've missed.

I heard a couple of things like this, I'll look in to this.

--

I don't have as much free time as I had last month. I am still working on Gekko, however not on the daily basis I was before.
sr. member
Activity: 290
Merit: 250
Been running it for a few days, tweaking it ever so slightly and watching the results.

One thing I've noticed is a profit calculation hasn't been shown afaik for me in the time I've been running the bot in simulation mode.

http://imgur.com/S3ik8WH

Any known reason for this I've missed.
hero member
Activity: 900
Merit: 1000
Crypto Geek
Thanks for your help. I've sent a ( tiny :/ ) tip as thanks.

My idea was to run Gekko on 2 different servers, then if one goes down the other will be doing the same thing anyway as backup.

 It seems Raspberian O/S nodejs is out of date. Debian on the other hand required compiling nodejs but that wasn't too bad. Gentoo was more straightforward

edit, found this:
Code:
terminate called after throwing an instance of 'std::bad_alloc'                 
  what():  std::bad_alloc
on debian with compile nodejs, running again now, but wonder how to get more debug info
sr. member
Activity: 287
Merit: 250

I would guess that using npm -v 1.1.4 with mtgox-apiv2 would probably be ok... just searching for a way to bypass...
recovered node_modules dir from broken HDD and just copied this over, now working...)

In the mean-time I'll try using a debian box to test as well... now compiling nodejs...
( https://sekati.com/etc/install-nodejs-on-debian-squeeze )

...perhaps run 2 lots of gekko at the same time as a backup - if one already trades then the other will just be doubling up on it anyway

If you are still running into trouble I would suggest updating node, v0.6.19 is really old and I think a lot of dependencies need a newer version.

You can run two gekkos (you just have to copy over the config and point one Gekko to the copied and changed config). But once you start Gekko node will load and parse the files and won't use the files on disk anymore at all (they are kept in memory). So with the exception of an error inside nodejs/raspberry or a really strange API response that Gekko cannot handle I won't see any difference in running two of them (unless you want to monitor multiple exchanges, etc.)
hero member
Activity: 900
Merit: 1000
Crypto Geek
It worked before. Queer.

I've been running it on a Raspberry Pi with Raspberian successfully... hmm, what's changed.... I had a external HDD fail but that wasn't the O/S and just data... did a reset... perhaps I had upgraded something which wasn't active until reboot...

Code:
npm ERR! Error: No compatible version found: mtgox-apiv2@'>=1.0.0- <1.1.0-'
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR!     at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR!     at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR!     at next (/usr/share/npm/lib/cache.js:415:44)
npm ERR!     at /usr/share/npm/lib/cache.js:408:5
npm ERR!     at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR!     at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR!     
npm ERR! or use
npm ERR!     reportbug --attach /home/pi/src/gekko/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.6.11+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/src/gekko
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: mtgox-apiv2@'>=1.0.0- <1.1.0-'
npm ERR! message No valid targets found.
npm ERR! message Perhaps not compatible with your version of node?

I would guess that using npm -v 1.1.4 with mtgox-apiv2 would probably be ok... just searching for a way to bypass...
recovered node_modules dir from broken HDD and just copied this over, now working...)

In the mean-time I'll try using a debian box to test as well... now compiling nodejs...
( https://sekati.com/etc/install-nodejs-on-debian-squeeze )

...perhaps run 2 lots of gekko at the same time as a backup - if one already trades then the other will just be doubling up on it anyway
sr. member
Activity: 287
Merit: 250
Code:
ADVICE is to HOLD @ 85.810 (NaN)
which part of config.js do you need?

I just looked into this and Bitstamp has changed their API, Gekko asks for data in a format not supported anymore (old API, new API). This means that Gekko currently does not work on Bitstamp. I am looking into a fix and hope to resolve this ASAP.

(BTW: is there any possibility to git pull without to fill out config.js every time new? - I rename the existent to .bak and copy/paste the settings in the new one)

Well the main reason is that the config is not solid, the settings may change and using an old settings file can result in Gekko crashing. You could place the config somewhere else (or rename like you did) and make a small script with `node gekko config=config.js.bak` to force Gekko to use another file as config. You can read more about that here, though I would advice against this.

Any ideas?

Gekko has dependencies (like momentjs), you can install them by running `npm install` in Gekko's directory.
hero member
Activity: 900
Merit: 1000
Crypto Geek
Code:
module.js:337
    throw new Error("Cannot find module '" + request + "'");
          ^
Error: Cannot find module 'moment'
    at Function._resolveFilename (module.js:337:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:359:17)
    at require (module.js:375:17)
    at Object. (/home/pi/src/gekko/gekko.js:20:14)
    at Module._compile (module.js:446:26)
    at Object..js (module.js:464:10)
    at Module.load (module.js:353:32)
    at Function._load (module.js:311:12)
    at Array.0 (module.js:484:10)

Code:
$ ls -R
.:
config.js  docs  exchanges  gekko.js  logger.js  log.js  mailer.js  methods  package.json  portfolioManager.js  README.md  util.js

./docs:
Advanced_features.md  Backtesting.md  Configuring_gekko.md  Exchanges.md  installing_gekko_on_windows.md  Known_problems.md

./exchanges:
bitcoincharts.js  bitstamp.js  btce.js  mtgox.js

./methods:
exponential-moving-averages.js  historical-candle-fetcher.js  realtime-candle-fetcher.js
(following fresh git checkout)

Any ideas?

legendary
Activity: 2955
Merit: 1049

That's a bug in Gekko, if you could let me know some details (like are you running the latest version, what exchange and interval) I will look into it!
I have updated now
Code:
git pull https://github.com/askmike/gekko.git && npm update
and I am on Bitstamp
interval is 30

still the same
Code:
ADVICE is to HOLD @ 85.810 (NaN)
which part of config.js do you need?

(BTW: is there any possibility to git pull without to fill out config.js every time new? - I rename the existent to .bak and copy/paste the settings in the new one)
sr. member
Activity: 287
Merit: 250
what means (NaN)?
Code:
2013-07-11 12:33:39 (INFO): ADVICE is to HOLD @ 86.840 (NaN)
2013-07-11 13:03:39 (INFO): ADVICE is to HOLD @ 86.400 (NaN)
2013-07-11 13:33:40 (INFO): ADVICE is to HOLD @ 86.200 (NaN)

That's a bug in Gekko, if you could let me know some details (like are you running the latest version, what exchange and interval) I will look into it!

Turning on debug mode will give you much more information. In the settings file their is a line to enable it by changing false to true.

If you do this it might be a good idea to run gekko like this.
Code:
node gekko |& tee GekkoMyLog.txt
This will give split the output of the gekko to the terminal screen but also to a text file so you have everything as a backup in a nice text file. Also handy if you have a problem you can post the file to help determine the problem Smiley

There are a couple of ways to run Gekko silently and log to a file instead of into the terminal, you can use tee if you are using a UNIX platform (AFAIK) like OS X or Linux. You can read some alternatives in Gekko's advanced features documentation.

ah the bot gave me a buy advice around $71 finally.

Basically what's happening is that I only get output when there is a change in advice when I was expecting each hour to say something like "No change detected, advising to HOLD"

I had this before but changed it to log only position changes (buys and sells) so that it's easier to read back a couple of days later. As suggested you can turn on debug mode to get a lot more info but you can also turn on verbose in the profitcalculator part of the config. This way you'll get an update every interval (hourly on default) about your current (simulated) profit.
legendary
Activity: 965
Merit: 1000
what means (NaN)?
Code:
2013-07-11 12:33:39 (INFO): ADVICE is to HOLD @ 86.840 (NaN)
2013-07-11 13:03:39 (INFO): ADVICE is to HOLD @ 86.400 (NaN)
2013-07-11 13:33:40 (INFO): ADVICE is to HOLD @ 86.200 (NaN)

NaN = Not a Number

Could be a bug, or so...
sr. member
Activity: 352
Merit: 250
ah the bot gave me a buy advice around $71 finally.

Basically what's happening is that I only get output when there is a change in advice when I was expecting each hour to say something like "No change detected, advising to HOLD"

Turning on debug mode will give you much more information. In the settings file their is a line to enable it by changing false to true.

If you do this it might be a good idea to run gekko like this.
Code:
node gekko |& tee GekkoMyLog.txt
This will give split the output of the gekko to the terminal screen but also to a text file so you have everything as a backup in a nice text file. Also handy if you have a problem you can post the file to help determine the problem Smiley
legendary
Activity: 2955
Merit: 1049
what means (NaN)?
Code:
2013-07-11 12:33:39 (INFO): ADVICE is to HOLD @ 86.840 (NaN)
2013-07-11 13:03:39 (INFO): ADVICE is to HOLD @ 86.400 (NaN)
2013-07-11 13:33:40 (INFO): ADVICE is to HOLD @ 86.200 (NaN)
hero member
Activity: 900
Merit: 1000
Crypto Geek
ah the bot gave me a buy advice around $71 finally.

Basically what's happening is that I only get output when there is a change in advice when I was expecting each hour to say something like "No change detected, advising to HOLD"
sr. member
Activity: 287
Merit: 250
This is fantastic. I have been pouring over this for the past couple days. Thank you for your work in developing this. On my next BTC buy in will toss a donation your way.

I feel like I have a bit of learning to do in regards to getting this to work before I propose any formal questions for you regarding its operation. I will quickly mention that I installed everything with no problems to speak of but it only gets as far  as displayed down below (ive let it sit for hours). The buy advice (at time of advising) was actually 50cents higher then the highest bid so obviously Im missing something but felt like composing my troubles anyways.
Thanks again. Cheers....

Thanks! Just make sure to tune it in a way that it's profitable. Else it can be a pretty expensive toy.

I am still improving the data retrieving part of the bot (when I have some free time), but I think that the way Gekko asks data is sime time behind the websocket (the source Clark Moody is using). I'll look into this.

I agree, truly fantastic work.
Instead of having the bot pull fixed parameters from the config.js, would it be possible to adjust it so it also accepts parameters via the command line?
And would it also be possible to have the bot auto-append the profit report results to a .csv table, along with the settings used?

Something like:
node gekko --EMA1 10 --EMA2 21 --buy_threshold 0.25 --sell threshold -0.25 --fee 0.6 --output results.csv

That way you could cycle through different parameters very comfortably via a batch file and find the optimal settings.

Edit:
it would be even more comfortable, if there was an option to set upper and lower values and an increment for each parameter in the config.js

Example:
buy_threshold_upper 0.5
buy_threshold_lower 0.1
buy_threshold_increment 0.01
output results.csv

The results of each iteration could be written to a table like this:
buy_threshold sell_threshold amount_of_trades simulated_profit
0.50; -0.25; ...; 200; 1500%; ...
0.49; -0.25; ...; 210; 1510%; ...
0.48; -0.25; ...; 220; 1490%; ...
...
0.10; -0.25; ...; 200; 1200%; ...

Of course, the more variables there are, the more exponential grows the number of possible iterations, I'm aware of that.
But it would be awesome ;-)

Good point, I was thinking about this the other day and I think that I will implement a version with an increment first and log all results in a CSV. Thanks for your thoughts! I'll put it on my todo list when I have some more time.

For a long term goal I was thinking about either particle swarm optimization or an genetic algoritm to optimize the parameters automatically. But at that time I want to have a lot more indicators and a way to use many at the same time (maybe neural network). But this will take a lot of time.

Whats up with the gay picture?

Gekko is named after this pretty rich guy. Profile pic is some other guy who can fly.
legendary
Activity: 922
Merit: 1003
Whats up with the gay picture?
You must be pretty young if you aren't familiar with Wall Street.
newbie
Activity: 28
Merit: 0
member
Activity: 90
Merit: 10
I agree, truly fantastic work.
Instead of having the bot pull fixed parameters from the config.js, would it be possible to adjust it so it also accepts parameters via the command line?
And would it also be possible to have the bot auto-append the profit report results to a .csv table, along with the settings used?

Something like:
node gekko --EMA1 10 --EMA2 21 --buy_threshold 0.25 --sell threshold -0.25 --fee 0.6 --output results.csv

That way you could cycle through different parameters very comfortably via a batch file and find the optimal settings.

Edit:
it would be even more comfortable, if there was an option to set upper and lower values and an increment for each parameter in the config.js

Example:
buy_threshold_upper 0.5
buy_threshold_lower 0.1
buy_threshold_increment 0.01
output results.csv

The results of each iteration could be written to a table like this:
buy_threshold sell_threshold amount_of_trades simulated_profit
0.50; -0.25; ...; 200; 1500%; ...
0.49; -0.25; ...; 210; 1510%; ...
0.48; -0.25; ...; 220; 1490%; ...
...
0.10; -0.25; ...; 200; 1200%; ...

Of course, the more variables there are, the more exponential grows the number of possible iterations, I'm aware of that.
But it would be awesome ;-)
Pages:
Jump to: