Table of Contents

Class IntegerSeries

Namespace
Balsam
Assembly
Balsam.Backtester.dll

Encapsulates a series of paired date/integer observations.

[ProtoContract(IgnoreListHandling = true)]
public class IntegerSeries : SeriesBase<int>, ISeries, IEnumerable<int>, IEnumerable, ICloneable
Inheritance
IntegerSeries
Implements
Derived
Inherited Members
Extension Methods

Constructors

IntegerSeries()

Initializes a new empty integer series.

public IntegerSeries()

IntegerSeries(IEnumerable<DateTime>)

Initialize a new integer series using the specified dates.

public IntegerSeries(IEnumerable<DateTime> dates)

Parameters

dates IEnumerable<DateTime>

IntegerSeries(IEnumerable<DateTime>, IEnumerable<int>)

Initializes a new integer series using the specified dates and values.

public IntegerSeries(IEnumerable<DateTime> dates, IEnumerable<int> values)

Parameters

dates IEnumerable<DateTime>
values IEnumerable<int>

IntegerSeries(IEnumerable<DateTime>, int)

Initializes a new integer series using the specified dates and value.

public IntegerSeries(IEnumerable<DateTime> dates, int value)

Parameters

dates IEnumerable<DateTime>
value int

Methods

Clone()

Returns a copy of this integer series.

public IntegerSeries Clone()

Returns

IntegerSeries

Equals(IntegerSeries)

Returns true if the specified series is identical to the current one (all dates and values are identical).

public bool Equals(IntegerSeries series)

Parameters

series IntegerSeries

Returns

bool

Equals(IntegerSeries, IntegerSeries)

Returns true when the specified series are identical (all dates and values are equal).

public static bool Equals(IntegerSeries left, IntegerSeries right)

Parameters

left IntegerSeries
right IntegerSeries

Returns

bool

Load(string)

Loads an IntegerSeries from a text file.

public static IntegerSeries Load(string file)

Parameters

file string

Returns

IntegerSeries

Load(string, char)

Loads an IntegerSeries from a text file using the specified delimiter.

public static IntegerSeries Load(string file, char delimiter)

Parameters

file string
delimiter char

Returns

IntegerSeries

Subset(DateTime)

Returns a new IntegerSeries beginning at the specified start date.

public IntegerSeries Subset(DateTime startDate)

Parameters

startDate DateTime

Returns

IntegerSeries

Subset(DateTime, DateTime)

Returns a new IntegerSeries containing dates between the specified start and end dates inclusive.

public IntegerSeries Subset(DateTime startDate, DateTime endDate)

Parameters

startDate DateTime
endDate DateTime

Returns

IntegerSeries

Subset(int, int)

Returns a subset of this IntegerSeries starting at the specified index.

public IntegerSeries Subset(int index, int count)

Parameters

index int

The starting index.

count int

The number of observations to return. Automatically adjusted to prevent out-of-bounds errors.

Returns

IntegerSeries

Sync(ISeries)

Returns a new IntegerSeries synced to the specified series.

public IntegerSeries Sync(ISeries series)

Parameters

series ISeries

Returns

IntegerSeries

Sync(ISeries, SyncOption)

Returns a new IntegerSeries synced to the specified series using the specified SyncOption.

public IntegerSeries Sync(ISeries series, SyncOption option)

Parameters

series ISeries
option SyncOption

Returns

IntegerSeries

Sync(IEnumerable<DateTime>)

Returns a new IntegerSeries synced to the specified dates.

public IntegerSeries Sync(IEnumerable<DateTime> syncDates)

Parameters

syncDates IEnumerable<DateTime>

Returns

IntegerSeries

Sync(IEnumerable<DateTime>, SyncOption)

Returns a new IntegerSeries synced to the specified dates.

public IntegerSeries Sync(IEnumerable<DateTime> syncDates, SyncOption option)

Parameters

syncDates IEnumerable<DateTime>
option SyncOption

Returns

IntegerSeries

Operators

operator +(IntegerSeries, IntegerSeries)

Adds two integer series.

public static IntegerSeries operator +(IntegerSeries left, IntegerSeries right)

Parameters

left IntegerSeries
right IntegerSeries

Returns

IntegerSeries

operator +(IntegerSeries, int)

Adds a value to an integer series.

public static IntegerSeries operator +(IntegerSeries left, int right)

Parameters

left IntegerSeries
right int

Returns

IntegerSeries

operator +(int, IntegerSeries)

Adds an integer series to a value.

public static IntegerSeries operator +(int left, IntegerSeries right)

Parameters

left int
right IntegerSeries

Returns

IntegerSeries

operator /(IntegerSeries, IntegerSeries)

Divides one integer series by another.

public static IntegerSeries operator /(IntegerSeries numerator, IntegerSeries denominator)

Parameters

numerator IntegerSeries
denominator IntegerSeries

Returns

IntegerSeries

operator /(IntegerSeries, int)

Divides an integer series by the specified value.

public static IntegerSeries operator /(IntegerSeries numerator, int denominator)

Parameters

numerator IntegerSeries
denominator int

Returns

IntegerSeries

operator /(int, IntegerSeries)

Divides an integer by an integer series.

public static IntegerSeries operator /(int numerator, IntegerSeries denominator)

Parameters

