Pages:
Author

Topic: Goomboo's Journal - page 14. (Read 281462 times)

newbie
Activity: 57
Merit: 0
August 11, 2013, 04:44:32 PM
I took a four month chunk off the end of the database to eliminate the abnormal spike in 2013, so the range is from June 2011 to January 2013. Buy and hold is -5%. Behold the results:

DAILY17181920212223242526
10344%335%317%331%327%323%311%311%330%324%
11335%346%331%347%328%311%326%332%324%329%
12348%332%347%324%316%362%324%329%336%341%
13347%339%324%341%362%324%340%334%382%394%
14339%324%334%368%324%327%337%382%433%370%
15324%363%359%329%327%337%419%431%366%376%
16363%359%329%330%337%419%422%369%376%415%
17
         
335%331%337%424%422%368%392%417%418%
18
         

         
337%424%410%368%419%417%418%362%
19
         

         

         
405%368%414%417%418%362%339%
20
         

         

         

         
414%417%437%362%339%339%
21
         

         

         

         

         
437%348%339%339%339%
22
         

         

         

         

         

         
339%339%339%292%
23
         

         

         

         

         

         

         
339%292%286%
24
         

         

         

         

         

         

         

         
286%285%
25
         

         

         

         

         

         

         

         

         
288%
legendary
Activity: 2100
Merit: 1000
August 11, 2013, 09:30:24 AM
1d EMA22+21 with no threshold and 0.6 fees

2013-01-01 07:00 Simulation started. Balance: 1000 USD
2013-01-01 07:00 BUY 74.714 BTC at 13.30
2013-05-13 07:00 SELL 74.714 BTC at 114.82
2013-05-18 07:00 BUY 68.631 BTC at 123.50
2013-06-09 07:00 SELL 68.631 BTC at 107.89
2013-07-30 07:00 BUY 72.092 BTC at 101.48
2013-08-11 07:00 Simulation completed. Balance: 72.092 BTC (7425.52 USD)



if I read this well, this model does not outperform buy and hold: only +643%

our newsletter has fared better :-) (had to throw this in :-))
legendary
Activity: 1470
Merit: 1007
August 11, 2013, 08:57:29 AM
1d EMA22+21 with no threshold and 0.6 fees

2013-01-01 07:00 Simulation started. Balance: 1000 USD
2013-01-01 07:00 BUY 74.714 BTC at 13.30
2013-05-13 07:00 SELL 74.714 BTC at 114.82
2013-05-18 07:00 BUY 68.631 BTC at 123.50
2013-06-09 07:00 SELL 68.631 BTC at 107.89
2013-07-30 07:00 BUY 72.092 BTC at 101.48
2013-08-11 07:00 Simulation completed. Balance: 72.092 BTC (7425.52 USD)

Thanks.

So that's 72 btc vs. 74 btc that buy&hold would have given you. Supports the "the number are off" hypothesis.

I'll take a look at the code later (gekko is on github, right?) but I have an idea what could lead to the error, unless Erebusbat comes back earlier and solves the mistery :P
hero member
Activity: 514
Merit: 500
August 11, 2013, 08:22:00 AM
1d EMA22+21 with no threshold and 0.6 fees

2013-01-01 07:00 Simulation started. Balance: 1000 USD
2013-01-01 07:00 BUY 74.714 BTC at 13.30
2013-05-13 07:00 SELL 74.714 BTC at 114.82
2013-05-18 07:00 BUY 68.631 BTC at 123.50
2013-06-09 07:00 SELL 68.631 BTC at 107.89
2013-07-30 07:00 BUY 72.092 BTC at 101.48
2013-08-11 07:00 Simulation completed. Balance: 72.092 BTC (7425.52 USD)

legendary
Activity: 1470
Merit: 1007
August 11, 2013, 07:14:19 AM
I checked my numbers, and I had stupidly entered the dollar result rather than the percentage profit. Here are the real numbers:

            4H        DAILY
10, 21   1473%   1582%
11, 21   1509%   1586%
12, 21   1531%   1714%
13, 21   1412%   3056%
14, 21   1279%   2813%
15, 21   1395%   2833%
16, 21   1550%   2698%
17, 21   1663%   3251%
18, 21   1555%   3174%
19, 21   1990%   3074%
20, 21   1990%   3376%

The best number I've found so far in my experimental meanderings has been the 21, 22 on the daily chart: 3555%!

I'm pretty sure there's something wrong with those results. Look at the chart yourself. Daily EMA22+21, around April 2013:



There is either no meaningfull crossover at all (lines run in parallel), or an incredibly late sell signal following the crash.

I suspect the numbers you get are an artifact of how the gekko simulation calculates crossover... maybe if the averages are that close together it breaks apart.

