Limit memory usage of forecast algorithm. Now it's not running out of memory