Closed Karlheinzniebuhr closed 1 year ago
So reading the source code I noticed that it doesn't actually use OHLCV, only Close by default. So needed to implement the other ones like this to get it working. Now it makes sense the shape values differed
def normalize_data(env):
start = env.frame_bound[0] - env.window_size
end = env.frame_bound[1]
prices = env.df.loc[:, 'Close'].to_numpy()[start:end]
signal_features = env.df.loc[:, ['Open', 'High', 'Low', 'Close']].to_numpy()[start:end]
diff = np.insert(np.diff(prices), 0, 0)
signal_features = np.column_stack((signal_features, diff))
return prices, signal_features
class MyForexEnv(ForexEnv):
_process_data = normalize_data
I'm trying to obtain a single prediction from a trained model for production.
But I'm getting this error