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
doublelow
doublestartDate
DateTimeendDate
DateTimerecoveryDate
DateTimedrawdownLength
intrecoveryLength
intisOpen
bool
Properties
DrawdownLength
Gets the length of the drawdown in bars.
public int DrawdownLength { get; }
Property Value
DrawdownTime
Gets the length of the drawdown.
public TimeSpan DrawdownTime { get; }
Property Value
EndDate
Gets the date the low was observed.
public DateTime EndDate { get; }
Property Value
FlatPeriodLength
Gets the number of bars spent below equity highs.
public int FlatPeriodLength { get; }
Property Value
FlatPeriodTime
Gets the total time spent below equity highs (drawdown time plus recovery time).
public TimeSpan FlatPeriodTime { get; }
Property Value
High
Gets the high of the drawdown.
public double High { get; }
Property Value
IsOpen
Returns true if the drawdown is still ongoing.
public bool IsOpen { get; }
Property Value
Low
Gets the low of the drawdown.
public double Low { get; }
Property Value
Percent
Gets the percentage decline from the high.
public double Percent { get; }
Property Value
Points
Gets the number of points suffered, or the difference between the low and the previous equity high.
public double Points { get; }
Property Value
RecoveryDate
Gets the date a new equity high was made ending the drawdown.
public DateTime RecoveryDate { get; }
Property Value
RecoveryLength
Gets the length of the recovery in bars.
public int RecoveryLength { get; }
Property Value
RecoveryTime
Gets the length from low to new equity high.
public TimeSpan RecoveryTime { get; }
Property Value
StartDate
Gets the date the high was observed.
public DateTime StartDate { get; }
Property Value
Methods
Equals(Drawdown)
Returns true if the specified drawdown is equal to this drawdown.
public bool Equals(Drawdown drawdown)
Parameters
drawdown
Drawdown
Returns
Equals(object)
Returns true if the specified object is equal to this drawdown.
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
Returns a hash code for this object.
public override int GetHashCode()
Returns
ToString()
Returns a string representation of this drawdown.
public override string ToString()