Table of Contents

Class PerformanceStats

Namespace
Balsam.MoneyManagement
Assembly
Balsam.Backtester.dll

Encapsulates comprehensive money manager performance statistics.

[ProtoContract]
public class PerformanceStats : EquityCurveStats
Inheritance
PerformanceStats
Inherited Members
Extension Methods

Properties

AvgExposure

Gets the average net notional exposure.

public double AvgExposure { get; }

Property Value

double

AvgGrossExposure

Gets the average gross notional exposure.

public double AvgGrossExposure { get; }

Property Value

double

AvgMarginToEquity

Gets the average margin required as a percent of equity.

public double AvgMarginToEquity { get; }

Property Value

double

AvgNetExposure

Gets the absolute value of net notional exposure.

public double AvgNetExposure { get; }

Property Value

double

AvgRiskToEquity

Gets the average risk as a percent of equity. This property is flagged with the NonDeterministic attribute to prevent it from being used in comparisons. In cases where a stop is used but never hit, AvgRiskToEquity can have a different value depending on stop distance even though trades and P&L are exactly the same.

public double AvgRiskToEquity { get; }

Property Value

double

BuyAndHoldCAGR

Gets the compound annual growth rate for buy and hold over the same time period as the money management strategy. Only reported for those strategies that trade a single symbol.

public double BuyAndHoldCAGR { get; }

Property Value

double

CapitalRequirement

Gets the amount of capital required to trade the system without a margin call.

public double CapitalRequirement { get; }

Property Value

double

CapitalRequirementDate

Gets the date of the maximum capital requirement.

public DateTime CapitalRequirementDate { get; }

Property Value

DateTime

CashAdjustments

Gets the total amount of miscellaneous cash adjustments.

public double CashAdjustments { get; }

Property Value

double

CreditInterest

Gets the total interest earned on free credit balances.

public double CreditInterest { get; }

Property Value

double

DebitInterest

Gets the total interest paid on debit balances.

public double DebitInterest { get; }

Property Value

double

Dividends

Gets the total net amount of dividends received/paid.

public double Dividends { get; }

Property Value

double

ForeignCurrencyTranslationAdjustment

Gets the P&L that occurs from holding foreign currency balances.

public double ForeignCurrencyTranslationAdjustment { get; }

Property Value

double

MarginCalls

Gets the number of margin calls incurred.

public int MarginCalls { get; }

Property Value

int

MaxContractsHeld

Gets the maximum number of contracts held.

public double MaxContractsHeld { get; }

Property Value

double

MaxContractsHeldDate

Gets the date on which the maximum number of contracts was held.

public DateTime MaxContractsHeldDate { get; }

Property Value

DateTime

MaxExposure

Gets the maximum notional exposure.

public double MaxExposure { get; }

Property Value

double

MaxExposureDate

Gets the date on which the maximum notional exposure was observed.

public DateTime MaxExposureDate { get; }

Property Value

DateTime

MaxMarginCall

Gets the maximum margin call in dollars.

public double MaxMarginCall { get; }

Property Value

double

MaxMarginCallDate

Gets the date of the maximum margin call.

public DateTime MaxMarginCallDate { get; }

Property Value

DateTime

MaxOpenPositions

Gets the maximum number of open positions.

public int MaxOpenPositions { get; }

Property Value

int

MaxOpenPositionsDate

Gets the date on which the maximum number of open positions was experienced.

public DateTime MaxOpenPositionsDate { get; }

Property Value

DateTime

MinExposure

Gets the minimum notional exposure (or the maximum short notional exposure).

public double MinExposure { get; }

Property Value

double

MinExposureDate

Gets the date on which the minimum notional exposure was observed.

public DateTime MinExposureDate { get; }

Property Value

DateTime

MoneyManagerCommissions

Gets the total commissions paid in base currency by money manager generated trades.

public double MoneyManagerCommissions { get; }

Property Value

double

MoneyManagerContractsTraded

Gets the total number of contracts traded by money manager generated trades.

public double MoneyManagerContractsTraded { get; }

Property Value

double

MoneyManagerName

Gets the name of the money manager.

public string MoneyManagerName { get; }

Property Value

string

MoneyManagerRolls

Gets the number of money manager positions rolled.

public int MoneyManagerRolls { get; }

Property Value

int

MoneyManagerSlippage

Gets the total slippage in base currency incurred by money manager generated trades.

public double MoneyManagerSlippage { get; }

Property Value

double

MoneyManagerTrades

Gets the number of money manager trades generated.

public int MoneyManagerTrades { get; }

Property Value

int

MultiplierTrades

Gets the number of multiplier trades implemented by the money manager.

public int MultiplierTrades { get; }

Property Value

int

NetInterest

Gets the net amount of interest (credit + debit + short rebates).

public double NetInterest { get; }

Property Value

double

PercentInMarket

Gets the percent of time there was market exposure.

public double PercentInMarket { get; }

Property Value

double

RoundTurnsPerMillion

Gets the number of round turns per million (including rolls) for futures systems.

public double RoundTurnsPerMillion { get; }

Property Value

double

ShortRebate

Gets the total interest received on short collateral.

public double ShortRebate { get; }

Property Value

double

TradesCanceled

Gets the number of trades canceled by the user.

public int TradesCanceled { get; }

Property Value

int

TradesFiltered

Gets the number of opening trades excluded by the Trade Filter function.

public int TradesFiltered { get; }

Property Value

int

TradesRejected

Gets the number of trades rejected by the money manager.

public int TradesRejected { get; }

Property Value

int

TradingSharpe

Gets the arithmetic Sharpe calculated using only days where there was trading activity or open positions.

public double TradingSharpe { get; }

Property Value

double

Methods

Calculate(IEnumerable<AccountingRecord>)

Calculate PortfolioStats using the specified AccountInfo enumerable.

public void Calculate(IEnumerable<AccountingRecord> accountInfo)

Parameters

accountInfo IEnumerable<AccountingRecord>

OnCalculate(IEnumerable<AccountingRecord>)

Portfolio stats calculation takes place here.

protected virtual void OnCalculate(IEnumerable<AccountingRecord> accountInfo)

Parameters

accountInfo IEnumerable<AccountingRecord>