Possible to load and unload asset history?

Posted By: kankan

Possible to load and unload asset history? - 06/06/19 07:58

Since my strategy trades each asset very rarely, but trades across 3000 assets, it seems impractical to load that many assets all the time and keep them in memory (short of getting a machine with 64gb of ram). Is it possible to load them and unload them as needed or is running asset() the only option and required to be run in the initrun? I am more interested in the backtesting for now since during live trading I can always restart the system every once in a while with a subset of assets.
Posted By: jcl

Re: Possible to load and unload asset history? - 06/06/19 12:53

For 3000 assets it would indeed make sense to unload the currently not used assets. But there is no mechanism for this. We have not yet had a strategy with 3000 assets. It is not a trivial feature to implement, so for the current time you must find another solution. Like splitting your strategy into separate scripts with a subset of assets.
Posted By: kankan

Re: Possible to load and unload asset history? - 06/06/19 15:22

OK, thanks. I figured as much but thought I'd ask anyway.
Is the memory taken up only by the historical bars that exist or is it directly related to the Years and the BarPeriod, regardless of the gaps in the history? (e.g. Years/BarPeriod * 15)

I may just try a VPS instance with a bunch of memory and see if it all goes kaboom :-D
Posted By: kankan

Re: Possible to load and unload asset history? - 06/07/19 13:34

OK, just noticed that even with more memory this wouldn't work because as per the manual, Windows only assigns up to 3GB of RAM to Zorro. (I get the 060 memory fragmentation error). I am assuming since Zorro is still 32bit.

Added my vote in the forum for the future features :-)
© 2024 lite-C Forums