Skip to content

Target

QuantConnect.Optimizer.Objectives.Target

Target(
    target: str,
    extremum: Extremum,
    target_value: Optional[float],
)
Target()

Bases: Objective

The optimization statistical target

Creates a new instance

extremum

extremum: Extremum

Defines the direction of optimization, i.e. maximization or minimization

current

current: Optional[float]

Current value

reached

reached: _EventContainer[
    Callable[[Object, EventArgs], Any], Any
]

Fires when target complies specified value

target

target: str

Target; property of json file we want to track

target_value

target_value: Optional[float]

Target value

old_target_value

old_target_value: Optional[float]

check_compliance

check_compliance() -> None

Try comply target value

get_token_in_json_backtest

get_token_in_json_backtest(
    json_backtest_result: str, target: str
) -> Any

move_ahead

move_ahead(json_backtest_result: str) -> bool

Check backtest result

Parameters:

Name Type Description Default
json_backtest_result str

Backtest result json

required

Returns:

Type Description
bool

true if found a better solution; otherwise false.

to_string

to_string() -> str

Pretty representation of this optimization target