MCPcopy Index your code
hub / github.com/kernc/backtesting.py / _mp_task

Method _mp_task

backtesting/backtesting.py:1632–1641  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 3

shm2dfMethod · 0.80
runMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected