Replies: 1 comment 1 reply
-
What exactly would you like to optimize? We optimize free parameters of the model (logic), not fixed values of |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there friends. I have a fully functioning ML script working with optimization on a variable called "target" but I cannot figure out how to optimize on "target" and a few dataframe columns with ML predictions. I've spent 4 days on this so far. :-) Any help would be appreciated. See screenshots and code below. Columns are RTY_Vol_pred, GC_Close_pred, S_Open_pred.
a single backtest
%%time
from backtesting import Backtest, Strategy
data = df.loc[end_train:].copy()
class ML(Strategy):
bt = Backtest(data, ML, cash=1000000)
bt.run()
#bt.plot()
################################################
optimizer
%%time
from backtesting import Backtest
import numpy as np
backtest = Backtest(data, ML, cash=1000000)
stats, heatmap = backtest.optimize(
print(heatmap)
Beta Was this translation helpful? Give feedback.
All reactions