algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::strategy::vanilla::ZScoreReversion::Params Struct Reference

The strategy's settings. More...

#include <algotradelib/src/strategy/vanilla/reversion.hpp>

Collaboration diagram for algotradelib::strategy::vanilla::ZScoreReversion::Params:

Public Attributes

InstrumentId instrument_
 The instrument to trade; bars for any other instrument are ignored.
std::size_t window_ {20}
 The number of closes the z-score is measured over; below 2, nothing is traded.
math::Scalar entry_ {2.0}
 How many standard deviations below the mean to buy at; positive, or nothing is traded.
math::Scalar exit_ {0.5}
 The z-score -exit_ at which to sell; positive and less than entry_, or nothing is traded.
Decimal64 quantity_
 The shares to hold while in a position.
std::string tag_ {"zscore-reversion"}
 The tag on the targets.

Detailed Description

The strategy's settings.

Definition at line 27 of file reversion.hpp.

Member Data Documentation

◆ entry_

math::Scalar algotradelib::strategy::vanilla::ZScoreReversion::Params::entry_ {2.0}

How many standard deviations below the mean to buy at; positive, or nothing is traded.

Definition at line 33 of file reversion.hpp.

Referenced by algotradelib::strategy::vanilla::ZScoreReversion::on_bar().

◆ exit_

math::Scalar algotradelib::strategy::vanilla::ZScoreReversion::Params::exit_ {0.5}

The z-score -exit_ at which to sell; positive and less than entry_, or nothing is traded.

Definition at line 35 of file reversion.hpp.

Referenced by algotradelib::strategy::vanilla::ZScoreReversion::on_bar().

◆ instrument_

InstrumentId algotradelib::strategy::vanilla::ZScoreReversion::Params::instrument_

The instrument to trade; bars for any other instrument are ignored.

Definition at line 29 of file reversion.hpp.

Referenced by algotradelib::strategy::vanilla::ZScoreReversion::on_bar().

◆ quantity_

Decimal64 algotradelib::strategy::vanilla::ZScoreReversion::Params::quantity_

The shares to hold while in a position.

Definition at line 37 of file reversion.hpp.

Referenced by algotradelib::strategy::vanilla::ZScoreReversion::on_bar().

◆ tag_

std::string algotradelib::strategy::vanilla::ZScoreReversion::Params::tag_ {"zscore-reversion"}

The tag on the targets.

Definition at line 39 of file reversion.hpp.

Referenced by algotradelib::strategy::vanilla::ZScoreReversion::on_bar().

◆ window_

std::size_t algotradelib::strategy::vanilla::ZScoreReversion::Params::window_ {20}

The number of closes the z-score is measured over; below 2, nothing is traded.

Definition at line 31 of file reversion.hpp.

Referenced by algotradelib::strategy::vanilla::ZScoreReversion::on_bar(), and algotradelib::strategy::vanilla::ZScoreReversion::warmup_bars().


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