cvxportfolio
cvxportfolio copied to clipboard
Suggestion: return concise SimulationResult object
SimulationResult object contains policy and simulator objects. Both take a lot of spaces. This is causing problem if we run parameter tuning codes because many SimulationResult object will be created and co-exist in memory. I suggest we add in an option to return concise version of SimulationResult object(remove policy and simulator objects and keep only the relevant simulation metrics). Here is what I can think of:
In run_backtest and run_multiple_backtest function in policies.py run_backtest(....., return_concise_results=False, ...) ..... if return_concise_results: results = results.concise_version return results
run_multiple_back_test(..., return_concise_results=False, ...)
Then in SimulationResult.py @property def concise_version(self): self.policy=None self.simulator = None return self