You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, I am a big fan of your work and all the code runs smoothly most of the time. However, I encountered an issue with the portfolio construction procedure in two instances:
the code appears to stop working as soon as one of the stock price series from yahoo finance references an irregular stock ticker (in my case it was MOG-A) which concerns most companies with two types of shares
If I run this code: data$weight[week.ends,] = ntop(prices[week.ends,], n)
I get this error message:
Error in colnames<-(*tmp*, value = c("..." :
length of 'dimnames' [2] not equal to array extent
when the number of stocks to be included in the portfolio optimization exceeds 20, the code tends to break as well.
do you have any quickfix for these issues? my guess is that the main problem is that your code uses price data in environments rather than objects.
Cheers
MR
The text was updated successfully, but these errors were encountered:
First off, I am a big fan of your work and all the code runs smoothly most of the time. However, I encountered an issue with the portfolio construction procedure in two instances:
the code appears to stop working as soon as one of the stock price series from yahoo finance references an irregular stock ticker (in my case it was MOG-A) which concerns most companies with two types of shares
If I run this code: data$weight[week.ends,] = ntop(prices[week.ends,], n)
I get this error message:
Error in
colnames<-
(*tmp*
, value = c("..." :length of 'dimnames' [2] not equal to array extent
when the number of stocks to be included in the portfolio optimization exceeds 20, the code tends to break as well.
do you have any quickfix for these issues? my guess is that the main problem is that your code uses price data in environments rather than objects.
Cheers
MR
The text was updated successfully, but these errors were encountered: