(arg)
| 1630 | |
| 1631 | @staticmethod |
| 1632 | def _mp_task(arg): |
| 1633 | bt, data_shm, params_batch = arg |
| 1634 | bt._data, shm = SharedMemoryManager.shm2df(data_shm) |
| 1635 | try: |
| 1636 | return [stats.filter(regex='^[^_]') if stats['# Trades'] else None |
| 1637 | for stats in (bt.run(**params) |
| 1638 | for params in params_batch)] |
| 1639 | finally: |
| 1640 | for shmem in shm: |
| 1641 | shmem.close() |
| 1642 | |
| 1643 | def plot(self, *, results: pd.Series = None, filename=None, plot_width=None, |
| 1644 | plot_equity=True, plot_return=False, plot_pl=True, |