Hi,
I am trying to change parameters to compute a factor using past performance but I dont find a way to do it. For example I tried this
PV.append(context.portfolio_value)
NS=10
if len(PV) > NS:
if PV[-1]/PV[-NS] < 1: par1+=2
but the backtest results are not affected(they should depend on par1, but practically the change in par1 is not reflected in the backtest results).
This would be very important to obtain robust strategies, which are not ovefitting data. It is sometime called walkforward optimization, but in this version I am trying to implement would be just a dynamic adaptation.
It seems like zipline is not able to adjust factor parameters dynamically, and that factors are computed statically just at the beginnig of the backtest.
Thanks