Zorro high memory usage

Posted By: 3dgamelight

Zorro high memory usage - 05/14/17 20:22

Zorro uses more than 1GB of RAM when the asset function get called more than once per bar.
I use Wine and I do not know if this problem happens on Windows.
Could someone help me to workaround this issue for getting price data for other assets?

Code:
#define ENABLE_ERROR 1

function run()
{
	int i;
	
	set(PARAMETERS+FACTORS);  // generate and use optimized parameters and factors
	BarPeriod = 60;	// 1 hour bars
	StartDate = 2005;
	NumWFOCycles = 10; // activate WFO
	
	if(ReTrain) {
		UpdateDays = -1;	// update price data from the server 
		SelectWFO = -1;	// select the last cycle for re-optimization
		reset(FACTORS);	// don't generate factors when re-training
	}
	
	if(ENABLE_ERROR) {
		for(i = 0; asset(Assets[i]); i++);
	}
	
	while(asset(loop(Assets))) {
		var dummy = optimize(1, 0.5, 1.5);
		if(random() > 0) {
			enterLong();
		} else {
			enterShort();
		}
	}
}

Posted By: jcl

Re: Zorro high memory usage - 05/15/17 07:53

There is no workaround. When you load price data, it must be stored at some place, and that's the computer memory. For reducing the data, you can either use a shorter simulation period, or split the portfolio into groups of assets that you test separately.
© 2024 lite-C Forums