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

How a Market starts and what it charges. More...

#include <algotradelib/src/brokers/mock/market.hpp>

Collaboration diagram for algotradelib::mock::MarketSettings:

Public Attributes

Money cash_ {Decimal64(0, 0), Currency{"KRW"}}
 The starting cash, in the one currency the market keeps cash in.
std::chrono::system_clock::time_point start_ {}
 The market's first instant; bars that ended by then are history.
backtest::NextBarFillModel fills_ {}
 The fill rule and its costs, as a backtest's; no commission, slippage or tax by default.
strategy::SessionWindow session_ {strategy::SessionWindow::krx()}
 The session window local dates and the close are read in, as a backtest's (backtest::ReplayConfig::session_): a DAY order lives for one session.
std::optional< TradingCalendar > calendar_
 The trading days the market publishes, as a backtest is given them (backtest::ReplayConfig::calendar_).

Detailed Description

How a Market starts and what it charges.

Definition at line 85 of file market.hpp.

Member Data Documentation

◆ calendar_

std::optional<TradingCalendar> algotradelib::mock::MarketSettings::calendar_

The trading days the market publishes, as a backtest is given them (backtest::ReplayConfig::calendar_).

Empty by default: then every local date from the first bar to the last, open where any instrument has a bar and closed where none has, for the country of the first instrument that has bars (KR when none has); dates outside are uncovered. The local dates are session_'s, one offset for every instrument; give the loop the same window (runner::PollingLoop::set_session_window).

Definition at line 106 of file market.hpp.

◆ cash_

Money algotradelib::mock::MarketSettings::cash_ {Decimal64(0, 0), Currency{"KRW"}}

The starting cash, in the one currency the market keeps cash in.

Definition at line 87 of file market.hpp.

◆ fills_

backtest::NextBarFillModel algotradelib::mock::MarketSettings::fills_ {}

The fill rule and its costs, as a backtest's; no commission, slippage or tax by default.

Definition at line 91 of file market.hpp.

◆ session_

strategy::SessionWindow algotradelib::mock::MarketSettings::session_ {strategy::SessionWindow::krx()}

The session window local dates and the close are read in, as a backtest's (backtest::ReplayConfig::session_): a DAY order lives for one session.

Definition at line 96 of file market.hpp.

◆ start_

std::chrono::system_clock::time_point algotradelib::mock::MarketSettings::start_ {}

The market's first instant; bars that ended by then are history.

Definition at line 89 of file market.hpp.


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