factors

package
v2.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataBuilder

type DataBuilder struct {
	Name          string // 名称
	CacheDate     string // 缓存文件日期
	ResourcesDate string // 源数据日期, 一般来说源数据日期要比缓存文件的日期早一个交易日
	Build         func(bar *progressbar.Bar, allCodes []string)
}

DataBuilder 数据构建器

func NewDataBuilder

func NewDataBuilder(name, date string, build func(bar *progressbar.Bar, allCodes []string)) *DataBuilder

func (*DataBuilder) Execute

func (this *DataBuilder) Execute(bar *progressbar.Bar, allCodes []string)

type Factor

type Factor interface {
	Init()                                       // 初始化
	Name() string                                // 因子名称
	Weight() uint64                              // 权重
	Execute(securityCode, date string) (ok bool) // 执行
}

Factor 因子

type Feature

type Feature interface {
	Kind() uint64 // 类型
	Name() string // 特征名称
}

Feature 特征

type FeatureKind

type FeatureKind = uint64
const (
	FeatureKLineShap FeatureKind = 1 << iota // K线形态等

)
const (
	FeatureNone FeatureKind = 0
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL