Commit Graph

26 Commits

Author SHA1 Message Date
zenix
8648528435 fix go fmt, fix convert.go (the legacy fixedpoint implementation) in all tests 2022-02-15 14:55:19 +09: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
60853bee23 backtest: pull out market data feeder 2021-12-25 22:37:38 +08:00
c9s
57bc65a729 avoid calling EmitConnect and EmitStart outside of the kline feeding goroutine
this causes 2 goroutine running in the same time hence cause the
concurrent map read / write

should fix #399, #401
2021-12-25 21:05:50 +08:00
c9s
562c287a4e all: move publicOnly to StandardStream 2021-12-23 17:49:18 +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
44d7055809 fix backtest fee rate calculation 2021-12-05 12:10:45 +08:00
c9s
4d7fe7f37d call matchingBooksMutex when assigning matching book 2021-12-05 12:06:36 +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
61ad2b6567 emit start callback for backtest 2021-05-08 00:43:53 +08:00
c9s
3501e8f5fd refactor backtest, add BootstrapBacktestEnvironment 2021-05-08 00:14:25 +08:00
c9s
9db1c78171 add public only mode to backtest 2020-12-21 15:45:40 +08: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
641784e1b1 calculate pnl after the backtest 2020-11-07 20:34:34 +08:00
c9s
6040c69327 add sync flag for backtesting 2020-11-07 20:14:53 +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
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