This commit is contained in:
2026-08-24 20:53:21 +08:00
commit 6e78bba16a
287 changed files with 32443 additions and 0 deletions

31
arb/stat_spike.go Normal file
View File

@@ -0,0 +1,31 @@
package arb
import (
"fmt"
"github.com/banbox/banbot/config"
"github.com/banbox/banbot/core"
"github.com/banbox/banexg/errs"
)
/*
捕捉价格比率的瞬时剧烈波动
*/
func FindTupleSpikes() *errs.Error {
tf := "1m"
endMS := config.TimeRange.EndMS
items, err := findSpikeTuples(endMS, tf, 2000, 5, 5)
if err != nil {
return err
}
fmt.Println("tuple,score,slope,pftRate,rawXBig")
for _, t := range items {
codeA, _, _, _ := core.SplitSymbol(t.A.Symbol)
codeB, _, _, _ := core.SplitSymbol(t.B.Symbol)
if codeA > codeB {
codeA, codeB = codeB, codeA
}
fmt.Printf("%s/%s,%.2f,%.4f,%.3f,%v\n", codeA, codeB, t.Score, t.BigSlope, t.PftRate, t.RawXBig)
}
return nil
}