![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
Helpers for the vanilla strategies that compute indicators. More...
#include <algotradelib/analytics>#include <cstddef>#include <optional>#include <stdexcept>Go to the source code of this file.
Classes | |
| struct | algotradelib::strategy::vanilla::Crossing |
| The last two values of an indicator line, for testing a crossing. More... | |
Namespaces | |
| namespace | algotradelib |
| The library: broker-neutral types (core), and the modules below. | |
| namespace | algotradelib::strategy |
| What a strategy sees and emits: events, intents, the portfolio, reconciliation and risk limits. | |
| namespace | algotradelib::strategy::vanilla |
| The strategies this library ships (buy and hold, crossovers, mean reversion, sizing, liquidation). | |
Functions | |
| std::optional< Crossing > | algotradelib::strategy::vanilla::last_two (const math::Vector &line) |
| Returns the last two values of a line. | |
| math::Vector | algotradelib::strategy::vanilla::adjusted_ema (math::SeriesView values, math::Scalar alpha, std::size_t min_observed=1) |
| Computes the bias-adjusted exponential moving average. | |
| math::Vector | algotradelib::strategy::vanilla::exponential_line (math::SeriesView closes, std::size_t span) |
| Computes the exponential moving average MovingAverageCrossover reads. | |
| std::optional< math::SeriesView > | algotradelib::strategy::vanilla::trailing (math::SeriesView values, std::size_t count) |
| Returns the last count + 1 rows of a series. | |
Helpers for the vanilla strategies that compute indicators.
Needs a linear algebra backend (ATL_USE_EIGEN=ON). BuyAndHold and TimedLiquidation do not.
Definition in file signal.hpp.