Table of Contents

Class Drawdown

Namespace
Balsam
Assembly
Balsam.Backtester.dll

Represents statistics about a single drawdown.

[ProtoContract]
public class Drawdown
Inheritance
Drawdown
Inherited Members
Extension Methods

Constructors

Drawdown(double, double, DateTime, DateTime, DateTime, int, int, bool)

Initializes a new drawdown object.

public Drawdown(double high, double low, DateTime startDate, DateTime endDate, DateTime recoveryDate, int drawdownLength, int recoveryLength, bool isOpen)

Parameters

high double
low double
startDate DateTime
endDate DateTime
recoveryDate DateTime
drawdownLength int
recoveryLength int
isOpen bool

Properties

DrawdownLength

Gets the length of the drawdown in bars.

public int DrawdownLength { get; }

Property Value

int

DrawdownTime

Gets the length of the drawdown.

public TimeSpan DrawdownTime { get; }

Property Value

TimeSpan

EndDate

Gets the date the low was observed.

public DateTime EndDate { get; }

Property Value

DateTime

FlatPeriodLength

Gets the number of bars spent below equity highs.

public int FlatPeriodLength { get; }

Property Value

int

FlatPeriodTime

Gets the total time spent below equity highs (drawdown time plus recovery time).

public TimeSpan FlatPeriodTime { get; }

Property Value

TimeSpan

High

Gets the high of the drawdown.

public double High { get; }

Property Value

double

IsOpen

Returns true if the drawdown is still ongoing.

public bool IsOpen { get; }

Property Value

bool

Low

Gets the low of the drawdown.

public double Low { get; }

Property Value

double

Percent

Gets the percentage decline from the high.

public double Percent { get; }

Property Value

double

Points

Gets the number of points suffered, or the difference between the low and the previous equity high.

public double Points { get; }

Property Value

double

RecoveryDate

Gets the date a new equity high was made ending the drawdown.

public DateTime RecoveryDate { get; }

Property Value

DateTime

RecoveryLength

Gets the length of the recovery in bars.

public int RecoveryLength { get; }

Property Value

int

RecoveryTime

Gets the length from low to new equity high.

public TimeSpan RecoveryTime { get; }

Property Value

TimeSpan

StartDate

Gets the date the high was observed.

public DateTime StartDate { get; }

Property Value

DateTime

Methods

Equals(Drawdown)

Returns true if the specified drawdown is equal to this drawdown.

public bool Equals(Drawdown drawdown)

Parameters

drawdown Drawdown

Returns

bool

Equals(object)

Returns true if the specified object is equal to this drawdown.

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

Returns a hash code for this object.

public override int GetHashCode()

Returns

int

ToString()

Returns a string representation of this drawdown.

public override string ToString()

Returns

string