I'm an associate professor of Finance at EA/UFRGS.
You can find more details about my work at my personal site.
Fell free to reach me at [email protected].
Repository for the development of R package GetDFPData2
I'm an associate professor of Finance at EA/UFRGS.
You can find more details about my work at my personal site.
Fell free to reach me at [email protected].
See it here: https://sistemas.cvm.gov.br/port/cadastro/ftp.asp
Marcelo, sabe se é possível obter o ticker das empresas através do get_info_companies? Aparentemente o ticker das empresas não fica disponível na tabela gerada
Abraço
Quando realizo o código para pegar os DRE do ano "x" ao "y" ele baixa os arquivos gerais do ano "x" ao "y" na pasta "gdfpd2_cache".
Quando em sequencia peço para baixar os BPA de uma empresa por exemplo ele da o erro a seguir:
File already existsError in if (dl_size == current_size) { :
missing value where TRUE/FALSE needed
Então tenho que limpar para baixar de novo, sendo que anteriormente (em versões mais antigas), o código pegava o arquivo já se ele tivesse baixado automaticamente
@msperlin Hi Professor,
Thank you so much for this package, its amazing.
Yet, I'm not being able to retrieve a list of tickers of Brazilian companies from the DF 'get_info_companies()'.
The list downloaded from cvm does not have a column covering the tickers itself.
Can you please help me?
Oi Professor!
Tentei rodar os seguintes comandos no R:
df_info <- get_info_companies()
df_info <- get_info_companies(tempdir())
Ambos com o erro:
Fetching info on B3 companies
Dowloading file from CVM
File not found, downloading it..
sh: wget: command not found
Error in utils::download.file(url = dl_link, destfile = dest_file, method = "wget", :
'wget' call had nonzero exit status
In addition: Warning message:
In system(paste("wget", paste(extra, collapse = " "), shQuote(url), :
error in running command
Error in if (file.size(dest_file) < 10) { :
missing value where TRUE/FALSE needed
df_dfp <- get_dfp_data(companies_cvm_codes = 22179,
clean_data = TRUE,
use_memoise = FALSE,
first_year = 2010,
last_year = 2020,
type_docs = c('DRE', 'BPA', 'BPP', "DFC_MI"), # income, assets, liabilities
type_format = 'con') # consolidated statements
__
Error: Can't combine ..1$DT_INI_EXERC
and ..2$DT_INI_EXERC
.
Run rlang::last_error()
to see where the error occurred.
Bom dia professor, poderia por gentileza informar se há um acesso correto ao link do shiny (versão web do GetDFPData2)? Tento acessar pelo link do blog, porém aparece uma mensagem "Page not found". Link é esse: https://msperlin.com/shiny/GetDFPData
Obrigado desde já
Ao executar a função get_dfp_data obtenho o seguinte erro:
Error in read_xml.raw(raw, encoding = encoding, base_url = base_url, as_html = as_html, :
Failed to parse text
código executado:
l.dfp <- get_dfp_data(companies_cvm_codes = 20990,
use_memoise = FALSE,
clean_data = TRUE,
type_docs = c('BPA', 'BPP', 'DRE', 'DFC_MI'),
type_format = 'con',
first_year = 2015,
last_year = 2020)
if (!require(GetDFPData2)) devtools::install_github('msperlin/GetDFPData2') # not in CRAN yet
library(dplyr)
df_itr <- get_itr_data(companies_cvm_codes = NULL,
first_year = 2010,
last_year = 2011,
type_docs = c('DRE', 'BPA', 'BPP','DFC_MI','DFC_MD')
)
E obtenho o seguinte erro:
Downloading DRE
Error in open.connection(x, "rb") : HTTP error 404.
Olá, professor.
Baixei os dados de Cosan desde 2010, mas não veio o ano de 2021.
O que está acontecendo?
Código abaixo:
rm(list = ls())
graphics.off()
if (!require("pacman")) install.packages("pacman")
p_load(
GetDFPData2,
tidyverse,
janitor,
here,
lubridate,
tiqyquant
)
select_company <- "cosan"
data_search <-
search_company(select_company) |>
as_tibble() |>
clean_names() |>
filter(sit_reg == "ATIVO")
company_code <-
data_search |>
pull(cd_cvm)
first_year <- 2010
income <-
get_dfp_data(
companies_cvm_codes = company_code,
type_docs = "DRE",
type_format = "con",
first_year = first_year,
last_year = year(Sys.Date())
) |>
pluck(1) |>
clean_names()
select_income <- c(
"Receita de Venda de Bens e/ou Serviços",
"Resultado Bruto",
"Resultado Antes do Resultado Financeiro e dos Tributos",
"Lucro/Prejuízo Consolidado do Período",
)
income_subset <-
income |>
select(
date_start = dt_ini_exerc,
index = cd_conta,
item = ds_conta,
value = vl_conta
) |>
filter(item %in% select_income)
income_subset |>
filter(str_detect(item, "Receita")) |>
tq_mutate(
select = value,
mutate_fun = periodReturn,
period = "annually",
col_rename = "return"
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.