Commit Graph

65 Commits

Author SHA1 Message Date
c9s
0482ade44a
backtest: adjust best bid/ask price with tick size 2023-06-14 17:25:22 +08:00
c9s
c6ce223a13 all: refactor backtest functions so that we can run backtest in test 2022-12-06 13:16:12 +08:00
austin362667
18acd668a7 interval: finalize 1s support
interval: finalize 1s support

interval: finalize 1s support
2022-10-14 23:14:30 +08:00
austin362667
905c1f25ee interval: add 1s support
interval: add 1s support

interval: add 1s support

interval: fix 1s for backtesting
2022-10-14 23:14:30 +08:00
c9s
a515fff053
backtest: add order quantity check 2022-10-06 15:08:44 +08:00
c9s
29105eb57f
all: simplify underlying exchange submitOrder method
- Replace SubmitOrders with SubmitOrder
- Accept only one submit order and return one created order
- Add bbgo.BatchPlaceOrders helper method and bbgo.BatchRetryPlaceOrders method
2022-09-09 18:41:06 +08:00
c9s
5c8d2a019a
backtest: rename BackTest to Backtest 2022-09-02 14:16:16 +08:00
c9s
10ed706ed6
backtest: move fee mode functions to fee.go 2022-09-02 14:16:16 +08:00
c9s
3d32faff46
backtest: add fee mode config 2022-09-02 14:16:15 +08:00
zenix
a28b257568 fix: debug code 2022-08-31 13:01:00 +09:00
zenix
51d7c1b9ad fix: currentTime in backtest not updated 2022-08-30 21:12:23 +09:00
zenix
c2d5a5961f fix: legacy fixedpoint inf handling, refactor backtest kline consuming 2022-08-30 21:02:21 +09:00
zenix
c73f4018d0 fix: null pointer error on NextKLine 2022-08-30 12:09:39 +09:00
zenix
ecc959835a fix: cache params and kline until next kline 1m appears 2022-08-29 19:46:58 +09:00
c9s
c258d522e6
backtest: update backtest.Exchange currentTime 2022-07-04 02:38:42 +08:00
c9s
82f9fc139c
backtest: refactor exchange field, clean up startTime and endTime deps 2022-07-04 02:34:46 +08:00
c9s
8fc17f9c0b
backtest: move QueryOrder method 2022-07-04 02:29:18 +08:00
c9s
a31f61736a
backtest: pull out userDataStream to backtestEx.BindUserData 2022-07-04 02:27:29 +08:00
c9s
449b2d8220
backtest: fix order update emit binding 2022-07-04 02:20:50 +08:00
c9s
4c02d8f729
implement QueryOrder on the backtest exchange 2022-06-26 16:10:10 +08:00
zenix
f5007752b2 feature: add heikinashi support 2022-06-17 10:58:32 +09:00
c9s
77eb5da7b7
clean up type conversion 2022-06-09 15:50:06 +08:00
zenix
99122f44bc fix: backtest kline prev close -> new open, pass exchange as pointer (for Mutex passing), ewo add filter ma34 2022-05-24 23:05:01 +09:00
c9s
40b3192e55
use config.GetAccount to avoid error 2022-05-19 10:04:03 +08:00
zenix
382e6ee0fb fix: error exit on wrong subscription in backtest. NaN issue in stoch indicator. feature: position management in ewo 2022-05-13 22:58:35 +09:00
c9s
11d0823782
cmd: refactor back-test command 2022-05-11 13:59:44 +08:00
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