code: def stats(self):
          
          if self._dirty_stats:
              calculate_position_tracker_stats(self.positions, self._stats)
              self._dirty_stats = False
  
          return self._stats
docs: The current status of the positions.
  
          Returns
          -------
          stats : PositionStats
              The current stats position stats.
  
          Notes
          -----
          This is cached, repeated access will not recompute the stats until
          the stats may have changed.