numerator int
denominator IntegerSeries

Returns

IntegerSeries

explicit operator IntegerSeries(TimeSeries)

Converts a timeseries to an integer series.

public static explicit operator IntegerSeries(TimeSeries series)

Parameters

series TimeSeries

Returns

IntegerSeries

operator >(IntegerSeries, IntegerSeries)

Returns true if the currentbar of the left integer series is greater than the currentbar of the right integer series.

public static BooleanSeries operator >(IntegerSeries left, IntegerSeries right)

Parameters

left IntegerSeries
right IntegerSeries

Returns

BooleanSeries

operator >(IntegerSeries, int)

Returns true if the current bar of the left integer series is greater than the right value.

public static BooleanSeries operator >(IntegerSeries left, int right)

Parameters

left IntegerSeries
right int

Returns

BooleanSeries

operator >(int, IntegerSeries)

Returns true if the left value is greater than the current bar of the right integer series.

public static BooleanSeries operator >(int left, IntegerSeries right)

Parameters

left int
right IntegerSeries

Returns

BooleanSeries

operator >=(IntegerSeries, IntegerSeries)

Returns true if the current bar of the left integer series is greater than or equal to the current bar of the right integer series.

public static BooleanSeries operator >=(IntegerSeries left, IntegerSeries right)

Parameters

left IntegerSeries
right IntegerSeries

Returns

BooleanSeries

operator >=(IntegerSeries, int)

Returns true if the current bar of the left integer series is greater than or equal to the right value.

public static BooleanSeries operator >=(IntegerSeries left, int right)

Parameters

left IntegerSeries
right int

Returns

BooleanSeries

operator >=(int, IntegerSeries)

Returns true if the left value is greater than or equal to the current bar of the right series.

public static BooleanSeries operator >=(int left, IntegerSeries right)

Parameters

left int
right IntegerSeries

Returns

BooleanSeries

implicit operator IntegerSeries(BooleanSeries)

Coverts a BooleanSeries to an IntegerSeries returning 1 for true and 0 for false.

public static implicit operator IntegerSeries(BooleanSeries series)

Parameters

series BooleanSeries

Returns

IntegerSeries

operator <(IntegerSeries, IntegerSeries)

Returns true if the current bar of the left integer series is less than the current bar of the right integer series.

public static BooleanSeries operator <(IntegerSeries left, IntegerSeries right)

Parameters

left IntegerSeries
right IntegerSeries

Returns

BooleanSeries

operator <(IntegerSeries, int)

Returns true if the current bar of the left integer series is less than the right value.

public static BooleanSeries operator <(IntegerSeries left, int right)

Parameters

left IntegerSeries
right int

Returns

BooleanSeries

operator <(int, IntegerSeries)

Returns true if the left value is less than the current bar of the right integer series.

public static BooleanSeries operator <(int left, IntegerSeries right)

Parameters

left int
right IntegerSeries

Returns

BooleanSeries

operator <=(IntegerSeries, IntegerSeries)

Returns true if the current bar of the left integer series is less than or equal to the current bar of the right integer series.

public static BooleanSeries operator <=(IntegerSeries left, IntegerSeries right)

Parameters

left IntegerSeries
right IntegerSeries

Returns

BooleanSeries

operator <=(IntegerSeries, int)

Returns true if the current bar of the left integer series is less than or equal to the right value.

public static BooleanSeries operator <=(IntegerSeries left, int right)

Parameters

left IntegerSeries
right int

Returns

BooleanSeries

operator <=(int, IntegerSeries)

Returns true if the left value is less than or equal to the current bar of the right integer series.

public static BooleanSeries operator <=(int left, IntegerSeries right)

Parameters

left int
right IntegerSeries

Returns

BooleanSeries

operator *(IntegerSeries, IntegerSeries)

Multiplies one integer series by another.

public static IntegerSeries operator *(IntegerSeries left, IntegerSeries right)

Parameters

left IntegerSeries
right IntegerSeries

Returns

IntegerSeries

operator *(IntegerSeries, int)

Multiplies the specified integerseries by the specified value.

public static IntegerSeries operator *(IntegerSeries left, int right)

Parameters

left IntegerSeries
right int

Returns

IntegerSeries

operator *(int, IntegerSeries)

Multiplies the specified integer series by the specified value.

public static IntegerSeries operator *(int left, IntegerSeries right)

Parameters

left int
right IntegerSeries

Returns

IntegerSeries

operator -(IntegerSeries, IntegerSeries)

Subtracts the right integer series from the left.

public static IntegerSeries operator -(IntegerSeries left, IntegerSeries right)

Parameters

left IntegerSeries
right IntegerSeries

Returns

IntegerSeries

operator -(IntegerSeries, int)

Subtracts a value from an integer series.

public static IntegerSeries operator -(IntegerSeries left, int right)

Parameters

left IntegerSeries
right int

Returns

IntegerSeries

operator -(int, IntegerSeries)

Subtracts an integer series from a value.

public static IntegerSeries operator -(int left, IntegerSeries right)

Parameters

left int
right IntegerSeries

Returns

IntegerSeries

operator -(IntegerSeries)

Negates an integer series.

public static IntegerSeries operator -(IntegerSeries series)

Parameters

series IntegerSeries

Returns

IntegerSeries