algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::backtest::ReplayConfig Struct Reference

A replay's settings, besides the strategy and the bars. More...

#include <algotradelib/src/backtest/engine.hpp>

Collaboration diagram for algotradelib::backtest::ReplayConfig:

Public Attributes

Decimal64 cash_ {Decimal64::parse("10000000")}
 The starting cash, in currency_.
Currency currency_ {Currency{"KRW"}}
 The accounting currency; the equity curve is in this currency only.
std::vector< Instrument > instruments_
 Reference data for every instrument replayed; orders on an instrument without it are refused.
strategy::RiskLimits limits_
 The risk limits, applied as they are live.
strategy::SessionWindow session_ {strategy::SessionWindow::krx()}
 The session window phases are derived from and DAY orders expire at; one for the whole replay.
std::size_t series_capacity_ {512}
 How many trailing bars the context caches per series, for indicators; must be positive.
TradingCalendar calendar_
 The calendar ctx.calendar() returns, for a strategy asking about dates it has no bar for (such as whether tomorrow trades).

Detailed Description

A replay's settings, besides the strategy and the bars.

Definition at line 389 of file engine.hpp.

Member Data Documentation

◆ calendar_

TradingCalendar algotradelib::backtest::ReplayConfig::calendar_

The calendar ctx.calendar() returns, for a strategy asking about dates it has no bar for (such as whether tomorrow trades).

Empty by default. It does not change the phase of a fed bar, which comes from feed's trading_day argument.

Definition at line 415 of file engine.hpp.

◆ cash_

Decimal64 algotradelib::backtest::ReplayConfig::cash_ {Decimal64::parse("10000000")}

The starting cash, in currency_.

Definition at line 391 of file engine.hpp.

◆ currency_

Currency algotradelib::backtest::ReplayConfig::currency_ {Currency{"KRW"}}

The accounting currency; the equity curve is in this currency only.

Definition at line 393 of file engine.hpp.

◆ instruments_

std::vector<Instrument> algotradelib::backtest::ReplayConfig::instruments_

Reference data for every instrument replayed; orders on an instrument without it are refused.

Definition at line 395 of file engine.hpp.

◆ limits_

strategy::RiskLimits algotradelib::backtest::ReplayConfig::limits_

The risk limits, applied as they are live.

Definition at line 397 of file engine.hpp.

◆ series_capacity_

std::size_t algotradelib::backtest::ReplayConfig::series_capacity_ {512}

How many trailing bars the context caches per series, for indicators; must be positive.

Definition at line 407 of file engine.hpp.

◆ session_

strategy::SessionWindow algotradelib::backtest::ReplayConfig::session_ {strategy::SessionWindow::krx()}

The session window phases are derived from and DAY orders expire at; one for the whole replay.

Set it to the replayed market's session: US bars under the KRX default would expire orders at the KRX close.

Definition at line 405 of file engine.hpp.


The documentation for this struct was generated from the following file: