execution

package
v0.0.0-...-ab49fd9 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backtest

type Backtest struct {
	ID string `json:"-"`

	Workers worker.Pool `json:"-"`
	// contains filtered or unexported fields
}

func (*Backtest) ConfigureBacktest

func (e *Backtest) ConfigureBacktest(ctx context.Context, config *engine.BacktestConfig) error

func (*Backtest) ConfigureWorker

func (e *Backtest) ConfigureWorker(ctx context.Context, config *worker.Configuration) error

func (*Backtest) Run

func (e *Backtest) Run(ctx context.Context) error

Run Runs configured workers and Backtest until completed

func (*Backtest) SetDependencies

func (e *Backtest) SetDependencies(log *zap.Logger, periods storage.PeriodStorage, orders financeStorage.OrderStorage, positions financeStorage.PositionStorage)

func (*Backtest) Stop

func (e *Backtest) Stop(ctx context.Context) error

Stop Halts all workers and Backtest

type Execution

type Execution interface {
	SetDependencies(log *zap.Logger, periods storage.PeriodStorage, orders financeStorage.OrderStorage, positions financeStorage.PositionStorage)
	ConfigureBacktest(context.Context, *engine.BacktestConfig) error
	ConfigureWorker(context.Context, *worker.Configuration) error
	Run(context.Context) error
	Stop(context.Context) error
}

func NewExecution

func NewExecution(ID string, log *zap.Logger, periods storage.PeriodStorage, orders financeStorage.OrderStorage, positions financeStorage.PositionStorage,
	engine engine.Engine, workers worker.Pool) Execution

type Result

type Result struct {
	Periods []storage.Period `json:"periods"`
}

Jump to

Keyboard shortcuts

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