Lean  $LEAN_TAG$
QuantConnect.Optimizer.Objectives.Constraint Class Reference

A backtest optimization constraint. Allows specifying statistical constraints for the optimization, eg. a backtest can't have a DrawDown less than 10% More...

Inheritance diagram for QuantConnect.Optimizer.Objectives.Constraint:
[legend]

Public Member Functions

 Constraint (string target, ComparisonOperatorTypes @operator, decimal? targetValue)
 Creates a new instance More...
 
bool IsMet (string jsonBacktestResult)
 Asserts the constraint is met More...
 
override string ToString ()
 Pretty representation of a constraint More...
 

Properties

ComparisonOperatorTypes Operator [get]
 The target comparison operation, eg. 'Greater' More...
 
- Properties inherited from QuantConnect.Optimizer.Objectives.Objective
string Target [get]
 Target; property of json file we want to track More...
 
decimal? TargetValue [get]
 Target value More...
 

Additional Inherited Members

- Protected Member Functions inherited from QuantConnect.Optimizer.Objectives.Objective
 Objective (string target, decimal? targetValue)
 Creates a new instance More...
 

Detailed Description

A backtest optimization constraint. Allows specifying statistical constraints for the optimization, eg. a backtest can't have a DrawDown less than 10%

Definition at line 29 of file Constraint.cs.

Constructor & Destructor Documentation

◆ Constraint()

QuantConnect.Optimizer.Objectives.Constraint.Constraint ( string  target,
ComparisonOperatorTypes operator,
decimal?  targetValue 
)

Creates a new instance

Definition at line 40 of file Constraint.cs.

Member Function Documentation

◆ IsMet()

bool QuantConnect.Optimizer.Objectives.Constraint.IsMet ( string  jsonBacktestResult)

Asserts the constraint is met

Definition at line 53 of file Constraint.cs.

◆ ToString()

override string QuantConnect.Optimizer.Objectives.Constraint.ToString ( )

Pretty representation of a constraint

Definition at line 74 of file Constraint.cs.

Property Documentation

◆ Operator

ComparisonOperatorTypes QuantConnect.Optimizer.Objectives.Constraint.Operator
get

The target comparison operation, eg. 'Greater'

Definition at line 35 of file Constraint.cs.


The documentation for this class was generated from the following file: