Documentation ¶
Index ¶
- Constants
- type AutomatedBacktest
- func (e *AutomatedBacktest) Configure(ctx context.Context) error
- func (e *AutomatedBacktest) Load(ctx context.Context, config *config.Config, ...) error
- func (b *AutomatedBacktest) MarshalJSON() ([]byte, error)
- func (e *AutomatedBacktest) Run(ctx context.Context) error
- func (e *AutomatedBacktest) SetDependencies(log *zap.Logger, periods storage.PeriodStorage, ...)
- func (e *AutomatedBacktest) Stop(ctx context.Context) error
- type AutomatedScheduler
- type Backtest
- type ManualBacktest
- func (b *ManualBacktest) Configure(ctx context.Context) error
- func (b *ManualBacktest) Load(ctx context.Context, config *config.Config, ...) error
- func (b *ManualBacktest) MarshalJSON() ([]byte, error)
- func (b *ManualBacktest) Run(ctx context.Context) error
- func (e *ManualBacktest) SetDependencies(log *zap.Logger, periods storage.PeriodStorage, ...)
- func (b *ManualBacktest) Stop(ctx context.Context) error
- type NewBacktestPayload
- type Scheduler
Constants ¶
View Source
const NewBacktestTopic = "strategy.NewBacktest"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutomatedBacktest ¶
type AutomatedBacktest struct { Storage *storage.Backtest `json:"storage"` // contains filtered or unexported fields }
func (*AutomatedBacktest) Configure ¶
func (e *AutomatedBacktest) Configure(ctx context.Context) error
Configure
func (*AutomatedBacktest) Load ¶
func (e *AutomatedBacktest) Load(ctx context.Context, config *config.Config, instances ...*serviceStorage.Instance) error
func (*AutomatedBacktest) MarshalJSON ¶
func (b *AutomatedBacktest) MarshalJSON() ([]byte, error)
func (*AutomatedBacktest) Run ¶
func (e *AutomatedBacktest) Run(ctx context.Context) error
Run Runs configured workers and backtest until completed
func (*AutomatedBacktest) SetDependencies ¶
func (e *AutomatedBacktest) SetDependencies(log *zap.Logger, periods storage.PeriodStorage, orders financeStorage.OrderStorage, positions financeStorage.PositionStorage)
type AutomatedScheduler ¶
type AutomatedScheduler struct {
// contains filtered or unexported fields
}
func (*AutomatedScheduler) Start ¶
func (a *AutomatedScheduler) Start()
func (*AutomatedScheduler) Stop ¶
func (a *AutomatedScheduler) Stop()
type Backtest ¶
type Backtest interface { SetDependencies(log *zap.Logger, periods storage.PeriodStorage, orders financeStorage.OrderStorage, positions financeStorage.PositionStorage) Load(ctx context.Context, config *config.Config, instances ...*serviceStorage.Instance) error Configure(context.Context) error Run(context.Context) error Stop(context.Context) error }
type ManualBacktest ¶
type ManualBacktest struct { Storage *storage.Backtest `json:"storage"` // contains filtered or unexported fields }
func (*ManualBacktest) Load ¶
func (b *ManualBacktest) Load(ctx context.Context, config *config.Config, instances ...*serviceStorage.Instance) error
func (*ManualBacktest) MarshalJSON ¶
func (b *ManualBacktest) MarshalJSON() ([]byte, error)
func (*ManualBacktest) SetDependencies ¶
func (e *ManualBacktest) SetDependencies(log *zap.Logger, periods storage.PeriodStorage, orders financeStorage.OrderStorage, positions financeStorage.PositionStorage)
type NewBacktestPayload ¶
type NewBacktestPayload struct { ID string `json:"id"` Backtest serviceStorage.Service `json:"backtest"` Worker serviceStorage.Service `json:"worker"` }
type Scheduler ¶
type Scheduler interface { Start() Stop() }
func NewAutomatedScheduler ¶
func NewAutomatedScheduler(config *config.Config, log *zap.Logger, stream stream.Stream, strategies storage.StrategyStorage, backtests storage.BacktestStorage, services serviceStorage.ServiceStorage) Scheduler
Click to show internal directories.
Click to hide internal directories.