Koffi-Fredysessie / BRVM

Ce package R fournit une interface conviviale pour accéder aux données de la BRVM, qui est une bourse régionale desservant plusieurs pays d'Afrique de l'Ouest. Avec ce package, les utilisateurs peuvent facilement récupérer des données historiques sur les prix des actions, les volumes de transactions et d'autres indicateurs financiers.
https://rpubs.com/Fredysessie/Readme_BRVM_Stock
Other
7 stars 1 forks source link

Bug Report: BRVM_get1() #29

Closed spsanderson closed 1 year ago

spsanderson commented 2 years ago

Why in BRVM_get1() do we list out the tickers and the indexes? The function BVRM_index() returns the indexes:

> BRVM_index()
# A tibble: 9 × 5
  index_name            previous_close  close percent_change percent_ytd_change
  <chr>                          <dbl>  <dbl>          <dbl>              <dbl>
1 BRVM - 10                      158.   158.           -0.45               0.59
2 BRVM - AGRICULTURE             341.   336.           -1.51               0.45
3 BRVM - OTHER SECTOR           1845.  1845.            0                  3.55
4 BRVM - COMPOSITE               208.   207.           -0.32               0.32
5 BRVM - DISTRIBUTION            383.   380.           -0.94              -2.67
6 BRVM - FINANCE                  76.3   76.4           0.12               0.69
7 BRVM - INDUSTRY                116.   115.           -0.23               1.29
8 BRVM - PUBLIC SERVICE          469.   467.           -0.46              -0.18
9 BRVM - TRANSPORT               403.   403.            0                  7.2 

Instead of making this:

  all_tickers <- c(
    "ABJC", "BICC", "BNBC", "BOAB", "BOABF", "BOAC",
    "BOAM", "BOAN", "BOAS", "CABC", "CBIBF", "CFAC",
    "CIEC", "ECOC", "ETIT", "FTSC", "NEIC", "NSBC",
    "NTLC", "ONTBF", "ORGT", "PALC", "PRSC", "SAFC",
    "SCRC", "SDCC", "SDSC", "SEMC", "SGBC", "SHEC",
    "SIBC", "SICC", "SIVC", "SLBC", "SMBC", "SNTS",
    "SOGC", "SPHC", "STAC", "STBC", "SVOC", "TTLC",
    "TTLS", "UNLC", "UNXC"
    # , "TTRC"
  )

The data should be in a function that returns a vector this means that in the future if this list must be updated then you don't have to hunt and peck each file to see if you are making this list, just change the list in the return function and all functions that rely on it are automatically up-to-date.

Fredysessie commented 1 year ago

Hi @spsanderson Truly the are not the same. • Brvm_get IS only for tickers(companies), • Brvm_index is to get sector cotation but • Brvm_get1 is to get both for tickers and sectors. Richbourse IS not giving directly index data raison why WE only use tickers as input