Commit Graph

18 Commits

Author SHA1 Message Date
c9s
5f68064ac6
pull out writeJsonFile function 2022-05-10 18:27:23 +08:00
zenix
e221f54397 add dnum as the fixedpoint implementation. change types float64 to fixedpoint.Value
change pnl report to use fixedpoint

fix: migrate kline to use fixedpoint
2022-02-15 12:00:39 +09:00
c9s
6566db1624 accounting: filter duplicated trades when backtesting 2022-01-30 02:40:38 +08:00
c9s
7e2acdc416 all: add lock protected GetBase method for Position 2022-01-09 00:35:45 +08:00
austin362667
1703fff8b2 types: refactor Position and related files 2021-12-11 19:16:16 +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
Jui-Nan Lin
b38b65ce83 fix(pnl): do not calculate the "self" trade 2021-02-06 17:34:13 +08:00
Jui-Nan Lin
7e1825d991 Merge branch 'main' into fix/pnl-amount 2021-02-06 17:22:43 +08:00
c9s
3abdb3dd7b convert time struct for sqlite driver 2021-02-06 12:32:21 +08:00
Jui-Nan Lin
c9f3b6fc1a fix(pnl): checking the side of trade, not taker or maker 2021-02-05 14:52:38 +08:00
c9s
770efeed4f pnl format improve 2020-11-10 14:18:27 +08:00
c9s
916b3b0eca early return if len of trades == 0 2020-10-24 16:32:54 +08:00
c9s
6e033461bb use the time of the first trade as the report start time 2020-10-23 14:09:05 +08:00
c9s
aea6a7c03d integrate AverageCostPnLReporter 2020-10-22 15:57:50 +08:00
c9s
27b582e948 move report struct 2020-10-16 10:21:37 +08:00
c9s
63ea81b648 simplify the calculator api 2020-10-16 10:19:53 +08:00
c9s
a6b99f6828 rename ProfitAndLossCalculator to AverageCostCalculator 2020-10-16 10:16:42 +08:00