2 Star 14 Fork 16

王布衣/engine

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
command_backtesting.go 572 Bytes
Copy Edit Raw Blame History
王布衣 authored 2023-12-03 05:10 +08:00 . 调整统计参数归于模型
package command
import (
"gitee.com/quant1x/engine/models"
"gitee.com/quant1x/engine/tracker"
cmder "github.com/spf13/cobra"
)
var (
days int // 统计多少天
topN int // 统计前N
)
// CmdBackTesting 回测
var CmdBackTesting = &cmder.Command{
Use: "backtesting",
Short: "回测",
Run: func(cmd *cmder.Command, args []string) {
tracker.BackTesting(days, topN)
},
}
func initBackTesting() {
CmdBackTesting.Flags().IntVar(&days, "count", 0, "统计多少天")
CmdBackTesting.Flags().IntVar(&topN, "top", models.AllStockTopN(), "输出前排几名")
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
v0.7.9

Search