Machine Learning, Investment, AI, Sklearn, Quant.
dataset['long_mavg'], 1.0, 0.0)) dataset['Sign_1'] = dataset['Sign_1'].shift(-10) dataset['Sign_2'] = ((np.sign(np.log(dataset['Close'] / dataset['Close'].shift(1))) > 0).astype(int)) dataset['Sign_2'] = dataset['Sign_2'].shift(-1) dataset.dropna(inplace=True) Feature Engineering We construct