Table of Contents

Class TransactionCostModel

Namespace
Balsam
Assembly
Balsam.Backtester.dll

Abstract base class for all transaction cost models.

public abstract class TransactionCostModel : ICloneable
Inheritance
TransactionCostModel
Implements
Derived
Inherited Members
Extension Methods

Properties

ApplyToRolls

Gets/sets whether the transaction cost model should be applied to rolls.

public bool ApplyToRolls { get; set; }

Property Value

bool

Methods

Calculate(ITrade)

Calculate transaction costs for the specified trade.

public void Calculate(ITrade trade)

Parameters

trade ITrade

GetAtr(ITrade, int)

Returns a simple average of the true range over the specified length up until the time of trade execution.

protected double GetAtr(ITrade trade, int length)

Parameters

trade ITrade
length int

Returns

double

Exceptions

InvalidOperationException

GetSeries(ITrade)

Returns the BarSeries associated with this trade object. Typically this will only be available for orders generated by a strategy.

protected static BarSeries GetSeries(ITrade trade)

Parameters

trade ITrade

Returns

BarSeries

OnCalculate(ITrade)

Override to set the Commission and Slippage properties for the specified trade.

protected abstract void OnCalculate(ITrade trade)

Parameters

trade ITrade