Class NetPosition
- Namespace
- Balsam.MoneyManagement
- Assembly
- Balsam.Backtester.dll
A class used to net multiple positions of the same symbol/instrument.
public class NetPosition : IPortfolioHolding
- Inheritance
-
NetPosition
- Implements
- Inherited Members
- Extension Methods
Constructors
NetPosition(Position)
Creates a new NetPosition object using the specified position.
public NetPosition(Position position)
Parameters
position
Position
NetPosition(double, string)
Creates a new NetPosition object.
public NetPosition(double quantity, string symbol)
Parameters
NetPosition(double, string, Instrument)
Creates a new NetPosition object.
public NetPosition(double quantity, string symbol, Instrument instrument)
Parameters
quantity
doublesymbol
stringinstrument
Instrument
Properties
Instrument
Gets the instrument.
public Instrument Instrument { get; }
Property Value
NotionalValue
Gets the net notional value in local currency if a price has been set.
public double NotionalValue { get; }
Property Value
Price
Gets/sets the price used to calculate notional value.
public double Price { get; set; }
Property Value
Quantity
Gets the net quantity.
public double Quantity { get; }
Property Value
RequiredMargin
Gets the initial margin requirement of the net position in local currency.
public double RequiredMargin { get; }
Property Value
Side
Gets the net position side.
public PositionSide Side { get; }
Property Value
Symbol
Gets the symbol.
public string Symbol { get; }
Property Value
Methods
Add(Position)
Adds a position to net.
public void Add(Position position)
Parameters
position
Position
ToString()
Returns a string representation of this net position.
public override string ToString()