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
bf4eade604
backtest: fix backtest fee mode when fee currency is not base or quote
2022-09-05 17:41:12 +08:00
c9s
3a225fe7c7
backtest: fix tests for fee
2022-09-02 14:31:04 +08:00
c9s
5c8d2a019a
backtest: rename BackTest to Backtest
2022-09-02 14:16:16 +08:00
c9s
30742bcf0b
backtest: set default fee mode to quote mode
2022-09-02 14:16:16 +08:00
c9s
2e9487e9f4
backtest: fix fee calculator
2022-09-02 14:16:16 +08:00
c9s
d2f9a352a2
backtest,accounting: add position info to the average cost pnl report
2022-09-02 14:16:16 +08:00
c9s
45fb87f2b8
backtest: add fee mode function tests
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
be1f6e7242
fix: add description on the limit taker behavior
2022-08-30 21:07:49 +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
zenix
1eb03c3dba
fix: taker price, matching engine kline emit order and process order, nan in sortino and sharpe
2022-08-29 14:11:02 +09:00
Raphanus Lo
de59c1bd13
backtest: reformat sharpe/sortino report
2022-08-25 15:45:08 +08:00
Raphanus Lo
ad1b9a53a1
backtest: calculate realized Sharpe & Sortino ratios
2022-08-25 15:45:08 +08:00
zenix
6b6a24a655
feature: add gma, add wdrift, export drift filter, fix: LastPrice truncation
2022-08-23 17:22:45 +09:00
zenix
a958d4d092
fix: matching_test add TickSize
2022-08-18 17:38:27 +09:00
zenix
e1c2ed40ff
fix: truncate price in backtest, don't truncate amount, add TruncatePrice function
2022-08-18 17:38:27 +09:00
zenix
66a2f55f9a
fix: matching test by adding default stepSize on BTCUSDT
2022-08-18 17:38:27 +09:00
zenix
f7398f163a
fix: inequality on quantites of balances and submitted orders in backtest
2022-08-18 17:38:27 +09:00
c9s
4d32a578d7
backtest: emit balance update if we got some quote back
2022-08-18 16:09:07 +08:00
c9s
bd8b362274
backtest: delay the order update after the balance unlock
2022-08-18 15:43:09 +08:00
c9s
3a24a48cde
backtest: fix execution price for stop limit taker orders
2022-08-18 15:26:09 +08:00
c9s
9f9fc098f4
backtest: clean up todo
2022-08-18 15:11:27 +08:00
c9s
6c4d5041ba
backtest: fix limit taker lock issue
2022-08-18 15:09:46 +08:00
Raphanus Lo
13455e4ee1
backtest: resolve data race on index.json
2022-07-17 15:46:55 +08:00
c9s
26f5f36f7e
backtest: for types.OrderTypeStopMarket, use stop price to simulate the actual price for balance locking
2022-07-14 19:26:04 +08:00
Raphanus Lo
36bdacf3a3
backtest: correct final asset calculation
2022-07-13 17:20:48 +08:00
c9s
a51f26e3a7
backtest: add gross profit and gross loss fields
2022-07-12 19:50:28 +08:00
c9s
24e009f333
backtest: avoid writing same record into the file
2022-07-12 18:46:09 +08: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
ecd4df86f9
backtest: assign user data stream to backtest.Exchange before we call EmitStart
2022-07-04 02:21:14 +08:00
c9s
449b2d8220
backtest: fix order update emit binding
2022-07-04 02:20:50 +08:00
c9s
b32cfef2fd
backtest: set order price for market order
2022-06-28 23:47:34 +08:00
c9s
1156e15cfe
backtest: add order cancel test case
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-28 18:25:51 +08:00
c9s
c0f8bb9a2d
backtest: do not change the backtest order price
...
- apply the last price on the executed trade
- add more tests
2022-06-28 17:43:51 +08:00
c9s
81ed5bff4f
backtest: refactor calculateNativeOrderFee and add test case
2022-06-28 15:29:01 +08:00
c9s
abee61cdc4
backtest: fix stop order backtest, add more test cases and assertions
2022-06-28 14:35:06 +08:00
c9s
09e98eed82
backtest: handle stop market and add test case
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-27 20:49:55 +08:00
c9s
10d5a8a4f2
backtest: fix stop limit order matching
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-27 19:48:14 +08:00
c9s
d46954a4b1
fix SimplePriceMatching test
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-27 00:13:57 +08:00
c9s
47677e303f
pivotshort: refactor take profit and stop loss methods
...
Signed-off-by: c9s <yoanlin93@gmail.com>
2022-06-26 16:13:58 +08:00