Doubt in the UBS Quant Hackathon 2020 : Outperform the S&P 500

In the Description of the competition, it is written that "The diversified long only portfolio must be equally weighted, fully invested and must contain 50 stocks at any moment of time"


What does it mean by equally weighted? We do not need to assign weights to the stocks but only select the stocks?

Hi, you are correct, the logic you want to implement is how to select 50 stocks out of the available investment universe. However, each of the selected stocks have to get 2% each in the portfolio. You also have to define how often you want to rebalance, i.e. to switch your choice of stocks to another set of 50.


To add to Herve’s answer, your machine algo has to screen the 50 ‘best’ stocks you want to be invested within the universe of the S&P 500 constituents. We provide you with the constituents using the getTickersSP500 function that provides you for any date what stocks are in the S&P within the 10 years period given. Practically, you need to create a ‘function’ (at Alphien we call that payout function) which assigns 2% weights for the stocks which are selected. The portfolio class will automatically multiply the weights with the right returns for you and backtest your strategy. In short you can reduce the problem to find the best stock screening algo within the SP500.