Author

Topic: Trading strategy using genetic algorithms (Read 611 times)

newbie
Activity: 7
Merit: 0
July 18, 2017, 05:30:23 AM
#5
Ok, this is fantastic. Thanks for evolving how we track bitcoin prices and activity. I presume you're doing this to come up with more reliable predictive analytics so we can all determine which direct the future price and activity is heading?

A few questions:

(1) Have you test your information to prove that your genetic algorithm correctly predicts (relatively speaking of course) the future?

(2) What's your track record for getting it right?

(3) How do we us your predictive analytics to help our buying or selling behavior?

Maybe you're not to that point yet, maybe you're at the point of sharing the analysis. All of it's good, just excited to see where this takes us!

This strategy still uses tehnical analysis and its lagging indicators, so it can't predict the future. The algorithm is excelent at spotting patterns, better than we humans are. It can't predict black swan events, it can't predict mtgox event or coinbase going offline... well maybe that last one it can Smiley The point is, it spots events faster than we usually can, but it can't forsee them. At least not yet.

We are developing a more general strategy that should work on any market and should adapt to any market conditions. We are also working on something that is not just using lagging indicators for its strategy, but it is still too early to say anything about it.

You can see the track record from results, it spots uptrends really well and is usually very quick at correcting itself if it's wrong. It won't try to catch falling knives and it won't try to sell the top too often. The goal was to beat buy&hold strategy, which it did.


It is not that hard to find the "correct" strategy in backtesting. The algorithm using GA will evolve some magic formula for the backtest dataset and craft the strategy for it. Here is one example - http://imgur.com/xnDBnia. The problem is, if you adjust a dataset just a bit, the strategy won't be necessary best anymore. If you shift the candlestick just for a few minutes, you can get very different results - http://imgur.com/nnE44Ci
It was a real challenge to find a strategy that works on more general datasets. This is where GA helps the most.
legendary
Activity: 1232
Merit: 1000
You are trying to use wrong avenues to try and sell your algorithm.
300 ETH = 60k USD. People over here try and sell digital accounts for a few cents. Even if your algorithm is actually worth it, it is way out of the league of users of this forum.
sr. member
Activity: 686
Merit: 250
hero member
Activity: 1106
Merit: 638
Ok, this is fantastic. Thanks for evolving how we track bitcoin prices and activity. I presume you're doing this to come up with more reliable predictive analytics so we can all determine which direct the future price and activity is heading?

A few questions:

(1) Have you test your information to prove that your genetic algorithm correctly predicts (relatively speaking of course) the future?

(2) What's your track record for getting it right?

(3) How do we us your predictive analytics to help our buying or selling behavior?

Maybe you're not to that point yet, maybe you're at the point of sharing the analysis. All of it's good, just excited to see where this takes us!
newbie
Activity: 7
Merit: 0
We invented our own trading method using genetic algorithms for optimizations. We focused on Bitcoin and Ethereum because of high volatility and liquidity of a market.
We are using our own market indicators which we are ran through GA (genetic algorithm). We found out it preforms better than other very popular indicators like RSI, MACD, DEMA...

Our algorithm runs on any candlesticks sizes, the more data it has, the better it performs. It is not dependent on time. If you run MACD/RSI/DEMA on small candlesticks it performs very poorly.

Here are the results (fee 0,25%, slippage 0,05):

