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

One point on a replay's equity curve, recorded per bar. More...

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

Collaboration diagram for algotradelib::backtest::EquityPoint:

Public Attributes

std::chrono::system_clock::time_point at_ {}
 The bar's period end.
Decimal64 equity_
 Cash plus positions marked at the bar's close, in the replay's currency.
math::Scalar period_return_ {0}
 The return since the previous point; missing() on the first point, after an unvalued bar, and after a point whose equity was zero or negative (a return on no capital is not defined).

Detailed Description

One point on a replay's equity curve, recorded per bar.

Definition at line 291 of file engine.hpp.

Member Data Documentation

◆ at_

std::chrono::system_clock::time_point algotradelib::backtest::EquityPoint::at_ {}

The bar's period end.

Definition at line 293 of file engine.hpp.

◆ equity_

Decimal64 algotradelib::backtest::EquityPoint::equity_

Cash plus positions marked at the bar's close, in the replay's currency.

Definition at line 295 of file engine.hpp.

◆ period_return_

math::Scalar algotradelib::backtest::EquityPoint::period_return_ {0}

The return since the previous point; missing() on the first point, after an unvalued bar, and after a point whose equity was zero or negative (a return on no capital is not defined).

A statistic over these returns skips the missing ones. summarize refuses its ratios for a run that reached non-positive equity before its last point; reducing a slice yourself, apply the same check to the equity each return is measured from.

Definition at line 304 of file engine.hpp.


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