Error with getSymbols('SP500', from = "2020-01-01", to = "2021-06-30", src='FRED') SP500<-na.locf(SP500, na.rm = TRUE)
I upgraded to R 4.2.2. I also installed quantmod, TTR, chron and a few other packages. I'm getting the same
Error in getSymbols.FRED(Symbols = "SP500", env = <environment>, verbose = FALSE, :
Unable to import "SP500".
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed).
Calls: getSymbols -> do.call -> getSymbols.FRED
Execution halted
Error message. I was running code last week that had been upgraded for the switch from http: to https: on FRED. Probably r 4.0.5.
Thanks,
Frank
Chicago
-----Original Message-----
From: Daniel Cegie?ka
Sent: Monday, November 07, 2022 10:45 AM
To: Joshua Ulrich <josh.m.ulrich at gmail.com>
Cc: Frank <frankm60606 at gmail.com>; r-sig-finance at r-project.org
Subject: Re: [R-SIG-Finance] Error with getSymbols('SP500', from = "2020-01-01", to = "2021-06-30", src='FRED') SP500<-na.locf(SP500, na.rm = TRUE)
Hi Josh,
schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE
(0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed).
This looks like a problem (not a bug in getSymbols) with the TLS cipher suites. Try direct curl/libcurl. I think you will get the same error.
Best,
Daniel
pon., 7 lis 2022 o 17:33 Joshua Ulrich <josh.m.ulrich at gmail.com> napisa?(a):
Hi Frank, These both work for me in R-4.2.1 and quantmod 0.4.20. It looks like you're using quantmod <= 0.4.18. What R version are you using? At minimum, you should reinstall the packages that were built in R-3.5.3 in March-2019. Best, Josh On Mon, Nov 7, 2022 at 10:26 AM Frank <frankm60606 at gmail.com> wrote:
In running:
##
## Get S&P_500 from FRED
##
getSymbols('SP500', from = "2020-01-01", to =
"2021-06-30",src='FRED') SP500<-na.locf(SP500,na.rm = TRUE)
tail(SP500)
file_name <- "SP500.csv"
write.zoo(SP500, file = file_name, append = FALSE, quote = TRUE, sep
= ",")
quit()
I get:
library(quantmod)
Loading required package: xts
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Loading required package: TTR
Warning messages:
1: package 'xts' was built under R version 3.5.3
2: package 'zoo' was built under R version 3.5.3
3: package 'TTR' was built under R version 3.5.3
library(chron)
NOTE: The default cutoff when expanding a 2-digit year to a 4-digit year will change from 30 to 69 by Aug 2020 (as for Date and POSIXct in base R.) Warning message: package 'chron' was built under R version 3.5.3
##
## Get S&P_500 from FRED
##
getSymbols('SP500', from = "2020-01-01", to =
"2021-06-30",src='FRED')
'getSymbols' currently uses auto.assign=TRUE by default, but will
use auto.assign=FALSE in 0.5-0. You will still be able to use
'loadSymbols' to automatically load data.
getOption("getSymbols.env") and
getOption("getSymbols.auto.assign") will still be checked for
alternate defaults.
This message is shown once per session and may be disabled by
setting options("getSymbols.warning4.0"=FALSE). See ?getSymbols for details.
Error in getSymbols.FRED(Symbols = "SP500", env = <environment>,
verbose = FALSE, :
Unable to import "SP500".
schannel: next InitializeSecurityContext failed:
SEC_E_ILLEGAL_MESSAGE
(0x80090326) - This error usually occurs when a fatal SSL/TLS alert
is received (e.g. handshake failed).
Calls: getSymbols -> do.call -> getSymbols.FRED Execution halted
I got correct data as recently as
11/2/2022 44867 3759.69 3759.69 3759.69 3759.69 3759.69 3759.69
Similar thing with getSymbols('DGS3MO',src='FRED').
They both download correctly directly from FRED.
Thanks,
Frank
Chicago
_______________________________________________ R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
-- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com
_______________________________________________ R-SIG-Finance at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.