-
Notifications
You must be signed in to change notification settings - Fork 2k
Threaded neural strat. This time it works :) #718
Conversation
…alculation across multiple cores. It can serve as an example for others trying to expand the capabilities of nodejs.
Credits: Brucetus for being a cool dude. Sorry I couldn't help with hitbtc for those 0.01% refunds!!!! Harvard for the code: http://cs.stanford.edu/people/karpathy/convnetjs/docs.html Personal inspiration. Nodejs for including clusters in nodejs8! And symbols support with limited global variables. Everyone else that helped me along the way threading and coding this neural strategy. GNU Parallel for inspiration: https://www.gnu.org/software/parallel/ And all you other folks! Especially that fellow that learned me on how much processing power it takes to create a neural net. Sincerely, JM/TRK
For some reason this is far more profitable config
…statement preroll periods to require trade data or something.
@TheRoboKitten Thx for taking about 70% of the code that I rewrote for you or better: Thanks for using my coding without giving any form of credit. Another thing: you are using the cluster feature but it looks like all your forks do the same work in the neural strategy. Where in the code does it divide the work between all those forks it generates? |
conf-sample.js
Outdated
@@ -11,9 +11,9 @@ c.mongo.password = null | |||
c.mongo.replicaSet = null | |||
|
|||
// default selector. only used if omitting [selector] argument from a command. | |||
c.selector = 'gdax.BTC-USD' | |||
c.selector = 'gdax.LTC-USD' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think BTC is a bit more common.
conf-sample.js
Outdated
// name of default trade strategy | ||
c.strategy = 'trend_ema' | ||
c.strategy = 'trendline' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you that confident that it should become the new default?
const numCPUs = require('os').cpus().length; | ||
// the below line starts you at 0 threads | ||
global.forks = 0 | ||
// the beow line is for calculating the last mean vs the now mean. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: below
package.json
Outdated
"cexio-api-node": "^1.0.4", | ||
"cliff": "^0.1.10", | ||
"codemap": "^1.3.1", | ||
"colors": "^1.1.2", | ||
"commander": "^2.9.0", | ||
"convnetjs": "0.3.0", | ||
"ccxt": "^1.4.77", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You downgraded this from 1.10 to 1.4
Strategy "trendline". Something is broken. Thats trading in paper mode 2017-11-19 11:31:55 6649.75 BTC-EUR 0.00% 0 61 ++ NaN sell 0.00000 BTC 1000.00 EUR +0.00% -0.01% |
Personally try run at min_periods 4000 and then average 105 and short 5 with .1 markup. 👍
This needs to be fixed I admit, I was going to give you credit but I am bad with names. I am considering removing the threaded code, or simply, set your threads to 1 for now. I'll set as default. :) 🔢 |
If you want the PR take it or leave it. I have no future plans to support zenbot due to nodejs limitaitons. |
I´m using the trendline strategy and it is good. For BTC-EUR on gdax need to change the default options, but is having good results on paper mode. |
@vitorego I think the trendline strategy is interesting. It just needs some polishing because it gave me undefined values as trade statistic and that's not very trustworthy :) |
@vitorego What options where you using? |
@halvors: |
@JensvdHeydt I also got that error on bitfinex using pair IOT-USD. I used the same options as I used for gdax pair BTC-EUR:
|
have this PR running on my zenbot but no actions after 36 hours: ./zenbot.sh trade poloniex.STR-BTC --strategy neural It has started to trade now. Had to reboot the container. However, now it trades too often on very tiny profits and too often after exchange fee the trade is negative. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now, I'll merge so we get more eyes on these strats.
Threaded neural strat. This time it works :)
Thanks for everyone and all for inspiration in creating this.
Thanks to Harvard for the code.
Thanks to NodeJS for including clustering in nodejs8!
Thanks to GNU parallel for main inspiration.
Thanks to zenbot, deviavir, carlos8f, the weather man, VertigoRay, OpticTrollz, BruceTus, BobTheSiaCoinGuy, that Japanese guy from napajs that I feel sorry for. Thanks for keeping me sane through coding these strategies. Also thanks for my main inspiration, weather prediction and sliding max-min algorithm for developing the signaling I call sliding 2/3ds averaging prediction.
Please comment, and review as I'd love to have this PR.
Thanks to JensvdHeydt for helping with the speed issue and net creation too! :)
Cluster module is native in nodejs8. Please dev test this for me guys! :) Predict some neural strategies!!