-
Notifications
You must be signed in to change notification settings - Fork 400
/
backtest-USD-TRX-bestone_updated_hardcoded.log
291 lines (247 loc) · 9.9 KB
/
backtest-USD-TRX-bestone_updated_hardcoded.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
// Everything is explained here:
// @link https://gekko.wizb.it/docs/commandline/plugins.html
var config = {};
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// GENERAL SETTINGS
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config.debug = true; // for additional logging / debugging
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// WATCHING A MARKET
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config.watch = {
// see https://gekko.wizb.it/docs/introduction/supported_exchanges.html
exchange: 'bitfinex',
currency: 'USD',
asset: 'TRX',
// You can set your own tickrate (refresh rate).
// If you don't set it, the defaults are 2 sec for
// okcoin and 20 sec for all other exchanges.
// tickrate: 20
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING TRADING ADVICE
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config.tradingAdvisor = {
enabled: true,
method: 'bestone_updated_hardcoded',
candleSize: 5,
historySize: 12,
}
config.bestone_updated_hardcoded = {
myStoch: {
highThreshold: 80,
lowThreshold: 20,
optInFastKPeriod: 14,
optInSlowKPeriod: 5,
optInSlowDPeriod: 5
},
myLongEma: {
optInTimePeriod: 100
},
myShortEma: {
optInTimePeriod: 50
},
stopLoss: {
percent: 0.9 }
};
config.BodhiDI_public = {
optInTimePeriod: 14,
diplus: 23.5,
diminus: 23
};
config.buyatsellat_ui = {
buyat: 1.20,
sellat: 0.98,
stop_loss_pct: 0.85,
sellat_up: 1.01
};
config.DynBuySell = {
thresholds: {
interval: 8,
sell_at: 1.05,
buy_at: 0.97,
buy_at_up: 1.003,
stop_loss_pct: 0.85 }
};
config.RSI_BULL_BEAR = {
SMA_long: 1000,
SMA_short: 50,
BULL_RSI: 10,
BULL_RSI_high: 80,
BULL_RSI_low: 60,
BEAR_RSI: 15,
BEAR_RSI_high: 50,
BEAR_RSI_low: 20
};
config.RSI_BULL_BEAR_ADX = {
SMA_long: 1000,
SMA_short: 50,
BULL_RSI: 10,
BULL_RSI_high: 80,
BULL_RSI_low: 60,
BEAR_RSI: 15,
BEAR_RSI_high: 50,
BEAR_RSI_low: 20,
ADX: 3,
ADX_high: 70,
ADX_low: 50
};
config.rsidyn = {
interval: 8,
sellat: 0.4,
buyat: 1.5 ,
stop_percent: 0.96,
stop_enabled: true
};
config.TEMA = {
short: 10,
long: 80,
SMA_long: 200
};
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING PLUGINS
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// do you want Gekko to simulate the profit of the strategy's own advice?
config.paperTrader = {
enabled: true,
// report the profit in the currency or the asset?
reportInCurrency: true,
// start balance, on what the current balance is compared with
simulationBalance: {
// these are in the unit types configured in the watcher.
asset: 0,
currency: 400,
},
// how much fee in % does each trade cost?
feeMaker: 0.1,
feeTaker: 0.1,
feeUsing: 'maker',
// how much slippage/spread should Gekko assume per trade?
slippage: 0.05,
}
config.performanceAnalyzer = {
enabled: true,
riskFreeReturn: 5
}
config.trader = {
enabled: false,
key: '',
secret: '',
username: '', // your username, only required for specific exchanges.
passphrase: '', // GDAX, requires a passphrase.
orderUpdateDelay: 1, // Number of minutes to adjust unfilled order prices
}
config.adviceLogger = {
enabled: false,
muteSoft: true // disable advice printout if it's soft
}
config.candleWriter = {
enabled: false
}
config.adviceWriter = {
enabled: false,
muteSoft: true,
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING ADAPTER
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config.adapter = 'sqlite';
config.sqlite = {
path: 'plugins/sqlite',
dataDirectory: 'history',
version: 0.1,
journalMode: require('./web/isWindows.js') ? 'DELETE' : 'WAL',
dependencies: []
}
config.backtest = {
daterange: 'scan',
batchSize: 50
}
// set this to true if you understand that Gekko will
// invest according to how you configured the indicators.
// None of the advice in the output is Gekko telling you
// to take a certain position. Instead it is the result
// of running the indicators you configured automatically.
//
// In other words: Gekko automates your trading strategies,
// it doesn't advice on itself, only set to true if you truly
// understand this.
//
// Not sure? Read this first: https://github.com/askmike/gekko/issues/201
config['I understand that Gekko only automates MY OWN trading strategies'] = true;
module.exports = config;
______ ________ __ __ __ __ ______
/ \ / |/ | / |/ | / | / \
/$$$$$$ |$$$$$$$$/ $$ | /$$/ $$ | /$$/ /$$$$$$ |
$$ | _$$/ $$ |__ $$ |/$$/ $$ |/$$/ $$ | $$ |
$$ |/ |$$ | $$ $$< $$ $$< $$ | $$ |
$$ |$$$$ |$$$$$/ $$$$$ \ $$$$$ \ $$ | $$ |
$$ \__$$ |$$ |_____ $$ |$$ \ $$ |$$ \ $$ \__$$ |
$$ $$/ $$ |$$ | $$ |$$ | $$ |$$ $$/
$$$$$$/ $$$$$$$$/ $$/ $$/ $$/ $$/ $$$$$$/
Gekko v0.5.13
I'm gonna make you rich, Bud Fox.
2018-02-13 18:20:50 (INFO): Setting up Gekko in backtest mode
2018-02-13 18:20:50 (INFO):
2018-02-13 18:20:50 (INFO): Setting up:
2018-02-13 18:20:50 (INFO): Trading Advisor
2018-02-13 18:20:50 (INFO): Calculate trading advice
2018-02-13 18:20:50 (INFO): Using the strategy: bestone_updated_hardcoded
2018-02-13 18:20:50 (INFO):
2018-02-13 18:20:50 (INFO): Setting up:
2018-02-13 18:20:50 (INFO): Paper Trader
2018-02-13 18:20:50 (INFO): Paper trader that simulates fake trades.
2018-02-13 18:20:50 (INFO):
2018-02-13 18:20:50 (INFO): Setting up:
2018-02-13 18:20:50 (INFO): Performance Analyzer
2018-02-13 18:20:50 (INFO): Analyzes performances of trades
2018-02-13 18:20:50 (INFO):
2018-02-13 18:20:50 (INFO): Scanning local history for backtestable dateranges.
2018-02-13 18:20:50 (DEBUG): Available 20020
2018-02-13 18:20:50 (DEBUG): Optimal 20019
2018-02-13 18:20:50 (INFO): Gekko is able to fully use the local history.
2018-02-13 18:20:50 (INFO): Gekko was able to find a single daterange in the locally stored history:
2018-02-13 18:20:50 (INFO): from: 2018-01-24 15:53:00
2018-02-13 18:20:50 (INFO): to: 2018-02-07 13:32:00
2018-02-13 18:20:50 (INFO): WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-02-13 18:20:50 (INFO): WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!
2018-02-13 18:20:51 (INFO): 2018-01-24 19:13:00: Paper trader simulated a BUY 0.00000000 USD => 4870.73170731 TRX
2018-02-13 18:20:55 (INFO): 2018-01-26 23:08:00: Paper trader simulated a SELL 321.71560408 USD <= 0.00000000 TRX
2018-02-13 18:20:55 (INFO): 2018-01-27 00:28:00: Paper trader simulated a BUY 0.00000000 USD => 4737.95030492 TRX
2018-02-13 18:21:01 (INFO): 2018-01-28 11:38:00: Paper trader simulated a SELL 334.47062692 USD <= 0.00000000 TRX
2018-02-13 18:21:02 (INFO): 2018-01-28 15:38:00: Paper trader simulated a BUY 0.00000000 USD => 4857.02328358 TRX
2018-02-13 18:21:23 (INFO): 2018-01-31 18:13:00: Paper trader simulated a SELL 253.99046537 USD <= 0.00000000 TRX
2018-02-13 18:21:23 (INFO): 2018-01-31 18:23:00: Paper trader simulated a BUY 0.00000000 USD => 4800.57316382 TRX
2018-02-13 18:21:30 (INFO): 2018-02-01 13:08:00: Paper trader simulated a SELL 241.29836178 USD <= 0.00000000 TRX
2018-02-13 18:21:31 (INFO): 2018-02-01 15:33:00: Paper trader simulated a BUY 0.00000000 USD => 4917.06967831 TRX
2018-02-13 18:21:45 (INFO): 2018-02-02 22:53:00: Paper trader simulated a SELL 197.68392218 USD <= 0.00000000 TRX
2018-02-13 18:21:46 (INFO): 2018-02-02 23:23:00: Paper trader simulated a BUY 0.00000000 USD => 4849.81317682 TRX
2018-02-13 18:22:08 (INFO): 2018-02-04 18:38:00: Paper trader simulated a SELL 193.55141959 USD <= 0.00000000 TRX
2018-02-13 18:22:08 (INFO): 2018-02-04 18:43:00: Paper trader simulated a BUY 0.00000000 USD => 4795.56060696 TRX
2018-02-13 18:22:08 (INFO): 2018-02-04 18:48:00: Paper trader simulated a SELL 190.57222882 USD <= 0.00000000 TRX
2018-02-13 18:22:08 (INFO): 2018-02-04 18:58:00: Paper trader simulated a BUY 0.00000000 USD => 4725.26373173 TRX
2018-02-13 18:22:48 (INFO):
2018-02-13 18:22:48 (INFO): (ROUNDTRIP) REPORT:
2018-02-13 18:22:48 (INFO): (ROUNDTRIP) entry date (UTC) exit date (UTC) exposed duration P&L profit
2018-02-13 18:22:48 (INFO): (ROUNDTRIP) 2018-01-24 18:13 2018-01-26 22:08 2 days -77.68 -19.45
2018-02-13 18:22:48 (INFO): (ROUNDTRIP) 2018-01-26 23:28 2018-01-28 10:38 a day 13.24 4.12
2018-02-13 18:22:48 (INFO): (ROUNDTRIP) 2018-01-28 14:38 2018-01-31 17:13 3 days -79.98 -23.95
2018-02-13 18:22:48 (INFO): (ROUNDTRIP) 2018-01-31 17:23 2018-02-01 12:08 19 hours -12.31 -4.85
2018-02-13 18:22:48 (INFO): (ROUNDTRIP) 2018-02-01 14:33 2018-02-02 21:53 a day -43.25 -17.95
2018-02-13 18:22:48 (INFO): (ROUNDTRIP) 2018-02-02 22:23 2018-02-04 17:38 2 days -3.84 -1.94
2018-02-13 18:22:48 (INFO): (ROUNDTRIP) 2018-02-04 17:43 2018-02-04 17:48 5 minutes -2.69 -1.39
2018-02-13 18:22:48 (INFO):
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) start time: 2018-01-24 15:53:00
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) end time: 2018-02-07 13:32:00
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) timespan: 14 days
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) sharpe ratio: -1.4254323493222965
2018-02-13 18:22:48 (INFO):
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) start price: 0.084 USD
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) end price: 0.04077 USD
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) Market: -51.46428571%
2018-02-13 18:22:48 (INFO):
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) amount of trades: 15
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) original simulated balance: 400.00000000 USD
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) current simulated balance: 192.64900234 USD
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) simulated profit: -207.35099766 USD (-51.83774941%)
2018-02-13 18:22:48 (INFO): (PROFIT REPORT) simulated yearly profit: -5447.62931900 USD (-1361.90732975%)