third version

This commit is contained in:
2026-06-08 07:05:01 +00:00
parent 282c841e11
commit 52a935b8b4
20 changed files with 1371 additions and 151 deletions
+3 -3
View File
@@ -74,7 +74,7 @@ func (e Engine) Evaluate(c Candidate) domain.Signal {
"ticker": c.Instrument.Ticker,
"fund_type": c.Instrument.FundType,
"trading_status": c.TradingStatus,
"spread_limit": e.spreadLimit(c.Instrument).String(),
"spread_limit": e.SpreadLimit(c.Instrument).String(),
}
for k, v := range c.ExtraContext {
context[k] = v
@@ -122,7 +122,7 @@ func (e Engine) firstRejectReason(c Candidate) string {
return ReasonWinRate
case features.NetEdgeBps.LessThan(e.cfg.MinNetEdgeBps):
return ReasonNetEdge
case features.SpreadBps.GreaterThan(e.spreadLimit(instr)):
case features.SpreadBps.GreaterThan(e.SpreadLimit(instr)):
return ReasonSpread
case features.TickBps.GreaterThan(e.cfg.MaxTickBps):
return ReasonTick
@@ -137,7 +137,7 @@ func (e Engine) firstRejectReason(c Candidate) string {
}
}
func (e Engine) spreadLimit(instr domain.Instrument) decimal.Decimal {
func (e Engine) SpreadLimit(instr domain.Instrument) decimal.Decimal {
fundType := strings.ToLower(instr.FundType)
switch {
case strings.Contains(fundType, "money"):