![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
The strategy's settings. More...
#include <algotradelib/src/strategy/vanilla/reversion.hpp>
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. | |
The strategy's settings.
Definition at line 27 of file reversion.hpp.
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().