2 Star 5 Fork 10

王布衣/engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
cache_xdxr.go 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
王布衣 提交于 2023-10-12 11:03 . 新增数据验证check接口
package datasets
import (
"gitee.com/quant1x/engine/cache"
"gitee.com/quant1x/engine/datasets/base"
"gitee.com/quant1x/gotdx/quotes"
)
type DataXdxr struct {
DataCache
}
func (x *DataXdxr) Check(cacheDate, featureDate string) {
//TODO implement me
panic("implement me")
}
func (x *DataXdxr) Provider() string {
return cache.DefaultDataProvider
}
func init() {
_ = cache.Register(&DataXdxr{})
}
func (x *DataXdxr) Usage() string {
//TODO implement me
panic("implement me")
}
func (x *DataXdxr) Print(code string, date ...string) {
//TODO implement me
panic("implement me")
}
func (x *DataXdxr) Init(barIndex *int, date string) error {
_ = barIndex
_ = date
return nil
}
func (x *DataXdxr) Kind() DataKind {
return BaseXdxr
}
func (x *DataXdxr) Name() string {
return mapDataSets[x.Kind()].Name
}
func (x *DataXdxr) Key() string {
return mapDataSets[x.Kind()].Key
}
func (x *DataXdxr) Filename(date, code string) string {
x.filename = cache.XdxrFilename(x.Code)
return x.filename
}
func (x *DataXdxr) Update(cacheDate, featureDate string) {
base.UpdateXdxrInfo(x.Code)
_ = cacheDate
_ = featureDate
}
func (x *DataXdxr) Repair(cacheDate, featureDate string) {
base.UpdateXdxrInfo(x.Code)
_ = cacheDate
_ = featureDate
}
func (x *DataXdxr) Increase(snapshot quotes.Snapshot) {
// 除权除息没有增量计算的逻辑
_ = snapshot
}
func (x *DataXdxr) Clone(date string, code string) DataSet {
var dest = DataXdxr{DataCache{Date: date, Code: code}}
return &dest
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
v0.2.8

搜索帮助