Number of allowed nan and number of assets set in portfolio may intersect and therefore final number of assets is better found using dimension of x_train.
Number of allowed nan and number of assets set in portfolio may intersect and therefore final number of assets is better found using dimension of x_train.

MizioAnd/PortfolioTimeSeriesAnalysis