init
This commit is contained in:
31
arb/stat_spike.go
Normal file
31
arb/stat_spike.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user