INNER CODE UNIT · Python

rt_position

pe049395/IMC-Prosperity-2024 · submissions/round5.py:263

    def rt_position(self) -> int:
        """Return realtime position.

        Returns:
            int: realtime position

        """
        return self._realtime_position[self.product]

    def _cls_rt_position_update(cls, product, new_position):
        if abs(new_position) <= cls._position_limit[product]:
            cls._realtime_position[product] = new_position
        else:
            raise ValueError("New position exceeds position limit")

    def rt_position_update(self, new_position: int) -> None:
        """Update realtime position.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…