如何处理大量历史数库

When you backtest a strategy, all incoming market data is stored in memory in Strategy.Bars, Strategy.Quotes and Strategy.Trades arrays. This may cause an out of memory exception if you process large enough amounts of historical data. You can set fixed sizes of these in-memory arrays, so that only last N bars, quotes or trades will be stored.

当你回测时,所有数据都保存在了内存中的Strategy.Bars, Strategy.Quotes and Strategy.Trades三个数组中。如果处理大量历史数据有可能会导致内存溢出异常。你可以设置给内存中数组设一个固定大小,这样只有最后的N个bars、quotes和trades会被保存。

You can navigate to Tools->Options in the OpenQuant 2.x main menu and set desired number of stored market data entries. Use “-1” value to store all incoming market data.

在OpenQuant主菜单的Tools->Options中,你可以设置期望的值,-1表示存储所有数据。