Selecting stocks for building portfolio

Hi All,

I have manually downloaded daily stock data for about 50 companies across two Indian Stock Exchanges (NSE and BSE). The data (after collating) looks like this right now:

I want to build a NN which can choose stocks given past data for long investment periods only. I have currently used Keras’s TimeseriesGenerator to build my (X - y) pairs and divided them into Train, Val and Test datasets with a delay (i.e. the investment period).

My long term goal is to add fundamentals, currencies, commodities, holiday flags, macro-economic data onto the time axis in this experiment and see if a model can provide good stock portfolio recommendations. The focus IMO should be on how can one efficiently build a portfolio using a predefined investment.

I understand that stock markets are not predictable i.e. The efficient-market hypothesis suggests that stock prices reflect all currently available information and any price changes that are not based on newly revealed information thus are inherently unpredictable., but I am curious to see how would a model perform in a virtual setting.

I have a few broad questions:

  1. How would one go about designing the neural network?
    My initial idea is to create X - y pairs with some delay and let an LSTM model predict the future stock prices. I could also add embeddings for Stocks, Exchanges, DatePart variables and model.
  2. However, I am not interested in future prices but on return-on-investment after choosing certain stocks for each X-y pair. How would one go about it? What would be the loss function and the final layer/activation? How can we introduce the concept of Return on Investment?
  3. Is this task of picking stocks a reinforcement learning exercise? Or can it completely be transformed into a supervised learning problem?

I understand if the question seems broad, naive and vague, but I am only looking for ideas and suggestions : )


PS - If anyone else is interested, I could send them the dataset or post it here/GDrive.