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
Index
Gets the index.
public int Index { get; }
Property Value
IsActive
Gets whether is active.
public bool IsActive { get; }
Property Value
IsFullHouse
Returns true if all weights are active (zero'd out)
public bool IsFullHouse { get; }
Property Value
IsUniDirectional
Gets whether the factor is unidirectional (i.e. the same for both long and short positions).
public bool IsUniDirectional { get; }
Property Value
LastActiveBin
Gets the last active bin.
public int LastActiveBin { get; }
Property Value
Matrix
Gets the factor matrix.
public Matrix<double> Matrix { get; }
Property Value
- Matrix<double>
Name
Gets the name.
public string Name { get; }
Property Value
Methods
CanEnter(SimplePosition)
Returns true if the specified position can enter.
public bool CanEnter(AutoFilter.SimplePosition position)
Parameters
position
AutoFilter.SimplePosition
Returns
Clone()
Returns a clone of this objectd.
public AutoFilter.FactorMatrix Clone()
Returns
Equals(object)
Returns true if the specified object equals this FactorMatrix.
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
Returns the hash code for this FactorMatrix (based on the index).
public override int GetHashCode()
Returns
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
GetTestBin(MultiThreadRandom)
Gets a random bin.
public int GetTestBin(MultiThreadRandom rnd)
Parameters
Returns
Exceptions
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
Exceptions
ToString()
Gets a string representation of this object.
public override string ToString()