Commit Graph

56 Commits

Author SHA1 Message Date
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
c9s
d04e1e7816 refactory sync command and upgrade db automatically 2021-01-14 15:10:11 +08:00
c9s
ad567dc360 use mysql reformat dsn function to add parseTime parameters 2021-01-14 14:56:13 +08:00
c9s
275aa9494a support canceling orders on max 2020-12-29 16:00:03 +08:00
c9s
fc9409673f add graceful shutdown 2020-11-12 14:50:21 +08:00
c9s
24e5911140 refactory sync mode into the backtest command 2020-11-11 16:08:24 +08:00
c9s
097b2d30a6 add base-asset-baseline flag for backtest 2020-11-11 14:39:33 +08:00
c9s
04f6da3cb8 add traditional grid strategy 2020-11-10 19:06:20 +08:00
c9s
923fea0d94 improve backtest cmd 2020-11-10 14:19:11 +08:00
c9s
f5b17193c5 move verbose flag detection before we setup the environment 2020-11-09 16:49:03 +08:00
c9s
6c2aef31a3 improve backtest logging 2020-11-09 16:47:29 +08:00
c9s
e7cc79f3cf replace errors.Errorf with fmt.Errorf 2020-11-09 16:34:35 +08:00