optimizer

package
v1.33.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: AGPL-3.0 Imports: 12 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TotalProfitMetricValueFunc = func(summaryReport *backtest.SummaryReport) fixedpoint.Value {
	return summaryReport.TotalProfit
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Matrix []SelectorConfig `yaml:"matrix"`
}

func LoadConfig

func LoadConfig(yamlConfigFileName string) (*Config, error)

type Executor

type Executor interface {
	Execute(configJson []byte) (*backtest.SummaryReport, error)
}

type GridOptimizer

type GridOptimizer struct {
	Config *Config

	ParamLabels   []string
	CurrentParams []interface{}
}

func (*GridOptimizer) Run

func (o *GridOptimizer) Run(executor Executor, configJson []byte) ([]Metric, error)

type LocalProcessExecutor

type LocalProcessExecutor struct {
	Bin       string
	WorkDir   string
	ConfigDir string
	OutputDir string
}

func (*LocalProcessExecutor) Execute

func (e *LocalProcessExecutor) Execute(configJson []byte) (*backtest.SummaryReport, error)

type Metric

type Metric struct {
	Labels []string         `json:"labels,omitempty"`
	Params []interface{}    `json:"params,omitempty"`
	Value  fixedpoint.Value `json:"value,omitempty"`
}

type MetricValueFunc

type MetricValueFunc func(summaryReport *backtest.SummaryReport) fixedpoint.Value

type OpFunc

type OpFunc func(configJson []byte, next func(configJson []byte) error) error

type SelectorConfig

type SelectorConfig struct {
	Type   string           `json:"type" yaml:"type"`
	Label  string           `json:"label,omitempty" yaml:"label,omitempty"`
	Path   string           `json:"path" yaml:"path"`
	Values []string         `json:"values,omitempty" yaml:"values,omitempty"`
	Min    fixedpoint.Value `json:"min,omitempty" yaml:"min,omitempty"`
	Max    fixedpoint.Value `json:"max,omitempty" yaml:"max,omitempty"`
	Step   fixedpoint.Value `json:"step,omitempty" yaml:"step,omitempty"`
}

Jump to

Keyboard shortcuts

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