You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
487 B
24 lines
487 B
package trade |
|
|
|
import ( |
|
"sig-pub/pkg/types" |
|
) |
|
|
|
type IRickStrategy interface { |
|
OnSingle(signalSide types.Side) |
|
} |
|
|
|
// RiskStrategy 风险管理策略 |
|
type RiskStrategy struct { |
|
} |
|
|
|
func NewRiskStrategy() *RiskStrategy { |
|
return &RiskStrategy{} |
|
} |
|
|
|
// SideAssess 收到信号时进行评估, 返回过滤后的交易信号 |
|
// todo 对交易方向进行信心分数评估, 后续开仓仓位 |
|
func (s *RiskStrategy) SideAssess(signalSide types.Side) (side types.Side) { |
|
|
|
return signalSide |
|
}
|
|
|