Commit Graph

45 Commits

Author SHA1 Message Date
c9s
0530809834
fix position test 2024-08-20 14:10:22 +08:00
c9s
e1532ffa46
add BasicCircuitBreaker 2024-06-02 20:38:41 +08:00
narumi
8ad85fc365 move OrderPriceRiskControl to riskcontrol 2024-05-20 15:19:42 +08:00
hidewrong
d6d428ed9f chore: fix some comments
Signed-off-by: hidewrong <hidewrong@outlook.com>
2024-04-17 11:11:53 +08:00
zenix.huang
f1a4879253 upgrade golang mockgen to uber mockgen. generate exchange public 2024-03-12 14:18:14 +09:00
narumi
d8ff42d531 Fix duplicate orders caused by position risk control 2023-10-11 12:13:01 +08:00
narumi
4a231b10c6 pull out ishalted method 2023-09-21 15:06:09 +08:00
narumi
57198cc6b0 fix: reset profit stats when over given duration in circuit break risk control 2023-09-01 18:57:40 +08:00
c9s
c0e315fafe
core: fix trade collector dead lock 2023-08-01 22:22:18 +08:00
c9s
baf431d7b6
riskcontrol: log on release position order 2023-07-12 16:17:22 +08:00
c9s
5853434aec
all: move v2 indicator to indicator/v2 2023-07-10 17:17:46 +08:00
c9s
1ad10a9360
all: move trade collector to pkg/core 2023-07-05 15:26:36 +08:00
c9s
ff727ae495
all: use order executor extended interface to mock the risk tests 2023-07-04 22:07:31 +08:00
c9s
1f98731636
riskcontrol: add doc to PositionRiskControl 2023-07-04 21:33:40 +08:00
c9s
adbb6d7f93
riskcontrol: move parameter order 2023-07-04 21:32:34 +08:00
c9s
c8ae36ddfc
riskcontrol: move release position order submission into the pos risk control 2023-07-04 21:31:47 +08:00
c9s
0426c18757
scmaker: initialize order executor before we setup risk control 2023-07-03 17:39:42 +08:00
c9s
ae3f371551
all: refactor risk control and integrate risk control into scmaker 2023-07-03 17:09:13 +08:00
randy
9a98c4995e Add two risk controls for strategies: postion and circuit break. 2023-06-29 16:52:35 +08:00
c9s
5515f588e3
all: add parameter index to the Last method 2023-05-31 19:35:44 +08:00
Andy Cheng
d5e37f03e2 feature/dynamic_*: move dynamic_* to risk/dynamicrisk package 2022-12-16 11:51:52 +08:00
Andy Cheng
095eb9c134 feature/dynamic_exposure: undo move dynamic_exposure and dynamic_spread 2022-12-15 17:25:56 +08:00
Andy Cheng
5b017cd361 feature/dynamic_spread: rename DynamicSpreadAmp to DynamicAmpSpread 2022-12-15 17:12:04 +08:00
Andy Cheng
5c7c125c99 feature/dynamic_spread: move to risk package 2022-12-15 17:09:47 +08:00
Andy Cheng
1002c13062 feature/dynamic_exposure: move to risk package 2022-12-15 17:08:35 +08:00
c9s
8dca24e9ee
all: solve cyclic import 2022-09-09 17:40:17 +08:00
c9s
2e95246687
bbgo: add OpenPosition method 2022-09-09 13:57:39 +08:00
Andy Cheng
3da86556b5 risk: AvailableQuote() should use Net() to get net value 2022-08-13 13:28:45 +08:00
Andy Cheng
737f6e99ba strategy/supertrend: use CalculateQuoteQuantity() in strategy 2022-08-05 16:28:42 +08:00
Andy Cheng
b564e69f82 strategy/supertrend: add CalculateQuoteQuantity() 2022-08-05 15:59:20 +08:00
Andy Cheng
dba1102588 strategy/supertrend: rename AvailableValue() to AvailableQuote() 2022-08-05 15:38:19 +08:00
Andy Cheng
eb57e80119 strategy/supertrend: different qty calculation for spot and leveraged 2022-08-05 15:11:15 +08:00
c9s
076f196621
risk: return quantity directly if it's not zero 2022-07-27 01:29:53 +08:00
c9s
bdfb5d08aa
risk: pull out max quantity variable 2022-07-26 11:47:07 +08:00
c9s
a609c0606a
risk: fix margin level prec assertion 2022-07-22 15:06:10 +08:00
c9s
4b7126ce41
risk: add doc comment for MarginLevel method 2022-07-22 14:54:25 +08:00
c9s
a9f9fc4e5e
risk: add margin level calculator 2022-07-22 14:53:17 +08:00
c9s
b53da177c2
risk: add test case for account calculator 2022-07-22 14:42:30 +08:00
c9s
3cf5175baa
risk: make calculateAccountNetValue public 2022-07-22 13:36:03 +08:00
c9s
a1387bb4dd
risk: move spot condition to the top 2022-07-22 12:04:43 +08:00
c9s
36cfaa924d
risk: move leverage quantity calculation to the risk package 2022-07-22 11:55:24 +08:00
c9s
5bbccacc89
risk: rename func 2022-07-14 00:07:49 +08:00
c9s
c7424479bb
risk: add tests 2022-07-14 00:03:47 +08:00
c9s
8985a7a635
risk: add risk function tests 2022-07-13 23:56:22 +08:00
c9s
7932688aa7
add risk calculator functions 2022-07-13 23:45:47 +08:00