Table of Contents

Class SettlementPriceCollection

Namespace
Balsam.Utility
Assembly
Balsam.Backtester.dll

A collection of settlement prices indexed by symbol and then by date.

[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
public class SettlementPriceCollection
Inheritance
SettlementPriceCollection
Inherited Members
Extension Methods

Properties

Count

Gets the total number of settlement prices in the collection.

public int Count { get; }

Property Value

int

LastDate

Gets the last settlement date in the collection.

public DateTime LastDate { get; }

Property Value

DateTime

Methods

Add(string, DateTime, double)

Adds the specified settlement to the collection.

public void Add(string symbol, DateTime date, double settlement)

Parameters

symbol string
date DateTime
settlement double

ContainsSymbol(string)

Returns true if the specified symbol is contained in the collection.

public bool ContainsSymbol(string symbol)

Parameters

symbol string

Returns

bool

GetSettlementPrice(string, DateTime)

Returns the settlement price for the specified symbol/date or null if not found.

public double? GetSettlementPrice(string symbol, DateTime date)

Parameters

symbol string
date DateTime

Returns

double?

GetSettlementPrices(string)

Returns a dictionary of date/settlement prices for the specified symbol.

public Dictionary<DateTime, double> GetSettlementPrices(string symbol)

Parameters

symbol string

Returns

Dictionary<DateTime, double>

Load(string)

Loads the specified json file.

public static SettlementPriceCollection Load(string fileName)

Parameters

fileName string

Returns

SettlementPriceCollection

Save(string)

Serializes the collection to a json file.

public void Save(string fileName)

Parameters

fileName string