Table of Contents

Class CostCurve

Namespace
Balsam.TransactionCosts
Assembly
Balsam.Backtester.dll

Encapsulates a series of CostCurvePoints to provide a transaction cost curve estimate.

public class CostCurve : IEnumerable<CostCurvePoint>, IEnumerable
Inheritance
CostCurve
Implements
Inherited Members
Extension Methods

Constructors

CostCurve(string, IEnumerable<CostCurvePoint>)

Initializes a new cost curve.

public CostCurve(string symbol, IEnumerable<CostCurvePoint> points)

Parameters

symbol string
points IEnumerable<CostCurvePoint>

Properties

Count

Gets the number of cost curve points in the collection.

public int Count { get; }

Property Value

int

this[int]

Gets a CostCurvePoint by index.

public CostCurvePoint this[int index] { get; }

Parameters

index int

Property Value

CostCurvePoint

Symbol

Gets the symbol.

public string Symbol { get; }

Property Value

string

Methods

GetCostCurvePoint(double)

Gets a CostCurvePoint for the specified quantity or otherwise interpolates between adjacent cost curve points if the specified quantity is not available.

public CostCurvePoint GetCostCurvePoint(double quantity)

Parameters

quantity double

Returns

CostCurvePoint

GetCostEstimate(double)

Gets a transaction cost estimate for the specified quantity.

public double GetCostEstimate(double quantity)

Parameters

quantity double

Returns

double

GetEnumerator()

Returns an enumerator to iterate through all cost curve points in the collection.

public IEnumerator<CostCurvePoint> GetEnumerator()

Returns

IEnumerator<CostCurvePoint>