I admit, what I would expect the simulation to do in that case is to either get almost no trades (in which case it should be the same result as buy&hold), or a huge amount of trades (in which case the trading fee should destroy all profits).  So I can't really explain the numbers. Either way, I'm really sceptical.

EDIT: maybe there's a small chance the numbers are right after all.... during the 2011 bubble, this method would have performed pretty well. sell signal after the peak came late, but buying back would have been at a pretty good time. In other words, it could have outperformed buy&hold during that time by an order of magnitude.

Again, apologies that I can't run any tests myself, only have a netbook with me right now, but can someone run just the 1d EMA22+21 test from January 1st 2013 to now? Buy&Hold for that period would have been around +676%.
legendary
Activity: 2100
Merit: 1000
August 11, 2013, 06:30:26 AM
I checked my numbers, and I had stupidly entered the dollar result rather than the percentage profit. Here are the real numbers:

            4H        DAILY
10, 21   1473%   1582%
11, 21   1509%   1586%
12, 21   1531%   1714%
13, 21   1412%   3056%
14, 21   1279%   2813%
15, 21   1395%   2833%
16, 21   1550%   2698%
17, 21   1663%   3251%
18, 21   1555%   3174%
19, 21   1990%   3074%
20, 21   1990%   3376%

The best number I've found so far in my experimental meanderings has been the 21, 22 on the daily chart: 3555%!

this looks weird. are you sure this is right?
i.e. what happens if it crossed intrady?
is the cross over calculated based on intraday or closing prices?
how far back have you tested it?
full member
Activity: 143
Merit: 100
August 11, 2013, 12:21:22 AM
The only reasonable thing to do in view of such spectacular results is to go all in with a 21,22 ema bot Wink


Hah! Good luck with that!  Wink
newbie
Activity: 31
Merit: 0
August 10, 2013, 11:56:31 PM
The only reasonable thing to do in view of such spectacular results is to go all in with a 21,22 ema bot Wink
newbie
Activity: 57
Merit: 0
August 10, 2013, 06:26:44 PM
I checked my numbers, and I had stupidly entered the dollar result rather than the percentage profit. Here are the real numbers:

            4H        DAILY
10, 21   1473%   1582%
11, 21   1509%   1586%
12, 21   1531%   1714%
13, 21   1412%   3056%
14, 21   1279%   2813%
15, 21   1395%   2833%
16, 21   1550%   2698%
17, 21   1663%   3251%
18, 21   1555%   3174%
19, 21   1990%   3074%
20, 21   1990%   3376%

The best number I've found so far in my experimental meanderings has been the 21, 22 on the daily chart: 3555%!
legendary
Activity: 1470
Merit: 1007
August 10, 2013, 12:35:22 PM
I can't run the test myself right now, but I admit, the numbers seem off. Especially because 1d EMA20+21 has the fast and the slow average so close to each other that there should be almost no trading signals at all. For example (I'm looking at the charts, not gekko data), 1d EMA20+21 would have only given a buy signal for the July uptrend at around 95. Compared to 1d EMA 20+10 signal at 92. Doesn't make sense to me that it would outperform it by such a margin if it's so slow to recognize a trend.
newbie
Activity: 57
Merit: 0
August 10, 2013, 11:20:01 AM
June 26, 2011, to May 23, 2013

0.6% fee.

Buy and hold profit was 616% during that period.
legendary
Activity: 1470
Merit: 1007
August 10, 2013, 10:48:00 AM
This Gekko backtester is amazing. I'm getting some unexpected results, though. Check this out:

           4H        DAILY
10, 21   1680%   1655%
11, 21   1721%   1660%
12, 21   1745%   1794%
13, 21   1610%   3199%
14, 21   1458%   2944%
15, 21   1591%   2965%
16, 21   1767%   2824%
17, 21   1896%   3403%
18, 21   1773%   3322%
19, 21   2269%   3217%
20, 21   2268%   3533%

