diff --git a/roboquant/order.py b/roboquant/order.py index 7591d1f..8740a43 100644 --- a/roboquant/order.py +++ b/roboquant/order.py @@ -33,7 +33,7 @@ def closed(self): return self in OrderStatus._CLOSE def __repr__(self) -> str: - return self.name + return self.name # type: ignore @dataclass diff --git a/roboquant/traders/flextrader.py b/roboquant/traders/flextrader.py index ef084a4..bff593d 100644 --- a/roboquant/traders/flextrader.py +++ b/roboquant/traders/flextrader.py @@ -55,7 +55,7 @@ def __init__( ) -> None: super().__init__() self.one_order_only = one_order_only - self.size_ndigits: int = size_fractions + self.size_digits: int = size_fractions self.min_buying_power: float = min_buying_power self.increase_position = increase_position self.shorting = shorting @@ -66,7 +66,7 @@ def __init__( def _get_order_size(self, rating: float, contract_price: float, max_order_value: float) -> Decimal: """Return the order size""" size = Decimal(rating * max_order_value / contract_price) - rounded_size = round(size, self.size_ndigits) + rounded_size = round(size, self.size_digits) return rounded_size def create_orders(self, signals: dict[str, Signal], event: Event, account: Account) -> list[Order]: