![]() |
Trading System API
3.0
Library for Simulating and Deploying Trading and Investment Strategies
|
Strategy performance metrics. More...
#include <TSAMetrics.h>
Classes | |
struct | daily_record |
Public Member Functions | |
metrics (void) | |
Constructor. | |
metrics (const metrics &) | |
Copy constructor. More... | |
~metrics (void) | |
Destructor. | |
std::vector< double > | _daily_cash_flow_history (void) const |
std::vector< double > | _daily_equity_history () const |
double | average_daily_cash_flow (const std::vector< double > &daily_cash_flows) const |
double | average_trading_days_per_year (void) const |
void | calculate_equity_metrics (void) |
virtual void | daily_cash_flow (mem_table &mt) const |
Returns the daily cash flow as a mem_table. Intervals shorter than a day are aggregated into a daily cash flow value. Note such a daily value includes all intervals that 'started' on that date, but which can, for the last interval 'end' on the subsequent bar! More... | |
std::vector< daily_record > | daily_cash_flow_history (void) const |
std::vector< daily_record > | daily_equity_history (void) const |
template<typename T > | |
T | get (perf_metric_type metric_type, trade_grouping trade_aggr_type=all_trades) const |
variant | get_metric (perf_metric_type metric_type, trade_grouping group=all_trades) const |
Returns a value for a given metric-type and trade-aggregation-type. More... | |
date_time | GetEndDateTime (void) const |
Returns the last strategy timestamp. | |
void | print_daily_cash_flow (std::ostream &, bool with_date=false) const |
![]() | |
object (void) | |
Constructor. | |
virtual | ~object (void) |
Destructor. | |
const char * | class_name (void) const |
Returns the class name as returned by the 'Real Time Type Information' (RTTI) mechanism. More... | |
bool | has_same_class_as (const object &other) const |
Returns true if self has the same type as other object. More... | |
Strategy performance metrics.
Strategy performance metrics can be aggregated with metrics from other strategies to arrive at the performance of a 'basket' of instruments. The performance of a 'basket' can in turn be part of a higher level aggregation to arrive at perhaps the performance of a 'baskets of baskets'.