Table of Contents

Class AutoFilter

Namespace
Balsam.FactorAnalysis
Assembly
Balsam.Backtester.dll

Uses Monte Carlo simulation to find optimal filter combinations based on list of factors.

public class AutoFilter
Inheritance
AutoFilter
Inherited Members
Extension Methods

Fields

EarlyStopCriteria

Gets/sets the early stopping criteria if any. Defaults to null.

public double? EarlyStopCriteria

Field Value

double?

Properties

Bins

Gets/sets the number of bins into which factor values are grouped.

public int Bins { get; set; }

Property Value

int

Factors

Gets/sets the factor library

public FactorLibrary Factors { get; set; }

Property Value

FactorLibrary

FilterIterations

Gets/sets the maximum number of iterations for each filter.

public int FilterIterations { get; set; }

Property Value

int

MaxActiveFactors

Gets/sets the maximum number of factors that comprise a filter.

public int MaxActiveFactors { get; set; }

Property Value

int

MaxCores

Gets/sets the maximum number of cores to use in processing.

public int MaxCores { get; set; }

Property Value

int

MaxNoImprovement

Gets/sets the maximum consecutive runs with no improvement that will cause early termination of the run.

public int MaxNoImprovement { get; set; }

Property Value

int

ObjectiveFunction

Get/sets the objective function used to measure the performance of the filter.

public Func<AutoFilter.TStats, double> ObjectiveFunction { get; set; }

Property Value

Func<AutoFilter.TStats, double>

TotalRuns

Gets/sets the total number of Monte Carlo filters that will be fitted.

public int TotalRuns { get; set; }

Property Value

int

Methods

CalculateTradeStats(IEnumerable<Position>)

public AutoFilter.TStats CalculateTradeStats(IEnumerable<Position> positions)

Parameters

positions IEnumerable<Position>

Returns

AutoFilter.TStats

Solve(IEnumerable<Position>)

Runs the factor optimization.

public AutoFilter.AutoFilterResults Solve(IEnumerable<Position> mmPositions)

Parameters

mmPositions IEnumerable<Position>

Returns

AutoFilter.AutoFilterResults

Test(IEnumerable<Position>, IEnumerable<FactorMatrix>)

Test method.

public AutoFilter.Result Test(IEnumerable<Position> outOfSample, IEnumerable<AutoFilter.FactorMatrix> inSampleFactors)

Parameters

outOfSample IEnumerable<Position>
inSampleFactors IEnumerable<AutoFilter.FactorMatrix>

Returns

AutoFilter.Result