-
Notifications
You must be signed in to change notification settings - Fork 2k
Add strategy: forex.analytics, an genetic optimization algorithm for TA-lib stats #389
Conversation
…te e.g. candlestick data for model training.
- Add option to `sim` to disable writing HTML results
Could separating data fetching and training be an idea? Reason is the exchanges that don't provide trade history, like Bitstamp, BTCe and probably more. Then data fetching (possibly without any screen output) could be running uninterupted even if trade stops for shorter or longer periods. Program name could be fill.js as an alternative to backfill.js |
As discussed on #developers/Discord: This is a general problem for these exchanges, since simulations will also not work properly in the moment, just Thank you! |
- Limit width of progressbar in training to 80 cols
- Fixed hang when not using a test dataset - Changed default indicators
…crubb/forex.analytics
Model files are overwritten each time, when training with the same parameters. It would be nice to have sim/test results as pct. gain/loose as a part of a filename - that would solve the issue with overwriting, and would let easily find the best model. |
D'oh.. That does explain some of the variance in my results :D |
;) Yeah, same with me - I had some promising model for BTC-USDT, then just realized, that files are overwritten... Retard me... I could make a copy. |
@@ -0,0 +1,87 @@ | |||
var z = require('zero-fill') |
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.
would be really awesome to get a brief commented rundown of what this strategy does.
crubb, can you add "--reverse" option to allow trades with reversed buy/sell signals? 2017-07-21 05:00:00 0.00000717 STR-BTC -0.8% 2.18m 57 ++ 0.1106 0.0337 buy |
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.
The only real comment I have is that I would expect an entry in the /docs/
on how to use the training model, at least with a simple usage example. Other than that I think this code is fine and is ready to be used by more people so we can get more eyes and comments on it.
commands/sim.js
Outdated
@@ -63,6 +64,7 @@ module.exports = function container (get, set, clear) { | |||
so.start = d.subtract(so.days).toMilliseconds() | |||
} | |||
so.stats = !!cmd.enable_stats | |||
so.show_options = !!!cmd.disable_options |
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.
TIL :)
- Add a check for unknown indicators
Documentation added. |
…os8f-master * 'master' of https://github.com/carlos8f/zenbot: Improve command help for train command (DeviaVir#436) Support for missing win/loss and error rate from output (DeviaVir#426) Fix docker builds for forex.analytics (DeviaVir#424) Minor fixes for Quadriga trading API (DeviaVir#421) xmpp for trading alarms (DeviaVir#333) Strategies: TA (ema+macd) and Trust/Distrust (DeviaVir#285) Fixed docker build (DeviaVir#349) updated c.default_selector to c.selector in README.md (DeviaVir#418) added check for message before doing anything with it (DeviaVir#412) FIX: Properly check for unknown indicators in forex_analytics (DeviaVir#408) Added support for the BTCe exchange (DeviaVir#388) Add strategy: forex.analytics, an genetic optimization algorithm for TA-lib stats (DeviaVir#389) # Conflicts: # .gitignore # commands/sim.js # extensions/exchanges/bittrex/exchange.js # extensions/exchanges/quadriga/exchange.js # lib/engine.js # scripts/auto_backtester/backtester.js
…TA-lib stats (DeviaVir#389) * Add a 'noop' strategy, which just does nothing. Can be used to generate e.g. candlestick data for model training. * - Add option to `sim` to disable output of option - Add option to `sim` to disable writing HTML results * Add forex_analytics training, simulation and strategy (see https://github.com/mkmarek/forex.analytics and DeviaVir#385) * - .gitignore trained models - Limit width of progressbar in training to 80 cols * - Added timezone to datetime displays - Fixed hang when not using a test dataset - Changed default indicators * Windows fixes for sim spawn * Write a final model including sim results (output while training less pretty) * Made train pretty again. Also write simulation Results as HTML files in models/ * Speed up parseSimulation() * Properly name simulation result HTML files after training * - Use the defaults of the forex.analytics project for training - Add a check for unknown indicators * forex_analytics documentation * !!! -> !
See #385 and see https://github.com/mkmarek/forex.analytics
Furthermore:
sim
to disable output of optionsim
to disable writing HTML resultsIt seems to work, but I have no idea what the proper default training options or candlestick length periods should be.
I have not yet done any in-depth training and optimizations, but out of the box and in the current market conditions at least I get some % above buy/hold ;)
First, you have to backfill, then you train a model, e.g.
$ ./zenbot.sh train kraken.XETH-ZEUR --days_training 28 --days_test 7 --period 20m
Running
train
automatically runs simulations on the training and test periods (--days_test
can be0
(default)) and outputs the results.You can then use the model automatically saved in
models/
for trading$ ./zenbot.sh trade kraken.XETH-ZEUR --modelfile models/forex.model_kraken.XETH-ZEUR_period-20m_from-20170704_020000_to-20170709_020000.json --period 20m --paper
Again, this needs optimization on the default parameters and I would love to get feedback from knowledgeable people (@arpheno, @gelotus, @infatrus, ...?).
-- crubb