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

Chains the drawn changes (Paparoditis and Politis): the path's previous close plus value - from. More...

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

Public Member Functions

double join (double level, double from, double value) const
 Returns the path's price for a drawn price.

Static Public Attributes

static constexpr bool any_sign = true
 Prices at or below zero are joined, not refused.

Detailed Description

Chains the drawn changes (Paparoditis and Politis): the path's previous close plus value - from.

Definition at line 178 of file bootstrap.hpp.

Member Function Documentation

◆ join()

double algotradelib::backtest::Differences::join ( double level,
double from,
double value ) const
inline

Returns the path's price for a drawn price.

Parameters
levelThe path's previous close, in grid units.
fromThe drawn day's previous close in the history, in grid units.
valueThe drawn day's price, in grid units.
Returns
level + (value - from).
Exceptions
std::invalid_argumentif value - from is at or beyond 2^53 units in magnitude.

Definition at line 190 of file bootstrap.hpp.

Member Data Documentation

◆ any_sign

bool algotradelib::backtest::Differences::any_sign = true
staticconstexpr

Prices at or below zero are joined, not refused.

Definition at line 180 of file bootstrap.hpp.


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