Table of Contents

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

quantity double
symbol string

NetPosition(double, string, Instrument)

Creates a new NetPosition object.

public NetPosition(double quantity, string symbol, Instrument instrument)

Parameters

quantity double
symbol string
instrument Instrument

Properties

Instrument

Gets the instrument.

public Instrument Instrument { get; }

Property Value

Instrument

NotionalValue

Gets the net notional value in local currency if a price has been set.

public double NotionalValue { get; }

Property Value

double

Price

Gets/sets the price used to calculate notional value.

public double Price { get; set; }

Property Value

double

Quantity

Gets the net quantity.

public double Quantity { get; }

Property Value

double

RequiredMargin

Gets the initial margin requirement of the net position in local currency.

public double RequiredMargin { get; }

Property Value

double

Side

Gets the net position side.

public PositionSide Side { get; }

Property Value

PositionSide

Symbol

Gets the symbol.

public string Symbol { get; }

Property Value

string

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()

Returns

string