Why so complicated? If you need lookback in the test, but not in the objective function, then set lookback in the run function to the value you need, and to 0 in the objective function.

The main purpose of variables like lookback is preventing errors. You normally adapt them to your script, not your script to the variables.