Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Silva authored and Andrei Silva committed Aug 24, 2021
0 parents commit 1b40e65
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test_fii.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
library(rvest)
library(dplyr)

URL <- "https://www.fundsexplorer.com.br/ranking"

page = xml2::read_html(URL)

df = html_node(df, "#table-ranking") %>%
html_table()

df %>%
filter(`DY (12M)Média` != "N/A" & `P/VPA` != "N/A") %>%
filter(as.integer(`Liquidez Diária`) > 1000) %>%
filter((gsub(",", ".", `P/VPA`) > 0.7) & (gsub(",", ".", `P/VPA`) < 1)) %>%
arrange(desc(`DY (12M)Média`)) %>%
select(`Códigodo fundo`,`DY (12M)Média`, `P/VPA`, `Liquidez Diária`) %>%
top_n(20, `DY (12M)Média`)

0 comments on commit 1b40e65

Please sign in to comment.