advisor

package
v0.0.0-...-eabca8b Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyNoFeature = "No.Feature"
	KeyFeature01 = "Feature.01"
	KeyFeature02 = "Feature.02"
	KeyFeature03 = "Feature.03"
	KeyFeature04 = "Feature.04"
	KeyFeature05 = "Feature.05"
	KeyFeature06 = "Feature.06"
	KeyFeature07 = "Feature.07"
)
View Source
const (
	Day  = "day"
	Week = "week"
)
View Source
const (
	LimitDay  = 250
	LimitWeek = 80
)

Variables

View Source
var (
	HeuristicRules map[string]Rule
	Selectors      []Selector
)

Functions

This section is empty.

Types

type Record

type Record struct {
	Stock *model.Stock
	Date  string
	Days  []*model.Quote
	Weeks []*model.Quote
}

func BuildRecord

func BuildRecord(stock *model.Stock) (*Record, error)

func (*Record) RuleFeature01

func (r *Record) RuleFeature01() Rule

func (*Record) RuleFeature02

func (r *Record) RuleFeature02() Rule

func (*Record) RuleFeature03

func (r *Record) RuleFeature03() Rule

func (*Record) RuleFeature04

func (r *Record) RuleFeature04() Rule

func (*Record) RuleFeature05

func (r *Record) RuleFeature05() Rule

func (*Record) RuleFeature06

func (r *Record) RuleFeature06() Rule

func (*Record) RuleFeature07

func (r *Record) RuleFeature07() Rule

func (*Record) RuleNoFeature

func (r *Record) RuleNoFeature() Rule

type Report

type Report struct {
	Code      string     `json:"code"`
	Name      string     `json:"name"`
	Selectors []Selector `json:"-"`
}

func Find

func Find(record *Record) *Report

func (*Report) String

func (r *Report) String() string

type Rule

type Rule struct {
	Keywords  string
	Item      string
	Score     int
	Func      func(*Record) Rule
	ExtraDesc []string
}

type Selector

type Selector struct {
	Name  string
	Rules []func(*Record) Rule
}

func (Selector) String

func (s Selector) String() string

Jump to

Keyboard shortcuts

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