In the paper "A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem" the CNN in the picture below is applied on the portfolio management problem.
I am trying to understand how this network works and can be implemented in keras.
What I don't understand is, why do we have 20+1 feature maps after the second convolution? And how I am supposed to include the portfolio w from last period in keras?
My current implementation is as follows:
def network(self): input1 = Input(shape=(3, 50, 4)) conv1 = Conv2D(2, (1, 3), activation='relu',)(input1) conv2 = Conv2D(10, (1, 48), activation='relu')(conv1) conv3 = Conv2D(1, (1, 1), activation='relu')(conv2) flat1 = Flatten()(conv3) preds = Activation('softmax')(flat1) model = Model(input1, preds) model.compile(optimizer='rmsprop', loss='mse') # todo loss function return model
Thanks for any help.