Closed tchevri closed 2 years ago
Thanks for the report! This may be related to #310. Please install the latest from this repo and see if that fixes the problem for you. I just tried that and it worked for me.
Thanks a ton!
Same issue indeed - I am so sorry I wasted your time: epic Google
failure which did not show #310 at all, bit infuriating...
No worries! It only took me a few minutes to test. And I'm happy it's already fixed!
epic
Not sure if you tried this, but sometimes doing an issue search on GitHub can help.
Dear @joshuaulrich Looks like the issue is back! Any ideas?! Fyi - not the only one affected: see here
Hi @tchevri. I've been working on this. Could you give me a ticker that has a split and dividend(s)? That will help me test the code.
I was using these lines of code dear @joshuaulrich
require(quantmod)
# getSymbols('1306.T', from="2000-01-01", src = 'yahooj')
# getSymbols("6758.T", src="yahooj", from="2013-01-01")
# getSymbols("9984.T", src = "yahooj")
# tmp <- getSymbols("9984.T", src = "yahoo", auto.assign = FALSE)
YJ1306.T <- getSymbols("1306.T", from="2000-01-01", src = "yahoo", auto.assign = FALSE)
init.d <- index(YJ1306.T)[1]
etf1306 <- YJ1306.T[, 6]/as.numeric(YJ1306.T[init.d, 6])
names(etf1306) <- "Topix Total Return Index"
plot(etf1306, main = paste0("Time Series Plot of ", names(etf1306)), cex.main=2, cex.axis=1.5, cex.sub=2)
So you can see, for now, I reverted to yahoo. Amusingly enough, same data, but not as much history... Yahoo goes back 2008, YJ goes back 2000 if I recall correctly... Thank you so much! As you know first hand, we can't thank you enough for all you do Joshua. thomas
Just as an FYI, this is the error message I am getting, I see I did not include it earlier, apologies:
> getSymbols("6758.T", src="yahooj", from="2013-01-01", verbose = T)
downloading 6758.T .....
done.
Error in getSymbols.yahooj(Symbols = "6758.T", env = <environment>, verbose = TRUE, :
Unable to import “6758.T”.
no applicable method for 'xml_find_all' applied to an object of class "NULL"
I am running quantmod 0.4.18
, basically my Rstudio
, R
, and packages, etc are all fully updated on windows 11
(I just "upgraded" to the dev version with devtools::install_github("joshuaulrich/quantmod")
, but that did not help this time)
@tchevri I just pushed a potential fix to the 312-yahooj
branch. Can you please test? It doesn't handle splits and dividends any more, because it doesn't look like the table has that data now.
Sorry for the big noob question @joshuaulrich . How do I test this? I just tried:
devtools::install_github("joshuaulrich/quantmod") Skipping install of 'quantmod' from a github remote, the SHA1 (51395f93) has not changed since last install. Use
force = TRUEto force installation
so sorry for not knowing.
Try remotes::install_github("joshuaulrich/quantmod@312-yahooj")
It took a very long time to run (not sure if I am delusional, but it seems much much longer than before!), but most importantly it works without error! Thank you so much @joshuaulrich ! Awesome.
getSymbols('1306.T', from="2000-01-01", src = 'yahooj')
[1] "1306.T"
It wasn't working again...I realized it's because i had my vpn on. Here's the reason:
From Wednesday, April 6, 2022, Yahoo! JAPAN will no longer be available from the European Economic Area (EEA) and the United Kingdom. As announced from February 1, 2022 , Yahoo! JAPAN has determined that it is difficult to provide a continuous service usage environment for customers in the European Economic Area (EEA) and the United Kingdom, so the following "2022" Services available after Wednesday, April 6, 2022, except for the services listed in, will no longer be available from EEA and the United Kingdom after Wednesday, April 6, 2022.
If you use the Yahoo! JAPAN service in Japan, you can continue to use all services.
We deeply apologize for any inconvenience caused to our customers.
Not much you can do... I take it.
Here's the code:
getSymbols('1306.T', from="2000-01-01", src = 'yahooj', verbose = TRUE)
downloading 1306.T .....
Error in getSymbols.yahooj(Symbols = "1306.T", env =
, verbose = TRUE, : Unable to import “1306.T”. HTTP error 403. In addition: Warning messages: 1: In for (i in 1:length(args)) { : closing unused connection 6 (https://finance.yahoo.co.jp/quote/1306.T/history?from=20000101&to=20220620&timeFrame=d&page=1)
Solution: For me, simply change vpn...
Description
I have a piece of code that used to run without issues for many years and here is a great opportunity to extend a warm public thank you for your awesome code (and all the help you have provided to so many folks across so many forums).
I just ran it for the first time in a few months (it was working fine in March) and I received:
Expected behavior
Usually, this call creates a variable
YJ1306.T
with the downloaded series.Minimal, reproducible example
New section, if I may: what I tried!
put
debug()
around the function call. I can see that the function callsfdoc <- XML::htmlParse(URL)
whereURL
points to Yahoo Japan historical dataThis looks correct, so I am a little shocked this call seems to be failing... Looks fine to me. This said, when I tried to browse directly to the security historical data page, I landed here. I am not sure this is relevant, but best is to let you decide, since you would know.
MUCH appreciated any help.
Session Info