models

package
v0.0.0-...-bbd37fe Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const EvalSlope = "slope"
View Source
const SettingKeyName = "name"

Variables

This section is empty.

Functions

This section is empty.

Types

type BacktestRequest

type BacktestRequest struct {
	Symbol     string         `json:"symbol"`
	Date       date.Date      `json:"date"`
	TimeZone   string         `json:"timeZone"`
	ShowWarmup bool           `json:"showWarmup,omitempty"`
	Predictor  *graph.Address `json:"predictor"`
	Threshold  float64        `json:"threshold"`
}

type BlockInfo

type BlockInfo struct {
	Type    string   `json:"type"`
	Descr   string   `json:"description"`
	Params  []*Param `json:"params"`
	Inputs  []*Input `json:"inputs"`
	Outputs []*Port  `json:"outputs"`
}

func NewBlockInfo

func NewBlockInfo(b blocks.Block) *BlockInfo

type Constraint

type Constraint struct {
	Type   string `json:"type"`
	Limits []any  `json:"limits"`
}

type EvalSlopeRequest

type EvalSlopeRequest struct {
	Symbol     string         `json:"symbol"`
	Date       date.Date      `json:"date"`
	TimeZone   string         `json:"timeZone"`
	ShowWarmup bool           `json:"showWarmup,omitempty"`
	Source     *graph.Address `json:"source"`
	Predictor  *graph.Address `json:"predictor"`
	Horizon    int            `json:"horizon"`
}

type Input

type Input struct {
	*Port
	Optional bool `json:"optional"`
}

type Param

type Param struct {
	Name       string      `json:"name"`
	Type       string      `json:"type"`
	Default    any         `json:"default"`
	Constraint *Constraint `json:"constraint"`
}

type Port

type Port struct {
	Name  string `json:"name"`
	Type  string `json:"type"`
	Async bool   `json:"async"`
}

type RunDayRequest

type RunDayRequest struct {
	Graph     *graph.Configuration `json:"graph"`
	Symbol    string               `json:"symbol"`
	Date      date.Date            `json:"date"`
	TimeZone  string               `json:"timeZone"`
	NumCharts int                  `json:"numCharts"`
}

type Setting

type Setting struct {
	Name  string `json:"name" bson:"_id"`
	Value any    `json:"value"`
}

func (*Setting) GetKey

func (s *Setting) GetKey() string

func (*Setting) Validate

func (s *Setting) Validate() []error

Jump to

Keyboard shortcuts

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