Commit Graph

39 Commits

Author SHA1 Message Date
c9s
c9c16f1e47
show missing exchange name in the back-test config 2022-05-03 16:46:38 +08:00
c9s
946bbdbca3
backtest: rename backtest.account to backtest.accounts 2022-05-03 12:18:40 +08:00
zenix
d6995e40ff fix: submit order on userDataStream == nil 2022-03-15 20:51:15 +09:00
zenix
25b5eddc03 feature: add multiple exchange support in backtest
fix: change doc, since --exchange removed from backtest

fix: test for config changes
2022-03-07 13:18:56 +09:00
c9s
0667c138ab backtest: fix duplicate trade emit issue 2022-01-30 03:05:19 +08:00
c9s
007207e24f all: use types.LooseFormatTime to parse loose format date time string 2022-01-25 00:24:12 +08:00
austin362667
91d2312c5c cache: refactor moving from bbgo to pkg/cache 2022-01-15 08:28:02 +08:00
c9s
dd22776a7e cmd: refactor the exchange factory function 2021-12-25 23:27:05 +08:00
c9s
dcbce18fd8 fix format 2021-12-25 23:12:54 +08:00
c9s
442afe8eb9 backtest: pull out market data feeding to a function and call it in the main thread 2021-12-25 22:57:28 +08:00
c9s
f5bbe29ac6 cmd: fix debug flag loading and add debug log to cache function 2021-12-23 23:02:07 +08:00
TonyQ
3e45035ab1 database: sqlite3 issue fix
database: upgrade gosqllite3 version for increasing variable amount limit
	types: update kline starttime/endtime field to prevent sqlite3
	time parsing issue.

	fix #215
2021-12-15 14:34:31 +08:00
c9s
a0f46bf9b8 improve error checking, avoid using panic inside the constructor 2021-12-08 23:30:58 +08:00
c9s
2223ef088c add ftx, okex to the public exchange factory for backtest 2021-12-08 23:27:01 +08:00
c9s
d52edce40b fix markets info cache 2021-12-08 17:26:43 +08:00
c9s
3615477d8f backtest: allocate matching books from the exchange constructor
also adds the mutex for trades and closed orders
2021-12-06 00:38:36 +08:00
c9s
f692ef2c31 realign account fields 2021-12-05 12:23:27 +08:00
c9s
5ed337926d add mutex lock protection for backtesting
solving issue #282
2021-11-30 10:40:28 +08:00
c9s
60e4442f85 add document for the backtest engine 2021-10-05 22:06:36 +08:00
c9s
3aa36b5989 refactor and fix backtest for user data stream and market data stream 2021-05-30 15:08:11 +08:00
c9s
d8d2e17b9e fix backtest exchange query klines methods 2021-05-08 00:57:12 +08:00
c9s
6bbd66a4f9 split environment start and init 2021-05-08 00:45:24 +08:00
c9s
c5eb6483a5 integrate QueryTicker for backtesting 2021-03-16 02:13:52 +08:00
c9s
0ba595bd55 Fix trade sync for self trades
MAX uses one single trade for presenting self trade.

BINANCE uses two trade records for presenting self trade. the trade
creation time are the same.
2021-02-18 17:37:49 +08:00
ycchen
288f7257eb fix testcases 2021-02-06 19:39:43 +01:00
c9s
04f6da3cb8 add traditional grid strategy 2020-11-10 19:06:20 +08:00
c9s
69a33b6400 fix and improve backtest 2020-11-10 14:18:04 +08:00
c9s
e7cc79f3cf replace errors.Errorf with fmt.Errorf 2020-11-09 16:34:35 +08:00
c9s
f69c87b3a8 fix fee calculation and add account balance checking 2020-11-08 21:52:44 +08:00
c9s
090011da9e pull out order matching trigger from the kline event callbacks 2020-11-08 13:07:45 +08:00
c9s
e3a1184d22 fix backtest sync exchange and consider fee rate 2020-11-08 12:47:14 +08:00
c9s
6bd3573287 add exchange field in the table so that we can reuse the kline objects for backtest 2020-11-08 12:13:34 +08:00
c9s
641784e1b1 calculate pnl after the backtest 2020-11-07 20:34:34 +08:00
c9s
f1db12eb10 add done channel for backtest exchange 2020-11-07 20:11:07 +08:00
c9s
a4a9067c6a integrate matching engine with backtest exchange 2020-11-07 19:57:36 +08:00
c9s
5be4aa53db move simple price matching to matching.go 2020-11-07 16:09:21 +08:00
c9s
3778adc8c8 implement SimplePriceMatching engine 2020-11-07 16:08:20 +08:00
c9s
b13a2deec5 emit klines and setup account balances 2020-11-07 03:18:05 +08:00
c9s
22a214328d implement backtest command, stream and add backtest config 2020-11-07 02:57:50 +08:00