Table of Contents

Class WeeklyCompression

Namespace
Balsam.Compression
Assembly
Balsam.Backtester.dll

Compresses bars to weekly periodicity.

public class WeeklyCompression : CompressionProvider, ICompressionProvider
Inheritance
WeeklyCompression
Implements
Inherited Members
Extension Methods

Constructors

WeeklyCompression()

Initializes a new WeeklyCompression object using Friday as the end of the week.

public WeeklyCompression()

WeeklyCompression(DayOfWeek)

Initializes a new WeeklyCompression object using the specified day of the week.

public WeeklyCompression(DayOfWeek dayOfWeek)

Parameters

dayOfWeek DayOfWeek

Properties

DayOfWeek

Gets/sets the day of the week on which bars end.

public DayOfWeek DayOfWeek { get; }

Property Value

DayOfWeek

EndTime

Gets/sets the time of day to end the week when using intraday data.

public TimeSpan EndTime { get; set; }

Property Value

TimeSpan

UseFixedDates

Gets/sets whether equally spaced dates are used even if there was no trading on that date. Defaults to false under the assumption if there was no trading on the last day of the week it would be a known event, unlike intraday compression routines where this defaults to true.

public bool UseFixedDates { get; set; }

Property Value

bool

Methods

OnCompress(ISeries, ICompressor)

Compresses the specified series.

protected override ISeries OnCompress(ISeries series, ICompressor compressor)

Parameters

series ISeries
compressor ICompressor

Returns

ISeries