Skip to content

contango.strategy.rule_based.conditions.condition

contango.strategy.rule_based.conditions.condition

Condition

Bases: ABC, Generic[C]

A single condition when creating a strategy.

evaluate abstractmethod

evaluate(context: C) -> bool

Returns the status of a condition given a context object.

Source code in src\contango\strategy\rule_based\conditions\condition.py
16
17
18
19
20
21
@abstractmethod
def evaluate(self, context: C) -> bool:
    """
    Returns the status of a condition given a context object.
    """
    ...