Hello Quantopians, I am realtively new to Quantopian and try to build my first algo. I am trying to fetch intraday return data of several equities, feed this data to a random forest classifier and let it make predictions on whether the SPY is going to yield negative or positive returns. Based on those predictions I want to long/short the SPY. However, I always get a lot of errors. Apparently my data.history function gets data of different time-periods depending on the equity chosen. Of course I need always the same time period for the equities to be able to feed them as features to the random forest. Does anyone know how to do this? Furthermore, I get the error that my chosen assets cannot all be traded on the same day. Again I must do sth. wrong because I only want to trade the SPY. All the data on other assets are just fetched to build the features for the random forest. Any advice?
Thank you so much in advance