since this year's bull market
http://imgur.com/TsP7jlc
Code:
Entry at Exit at Exposure Entry balance Exit balance P&L Profit
2017-03-10 21:10 2017-03-18 05:29 7 days 1.014 2.309 1.295 127.775
2017-03-19 00:36 2017-03-20 02:39 a day 2.302 2.535 0.233 10.135
2017-03-20 14:06 2017-03-25 22:57 5 days 2.527 3.069 0.542 21.455
2017-03-28 06:14 2017-03-28 07:58 2 hours 3.060 2.959 -0.101 -3.304
2017-03-29 21:12 2017-03-30 00:17 3 hours 2.950 2.822 -0.128 -4.335
2017-03-30 13:44 2017-03-30 17:51 4 hours 2.814 2.723 -0.091 -3.233
2017-04-12 19:20 2017-04-17 06:05 4 days 2.715 3.022 0.307 11.326
2017-04-22 17:57 2017-05-01 21:03 9 days 3.013 3.970 0.957 31.763
2017-05-02 14:22 2017-05-03 01:36 11 hours 3.958 3.782 -0.176 -4.447
2017-05-03 06:18 2017-05-05 01:44 2 days 3.771 4.231 0.460 12.189
2017-05-06 15:57 2017-05-07 21:31 a day 4.218 4.206 -0.012 -0.274
2017-05-12 04:07 2017-05-15 21:54 4 days 4.194 4.389 0.195 4.653
2017-05-18 04:13 2017-05-22 02:56 4 days 4.376 6.219 1.843 42.130
2017-05-22 07:12 2017-05-22 09:46 3 hours 6.201 6.372 0.172 2.770
2017-05-23 04:38 2017-05-25 14:39 2 days 6.353 6.266 -0.087 -1.366
2017-05-27 11:48 2017-05-30 09:04 3 days 6.248 7.913 1.665 26.655
2017-05-30 19:24 2017-05-31 15:24 20 hours 7.889 8.389 0.500 6.335
2017-05-31 19:52 2017-06-01 01:49 6 hours 8.364 7.847 -0.517 -6.184
2017-06-01 03:00 2017-06-01 08:02 5 hours 7.823 7.555 -0.268 -3.422
2017-06-06 14:16 2017-06-08 18:14 2 days 7.533 7.559 0.026 0.351
2017-06-09 15:30 2017-06-11 08:48 2 days 7.536 8.827 1.290 17.120
2017-06-12 05:05 2017-06-14 01:44 2 days 8.800 10.387 1.586 18.028
2017-06-14 16:16 2017-06-15 00:18 8 hours 10.355 10.114 -0.241 -2.331
2017-06-15 07:35 2017-06-15 10:46 3 hours 10.084 9.622 -0.462 -4.582
2017-06-15 15:33 2017-06-18 18:44 3 days 9.593 9.959 0.366 3.814
2017-06-20 08:55 2017-06-20 13:34 5 hours 9.929 9.766 -0.163 -1.638
2017-06-20 21:35 2017-06-21 09:42 12 hours 9.737 9.461 -0.276 -2.835
2017-06-22 23:20 2017-06-23 02:22 3 hours 9.432 9.257 -0.175 -1.858
2017-06-26 21:00 2017-06-27 09:13 12 hours 9.229 9.179 -0.050 -0.544
2017-06-27 18:43 2017-06-30 19:47 3 days 9.152 10.452 1.300 14.209
2017-07-14 19:00 2017-07-15 19:28 a day 10.421 10.304 -0.116 -1.115

