# Selic and Interest Rates

## get_selic_rate()

Downloads the daily SELIC rate series from Central Bank of Brazil.

### Parameters

- `start_year`: Starting year (e.g., 2020)
- `end_year`: Ending year (e.g., 2024)
- `language`: Column names language - `"eng"` (default) or `"pt"`

### Usage

    library(brfinance)

    # English version
    selic_eng <- get_selic_rate(2020, 2024)
    head(selic_eng)
    #>         date value
    #> 1 2020-01-02   4.4
    #> 2 2020-01-03   4.4
    #> 3 2020-01-06   4.4
    #> 4 2020-01-07   4.4
    #> 5 2020-01-08   4.4
    #> 6 2020-01-09   4.4

    # Portuguese version
    selic_pt <- get_selic_rate(2020, 2024, language = "pt")
    head(selic_pt)
    #>         date value
    #> 1 2020-01-02   4.4
    #> 2 2020-01-03   4.4
    #> 3 2020-01-06   4.4
    #> 4 2020-01-07   4.4
    #> 5 2020-01-08   4.4
    #> 6 2020-01-09   4.4

## plot_selic_rate()

Creates a time series plot of SELIC rate.

### Parameters

- `data`: Data from `get_selic_rate()`
- `language`: Plot labels language - `"eng"` (default) or `"pt"`

### Usage

    # Get data
    selic_data <- get_selic_rate(2020, 2024)

    # Create plot
    selic_plot <- plot_selic_rate(selic_data, language = "eng")
    print(selic_plot)

    # Portuguese version
    selic_data_pt <- get_selic_rate(2000,2005, language = "pt")

    selic_plot_pt <- plot_selic_rate(selic_data_pt, language = "pt")
    print(selic_plot_pt)