Well spotted, and you raise a very good point. OptimalF is calculated over the entire simulation period, but is then applied to the simulation from the start. This introduces a weak form of look-ahead bias to strategies that trade using OptimalF for position sizing. I would also like to see separate .fac files for each WFO cycle.