since latest downtrend market
http://imgur.com/KKHk3Gc
Code:
Entry at Exit at Exposure Entry balance Exit balance P&L Profit
2017-06-04 00:33 2017-06-04 23:11 a day 1.087 1.186 0.099 9.102
2017-06-06 14:16 2017-06-08 18:14 2 days 1.182 1.186 0.004 0.351
2017-06-09 15:30 2017-06-11 08:48 2 days 1.183 1.385 0.202 17.120
2017-06-12 05:05 2017-06-14 01:44 2 days 1.381 1.630 0.249 18.028
2017-06-14 16:16 2017-06-15 00:18 8 hours 1.625 1.587 -0.038 -2.331
2017-06-15 07:35 2017-06-15 10:46 3 hours 1.583 1.510 -0.073 -4.582
2017-06-15 15:33 2017-06-18 18:44 3 days 1.506 1.563 0.057 3.814
2017-06-20 08:55 2017-06-20 13:34 5 hours 1.558 1.533 -0.026 -1.638
2017-06-20 21:35 2017-06-21 09:42 12 hours 1.528 1.485 -0.043 -2.835
2017-06-22 23:20 2017-06-23 02:22 3 hours 1.480 1.453 -0.028 -1.858
2017-06-26 21:00 2017-06-27 09:13 12 hours 1.449 1.441 -0.008 -0.544
2017-06-27 18:43 2017-06-30 19:47 3 days 1.436 1.640 0.204 14.209
2017-07-14 19:00 2017-07-15 19:28 a day 1.635 1.617 -0.018 -1.115
since ETH lifetime
http://imgur.com/RC1iTHR
Code:
Entry at Exit at Exposure Entry balance Exit balance P&L Profit
2015-11-09 01:36 2015-12-03 00:46 24 days 0.999 0.736 -0.263 -26.302
2016-01-28 17:35 2016-02-16 09:58 19 days 0.734 1.330 0.596 81.245
2016-02-21 12:22 2016-03-03 15:25 11 days 1.326 2.755 1.429 107.737
2016-03-04 14:28 2016-03-07 08:48 3 days 2.746 3.038 0.292 10.617
2016-03-08 08:51 2016-03-14 21:59 7 days 3.029 4.022 0.993 32.798
2016-03-15 10:11 2016-03-16 17:39 a day 4.010 3.893 -0.117 -2.930
2016-03-19 08:23 2016-03-19 21:54 14 hours 3.881 3.671 -0.210 -5.409
2016-03-21 03:31 2016-03-24 01:52 3 days 3.660 3.989 0.328 8.972
2016-03-30 06:44 2016-04-07 16:18 8 days 3.977 3.233 -0.744 -18.710
2016-04-16 23:45 2016-04-25 01:47 8 days 3.223 2.820 -0.403 -12.514
2016-04-30 05:37 2016-05-04 20:40 5 days 2.811 3.472 0.660 23.496
2016-05-05 16:39 2016-05-06 11:16 19 hours 3.461 3.341 -0.120 -3.475
2016-05-08 15:34 2016-05-10 00:15 a day 3.331 3.273 -0.058 -1.732
2016-05-10 09:16 2016-05-19 14:41 9 days 3.263 4.840 1.577 48.312
2016-05-19 20:02 2016-05-23 13:32 4 days 4.825 4.716 -0.110 -2.273
2016-05-24 19:19 2016-05-25 14:12 19 hours 4.702 4.278 -0.424 -9.015
2016-05-26 17:59 2016-05-27 00:52 7 hours 4.265 4.108 -0.157 -3.682
2016-05-29 04:17 2016-05-29 18:39 14 hours 4.096 3.792 -0.304 -7.416
2016-05-29 21:33 2016-06-10 10:02 12 days 3.780 3.882 0.101 2.676
2016-06-12 17:39 2016-06-14 15:16 2 days 3.870 4.157 0.287 7.414
2016-06-17 04:09 2016-06-17 07:51 4 hours 4.144 3.850 -0.295 -7.115
2016-06-20 12:59 2016-06-20 13:34 35 minutes 3.838 3.647 -0.191 -4.982
2016-06-20 14:06 2016-06-21 17:15 a day 3.636 4.159 0.523 14.383
2016-06-21 23:47 2016-06-28 02:50 6 days 4.146 4.404 0.258 6.225
2016-06-29 15:24 2016-07-01 04:50 2 days 4.391 4.045 -0.346 -7.876
2016-07-14 02:41 2016-07-26 10:08 12 days 4.033 4.831 0.798 19.784
2016-07-26 15:15 2016-07-26 23:36 8 hours 4.817 4.467 -0.350 -7.268
2016-07-26 23:59 2016-07-28 05:31 a day 4.453 4.577 0.124 2.782
2016-08-02 22:52 2016-08-29 04:24 a month 4.563 5.435 0.872 19.100
2016-08-30 16:13 2016-09-24 10:51 25 days 5.419 5.922 0.503 9.288
2016-09-27 21:10 2016-10-05 21:06 8 days 5.904 5.765 -0.139 -2.359
2016-11-01 22:25 2016-11-09 03:41 7 days 5.748 5.302 -0.446 -7.752
2016-11-22 09:34 2016-11-24 15:39 2 days 5.286 4.706 -0.580 -10.974
2016-11-25 13:13 2016-11-27 20:51 2 days 4.692 4.307 -0.385 -8.214
2017-01-05 12:59 2017-03-18 05:29 2 months 4.294 15.988 11.695 272.372
2017-03-19 00:36 2017-03-20 02:39 a day 15.940 17.556 1.616 10.135
2017-03-20 14:06 2017-03-25 22:57 5 days 17.503 21.259 3.755 21.455
2017-03-28 06:14 2017-03-28 07:58 2 hours 21.195 20.494 -0.700 -3.304
2017-03-29 21:12 2017-03-30 00:17 3 hours 20.433 19.547 -0.886 -4.335
2017-03-30 13:44 2017-03-30 17:51 4 hours 19.489 18.859 -0.630 -3.233
2017-04-12 19:20 2017-04-17 06:05 4 days 18.802 20.932 2.130 11.326
2017-04-22 17:57 2017-05-01 21:03 9 days 20.869 27.497 6.629 31.763
2017-05-02 14:22 2017-05-03 01:36 11 hours 27.415 26.196 -1.219 -4.447
2017-05-03 06:18 2017-05-05 01:44 2 days 26.117 29.301 3.183 12.189
2017-05-06 15:57 2017-05-07 21:31 a day 29.213 29.133 -0.080 -0.274
2017-05-12 04:07 2017-05-15 21:54 4 days 29.045 30.397 1.352 4.653
2017-05-18 04:13 2017-05-22 02:56 4 days 30.306 43.073 12.768 42.130
2017-05-22 07:12 2017-05-22 09:46 3 hours 42.944 44.134 1.189 2.770
2017-05-23 04:38 2017-05-25 14:39 2 days 44.001 43.400 -0.601 -1.366
2017-05-27 11:48 2017-05-30 09:04 3 days 43.270 54.803 11.534 26.655
2017-05-30 19:24 2017-05-31 15:24 20 hours 54.639 58.100 3.461 6.335
2017-05-31 19:52 2017-06-01 01:49 6 hours 57.926 54.344 -3.582 -6.184
2017-06-01 03:00 2017-06-01 08:02 5 hours 54.181 52.327 -1.854 -3.422
2017-06-06 14:16 2017-06-08 18:14 2 days 52.170 52.353 0.183 0.351
2017-06-09 15:30 2017-06-11 08:48 2 days 52.196 61.132 8.936 17.120
2017-06-12 05:05 2017-06-14 01:44 2 days 60.949 71.936 10.988 18.028
2017-06-14 16:16 2017-06-15 00:18 8 hours 71.721 70.049 -1.672 -2.331
2017-06-15 07:35 2017-06-15 10:46 3 hours 69.839 66.639 -3.200 -4.582
2017-06-15 15:33 2017-06-18 18:44 3 days 66.439 68.973 2.534 3.814
2017-06-20 08:55 2017-06-20 13:34 5 hours 68.766 67.640 -1.127 -1.638
2017-06-20 21:35 2017-06-21 09:42 12 hours 67.437 65.525 -1.912 -2.835
2017-06-22 23:20 2017-06-23 02:22 3 hours 65.328 64.114 -1.214 -1.858
2017-06-26 21:00 2017-06-27 09:13 12 hours 63.922 63.574 -0.348 -0.544
2017-06-27 18:43 2017-06-30 19:47 3 days 63.383 72.389 9.006 14.209
2017-07-14 19:00 2017-07-15 19:28 a day 72.172 71.367 -0.805 -1.115
For comparison
MACD
http://imgur.com/XojKrDf
DEMA
http://imgur.com/Buf6jcB

We used Gekko trading bot for backtesting and Poloniex as the exchange. We have been running this strategy for quite a while but we wanted to see how it performs in bear market. It is easy to make money in bull market using almost any strategy but it is hard to make profit in downtrends. It is even harder to be profitable in bull and bear markets with the same strategy.

Link to auction of this strategy: https://bitcointalksearch.org/topic/auction-trading-strategy-using-genetic-algorithms-2028949
Jump to: