getSymbols("2222.SR")
[1] "2222.SR"
OPEN1<-Op(2222.SR)
Error: unexpected symbol in "OPEN1<-Op(2222.SR"
I was expecting R to give me the opening price but for some reason it's giving me this error although it was able to fetch that data from yahoo. BTW I'm using quantmod.
I'm a beginner at this so I have no idea what's wrong :(. This is a stock in the Saudi stock market from yahoo finance. I tried the same thing with another Saudi stock and still it didn't work I also tried other functions like for the closing price and got the same results:
getSymbols("7010.SR")
[1] "7010.SR"
Warning message:
7010.SR contains missing values. Some functions will not work if objects contain missing values in the middle of the series. Consider using na.omit(), na.approx(), na.fill(), etc to remove or replace them.
OPEN2<-Op(7010.SR)
Error: unexpected symbol in "OPEN2<-Op(7010.SR"
I also tried it with an American traded stock and it worked.