Contrary to the chart Goomboo put up last year (https://bitcointalksearch.org/topic/m.736808), the 20/21 crossover produces spectacular results. Someone please double-check, I must be doing something wrong.

You deducted fees from the profit, right?

EDIT: also, what is the history you ran this on? The entire price history? Then those results wouldn't be that surprising.

Profits need to be viewed in comparison. The "gold standard" to compare it with (I'm using the word gold standard somewhat sloppily here) would probably be the buy & hold strategy.

EDIT 2: quick calculation, just off the top of my head: buy & hold from May 2011 to now would for example be +2000%
newbie
Activity: 57
Merit: 0
August 10, 2013, 10:25:20 AM
This Gekko backtester is amazing. I'm getting some unexpected results, though. Check this out:

           4H        DAILY
10, 21   1680%   1655%
11, 21   1721%   1660%
12, 21   1745%   1794%
13, 21   1610%   3199%
14, 21   1458%   2944%
15, 21   1591%   2965%
16, 21   1767%   2824%
17, 21   1896%   3403%
18, 21   1773%   3322%
19, 21   2269%   3217%
20, 21   2268%   3533%

Contrary to the chart Goomboo put up last year (https://bitcointalksearch.org/topic/m.736808), the 20/21 crossover produces spectacular results. Someone please double-check, I must be doing something wrong.
newbie
Activity: 57
Merit: 0
August 10, 2013, 09:42:25 AM
Using Gekko, I backtested the hourly, the 4-hour, and the daily charts from June 26, 2011, to May 23, 2013, and found the following:

4-hour chart profit: 1,680%
Daily chart profit: 1,655%
Hourly chart profit: -71%

In summary, the hourly chart blows.

Buy and hold profit was 616%. I used 0 threshold.
hero member
Activity: 560
Merit: 500
I am the one who knocks
August 09, 2013, 09:43:03 PM
I have corrected my errors in my backtesting and decided to publish my results.  I would love to hear feedback on this.
Backtesting since Apr18-Aug5, periods of: D1 H1 H2 H4 H6 M5 M15

Terrific work. A few questions:
1. Which moving averages did you use? Simple, exponential, or weighted?
Exponential

2. Did you include the .6% fee per transaction in your calculations?
Yes, a flat 0.6%, so it *could* be less depending on your trading volume.

3. Is the trade executed at the close of the period which defines the crossover?
No.  I have a +/-0.25 threshold setup.   So EMA(f)/EMA(s) must be >or< +/-0.25 in order to generate a signal.  This is to avoid whipsaws.

I backtested the 10/21 EMA crossover on the daily chart starting back in the day (entry price of $0.40) to the present, and I definitely did not get a negative result (two and a half times as well as buy and hold). Not sure how to interpret your negative number there.
I mentioned earlier: the numbers are profit (starting with 2.5BTC) So the 'worst' you will ever see is -2.5 (total loss).  0 would mean that you would have 2.5BTC and 1 would be 3.5BTC in your account.

This is not an entire life of bitcoin backtest.  Just Apr18->Aug5 of this year.  Here is a full Gekko log of the D1-10/21 backtest showing the trades and explaining the numbers.

Thanks for the feedback everyone.  I am finding some really interesting things doing this.  For instance H1 was actually the most profitable timeframe (with the right params) since Jan 1 but not since Apr. 

I should extract percentages from the reports too, so I can compare differing timeframes and not just profit.
newbie
Activity: 57
Merit: 0
August 09, 2013, 07:55:46 PM
I have corrected my errors in my backtesting and decided to publish my results.  I would love to hear feedback on this.
Backtesting since Apr18-Aug5, periods of: D1 H1 H2 H4 H6 M5 M15

Terrific work. A few questions:
1. Which moving averages did you use? Simple, exponential, or weighted?
2. Did you include the .6% fee per transaction in your calculations?
3. Is the trade executed at the close of the period which defines the crossover?

I backtested the 10/21 EMA crossover on the daily chart starting back in the day (entry price of $0.40) to the present, and I definitely did not get a negative result (two and a half times as well as buy and hold). Not sure how to interpret your negative number there.
sr. member
Activity: 409
Merit: 250
August 09, 2013, 06:35:56 PM
I have corrected my errors in my backtesting and decided to publish my results.  I would love to hear feedback on this.
Backtesting since Apr18-Aug5, periods of: D1 H1 H2 H4 H6 M5 M15

Excellent work, looks great!
sr. member
Activity: 309
Merit: 250
August 09, 2013, 06:07:54 PM
I have corrected my errors in my backtesting and decided to publish my results.  I would love to hear feedback on this.
Backtesting since Apr18-Aug5, periods of: D1 H1 H2 H4 H6 M5 M15

Have you the possibility to include M30 ?

Thank you
hero member
Activity: 560
Merit: 500
I am the one who knocks
August 09, 2013, 06:00:31 PM
I have corrected my errors in my backtesting and decided to publish my results.  I would love to hear feedback on this.
Backtesting since Apr18-Aug5, periods of: D1 H1 H2 H4 H6 M5 M15
sr. member
Activity: 409
Merit: 250
August 09, 2013, 04:36:38 PM
Interesting. How much of your capital do you usually have in play? The rule I generally hear bandied about is that you shouldn't have more than 2% of your capital invested in any single trade, and you shouldn't have more than 20% of your capital at risk.

I target a risk of 1% of account equity or less on any given trade.  To me, this is the most important figure in trading: how much will you lose if you're wrong.

For overall trading, I will have 20-30% of capital tied up in positions at any given time.
Pages:
Jump to: