Documentation
¶
Index ¶
- Constants
- func Backtest(ctx context.Context, graphConfig *Configuration, symbol string, ...) (*models.TimeSeries, error)
- func EvalSlope(ctx context.Context, graphConfig *Configuration, symbol string, ...) (*models.TimeSeries, error)
- func GetConfigSchema() *gojsonschema.Schema
- func GetCoreHours(d date.Date) timespan.TimeSpan
- func MaxTotalWarmupPeriod(blks Blocks, g gr.Graph[string, string], order []string) (int, error)
- func Run(ctx context.Context, cfg *Configuration, symbol string, ts timespan.TimeSpan, ...) (*models.TimeSeries, error)
- func RunDay(ctx context.Context, cfg *Configuration, symbol string, d date.Date, ...) (*models.TimeSeries, error)
- type Address
- type BlockConfig
- type Blocks
- func (blocks Blocks) Connect(conns []*Connection) (gr.Graph[string, string], error)
- func (blocks Blocks) FindInput(addr *Address) (blocks.Input, bool)
- func (blocks Blocks) FindOutput(addr *Address) (blocks.Output, bool)
- func (blocks Blocks) FindParam(addr *Address) (blocks.Param, bool)
- func (blocks Blocks) Init() error
- type Configuration
- func (cfg Configuration) ClearAllRecorded()
- func (cfg Configuration) FindBlockConfig(name string) (*BlockConfig, bool)
- func (cfg Configuration) GetKey() string
- func (cfg Configuration) MakeBlocks() (Blocks, []error)
- func (cfg Configuration) SetRecording(addr *Address) error
- func (cfg *Configuration) Validate() []error
- type Connection
- type Graph
Constants ¶
View Source
const ConfigKeyName = "id"
View Source
const ConfigSchemaStr = `` /* 1732-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func Backtest ¶
func Backtest( ctx context.Context, graphConfig *Configuration, symbol string, testDate date.Date, loc *time.Location, load models.LoadBarsFunc, predictor *Address, threshold float64, ) (*models.TimeSeries, error)
func EvalSlope ¶
func EvalSlope( ctx context.Context, graphConfig *Configuration, symbol string, evalDate date.Date, loc *time.Location, load models.LoadBarsFunc, source, predictor *Address, horizon int, ) (*models.TimeSeries, error)
func GetConfigSchema ¶
func GetConfigSchema() *gojsonschema.Schema
func MaxTotalWarmupPeriod ¶
func Run ¶
func Run( ctx context.Context, cfg *Configuration, symbol string, ts timespan.TimeSpan, loc *time.Location, load models.LoadBarsFunc, ) (*models.TimeSeries, error)
func RunDay ¶
func RunDay( ctx context.Context, cfg *Configuration, symbol string, d date.Date, loc *time.Location, load models.LoadBarsFunc, ) (*models.TimeSeries, error)
Types ¶
type Address ¶
type Address struct {
A, B string
}
func NewAddress ¶
func ParseAddress ¶
func (*Address) MarshalJSON ¶
func (*Address) UnmarshalJSON ¶
type BlockConfig ¶
type Configuration ¶
type Configuration struct {
ID string `json:"id" bson:"_id"`
Name string `json:"name"`
Blocks []*BlockConfig `json:"blocks"`
}
func (Configuration) ClearAllRecorded ¶
func (cfg Configuration) ClearAllRecorded()
func (Configuration) FindBlockConfig ¶
func (cfg Configuration) FindBlockConfig(name string) (*BlockConfig, bool)
func (Configuration) GetKey ¶
func (cfg Configuration) GetKey() string
func (Configuration) MakeBlocks ¶
func (cfg Configuration) MakeBlocks() (Blocks, []error)
func (Configuration) SetRecording ¶
func (cfg Configuration) SetRecording(addr *Address) error
func (*Configuration) Validate ¶
func (cfg *Configuration) Validate() []error
type Connection ¶
type Graph ¶
type Graph struct {
*Configuration
// contains filtered or unexported fields
}
func New ¶
func New(cfg *Configuration) *Graph
func (*Graph) GetWarmupPeriod ¶
Click to show internal directories.
Click to hide internal directories.