i'm trying to get relationship between stock companies based on their historical closing prices. Cross-correlation or other similarity matrices can perform this task. But i want use deep learning methods(RNN/attention) to extract relationship between companies. So i prepared my data as follows, input data X of shape (samples, stocks, seq_len) and target data y of shape (samples, stocks) I did the following, lets say samples=32, seq_len=15, and stocks=50
model.add((LSTM(50,return_sequences=True,input_shape=(32,15,50),activation='relu')))
model.add((LSTM(50,return_sequences=False,activation='tanh')))
model.add(Dense(50,activation='relu'))
But I'm confused how to get relationship between stocks.