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
stringpoints
IEnumerable<CostCurvePoint>
Properties
Count
Gets the number of cost curve points in the collection.
public int Count { get; }
Property Value
this[int]
Gets a CostCurvePoint by index.
public CostCurvePoint this[int index] { get; }
Parameters
index
int
Property Value
Symbol
Gets the symbol.
public string Symbol { get; }
Property Value
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
GetCostEstimate(double)
Gets a transaction cost estimate for the specified quantity.
public double GetCostEstimate(double quantity)
Parameters
quantity
double
Returns
GetEnumerator()
Returns an enumerator to iterate through all cost curve points in the collection.
public IEnumerator<CostCurvePoint> GetEnumerator()