2 Star 15 Fork 17

王布衣/engine

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
cache_xdxr.go 1.47 KB
Copy Edit Raw Blame History
王布衣 authored 2023-10-12 11:03 +08:00 . 新增数据验证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
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
v0.2.3

Search