Commit Graph

67 Commits

Author SHA1 Message Date
c9s
18da434e92 all: use thread-safe GetAccount method to get account 2022-04-23 15:43:11 +08:00
zenix
d0c3390f84 fix log message to be lowercases 2022-04-11 17:04:56 +09:00
zenix
fac61f27dc feature: add pinescript series interface 2022-04-11 17:04:56 +09:00
c9s
830503941e cmd: fix backtest sync 2022-04-10 00:57:55 +08:00
c9s
e51fb641af backtest: show symbols 2022-04-10 00:57:55 +08:00
zenix
77a88aabe4 feature: add CancelOrders and CancelOrdersTo to executor 2022-03-16 21:38:09 +09:00
zenix
7e92f0f4e5 fix: remove requirements on config flag 2022-03-11 19:56:59 +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
zenix
8648528435 fix go fmt, fix convert.go (the legacy fixedpoint implementation) in all tests 2022-02-15 14:55:19 +09:00
zenix
05521a98b6 add skeleton strategy. fix most of the tests. fix final asset value 2022-02-15 12:01:39 +09:00
zenix
abc1d535d8 fix bollmaker, fix pnl issues 2022-02-15 12:01:39 +09:00
c9s
bf8558e9ad bollmaker: add BuyBelowNeutralSMA option 2022-02-01 01:40:51 +08:00
c9s
17187c70e7 cmd: print realized profit in colored text 2022-02-01 01:05:11 +08:00
c9s
c0beca78f5 include terminal color for back-test report 2022-02-01 01:00:26 +08:00
c9s
82adff338e cmd/backtest: calculate performance in quote asset 2022-02-01 00:54:55 +08:00
c9s
007207e24f all: use types.LooseFormatTime to parse loose format date time string 2022-01-25 00:24:12 +08:00
c9s
dd22776a7e cmd: refactor the exchange factory function 2021-12-25 23:27:05 +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
49e516b80e backtest: allocate public exchange (with empty key secret) for backtesting 2021-12-24 00:24:19 +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
16933555b8 backtest : auto sync missing range 2021-12-15 01:26:05 +08:00
TonyQ
20b03fe4a5 exchange: fix ftx for wrong last kline issue 2021-12-15 00:07:54 +08:00
TonyQ
8eb3eede82 fix backtest (with review) 2021-12-14 16:02:54 +08:00
c9s
06262f0172 check sync from time with start time instead of end time 2021-12-09 15:57:12 +08:00
c9s
61817e1e83 add startPrice and lastPrice in the backtest report
closes #321
2021-12-09 11:58:19 +08:00
c9s
a0f46bf9b8 improve error checking, avoid using panic inside the constructor 2021-12-08 23:30:58 +08:00
Yo-An Lin
3fb6d204aa Fix pointer check 2021-12-07 18:52:24 +08:00
c9s
5ef1ee927b improve the error message 2021-12-07 15:23:09 +08:00
c9s
f1e3cc6049 add strict start time, sync time checking for preventing back-test failure
related to #311
2021-12-07 15:21:37 +08:00
c9s
132fe893e1 use stderr for verbose log 2021-12-07 14:45:20 +08:00
c9s
0472b7f21e avoid recording trades in backtest by default
introducing a RecordTrades option
2021-12-06 01:42:53 +08:00
c9s
474be4e815 support json output for backtesting 2021-12-06 01:05:33 +08:00
c9s
df683bdf56 use position to calculate the pnl 2021-12-05 02:17:15 +08:00
TonyQ
bd325f02a5 add force parameter for backtest 2021-12-04 16:18:51 +00:00
c9s
c84d59734c clear all trades before running backtests 2021-05-30 15:25:00 +08:00
c9s
14eedecd0e fix backtest sync from time 2021-05-08 00:44:43 +08:00
c9s
3501e8f5fd refactor backtest, add BootstrapBacktestEnvironment 2021-05-08 00:14:25 +08:00
c9s
494a270c54 insert trades to db only when backtest service is nil 2021-05-07 01:50:38 +08:00
c9s
859bf35255 set sync-from from config by default 2021-05-05 16:45:17 +08:00
c9s
29f77c2176 add environ.DatabaseService nil check for backtest 2021-03-22 22:48:43 +08:00
c9s
6845db6dd3 refactor database configure method 2021-02-21 00:58:34 +08:00
c9s
ffa001fc29 fix quantity format 2021-02-11 00:21:56 +08:00
c9s
0b657d59f9 make inBaseAsset as private method 2021-02-06 11:34:53 +08:00
c9s
dd9dbee903 refactor database configuration with env vars 2021-02-06 11:33:49 +08:00
c9s
99b56003eb clean up legacy db connection handling with the new database service 2021-02-06 11:22:04 +08:00
c9s
de51eb29e4 refactor db stuff with database service 2021-02-06 11:22:04 +08:00
c9s
17d5e301dc refine setup steps 2021-02-02 17:26:35 +08:00
c9s
a60aeb4771 pull out .Subscribe from trader.Run 2021-02-01 20:44:15 +08:00
c9s
1892d03326 make session trades map thread safe 2021-01-24 14:14:25 +08:00
c9s
d96e6e8ccc use environment to configure database 2021-01-15 10:47:49 +08:00