Cannot Open URL, HTTP status was '403 Forbidden'
Closed this issue · 1 comments
Hi,
I have been able to download Data for some years and not others. I continue to get the same error with older data. I know that the package can see the data that I want because I get a full list of 10Ks with the Annual Reports Function.
`library(quantmod)
library(finreportr)
CompanyInfo("BAC")
AnnualReports("BAC")
BAC.BS.2017 <- GetBalanceSheet("BAC",2017)
BAC.BS.2015 <- GetBalanceSheet("BAC",2015)
BAC.BS.2014 <- GetBalanceSheet("BAC",2014)
BAC.BS.2012 <- GetBalanceSheet("BAC",2012)
BAC.BS.2005 <- GetBalanceSheet("BAC",2005)
`
when i try to get the 2005 data I get the following error
`> BAC.BS.2005 <- GetBalanceSheet("BAC",2005)
Error in fileFromCache(file.inst) :
Error in download.file(file, cached.file, quiet = !verbose) :
cannot open URL 'https://www.sec.gov/Archives/edgar/data/70858/000119312505039878/bac-20041231.xml'
In addition: Warning message:
In download.file(file, cached.file, quiet = !verbose) :
cannot open URL 'https://www.sec.gov/Archives/edgar/data/70858/000119312505039878/bac-20041231.xml': HTTP status was '403 Forbidden'`
Additionally, is there any way to make the same Balance Sheet call from the accession numbers generated by the AnnualReports function?
Thanks in advance for your help
Hi @robdoumar,
Thank you for your questions.
When GetBalanceSheet()
cannot pull data from a year farther in the past, I suggest checking if there's actually any data to pull. For example, it doesn't seem like BAC filed their financials in XBRL format in 2005. (You can contrast this with a year like 2012, for which there is data).
Since finreportr parses financial data stored in XBRL format, it seems like there just isn't any data to work off of for 2005.
Making a Balance Sheet call with just the accession number is not currently supported.