Table of Contents

Class AutoFilter.FactorMatrix

Namespace
Balsam.FactorAnalysis
Assembly
Balsam.Backtester.dll

Encapsulates a factor matrix.

public class AutoFilter.FactorMatrix
Inheritance
AutoFilter.FactorMatrix
Inherited Members
Extension Methods

Properties

AllButOne

Gets whether there is only one inactive bin.

public bool AllButOne { get; }

Property Value

bool

Index

Gets the index.

public int Index { get; }

Property Value

int

IsActive

Gets whether is active.

public bool IsActive { get; }

Property Value

bool

IsFullHouse

Returns true if all weights are active (zero'd out)

public bool IsFullHouse { get; }

Property Value

bool

IsUniDirectional

Gets whether the factor is unidirectional (i.e. the same for both long and short positions).

public bool IsUniDirectional { get; }

Property Value

bool

LastActiveBin

Gets the last active bin.

public int LastActiveBin { get; }

Property Value

int

Matrix

Gets the factor matrix.

public Matrix<double> Matrix { get; }

Property Value

Matrix<double>

Name

Gets the name.

public string Name { get; }

Property Value

string

Methods

CanEnter(SimplePosition)

Returns true if the specified position can enter.

public bool CanEnter(AutoFilter.SimplePosition position)

Parameters

position AutoFilter.SimplePosition

Returns

bool

Clone()

Returns a clone of this objectd.

public AutoFilter.FactorMatrix Clone()

Returns

AutoFilter.FactorMatrix

Equals(object)

Returns true if the specified object equals this FactorMatrix.

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

Returns the hash code for this FactorMatrix (based on the index).

public override int GetHashCode()

Returns

int

GetOOSMatrix(SimplePosition[], Factor)

Gets the out-of-sample factor matrix.

public AutoFilter.FactorMatrix GetOOSMatrix(AutoFilter.SimplePosition[] positions, Factor factor)

Parameters

positions SimplePosition[]
factor Factor

Returns

AutoFilter.FactorMatrix

GetTestBin(MultiThreadRandom)

Gets a random bin.

public int GetTestBin(MultiThreadRandom rnd)

Parameters

rnd MultiThreadRandom

Returns

int

Exceptions

Exception

Print()

Prints the factor report to the console.

public void Print()

SetLastActiveBin(int)

Sets the specified bin as the last active.

public void SetLastActiveBin(int bin)

Parameters

bin int

SetWeight(int, double)

Sets a weight for the specified bin.

public void SetWeight(int bin, double value)

Parameters

bin int
value double

Exceptions

InvalidOperationException

ToString()

Gets a string representation of this object.

public override string ToString()

Returns

string