Skip to contents

Weighted mean of item price changes with weights that penalise volatility (Section 2.2 of BCB's Technical Note 57). For each month, the volatility of an item is the standard deviation of the difference between its monthly change and headline IPCA over the 48 months ending in that month; the adjusted weight is the original weight divided by that volatility, renormalised to sum to one.

Usage

core_dp(data, change, weight, code, group, date)

Arguments

data

Dataframe object with inflation index and items data.

change

A string with the column name of the percentage change of the inflation index and items.

weight

A string with the column name of the weight of the inflation index and items.

code

A string with the column name of the code of the inflation index and items as provided in get_ipca().

group

A string with the column name of the group of the inflation index and items as provided in group_desc().

date

A string with the name of the date column.

Value

Calculated core inflation tibble.

Details

The 48-month window crosses the January 2020 change in the IPCA structure. For the items 8101 (Cursos regulares) and 8104 (Cursos diversos), whose composition changed, the pre-2020 history is replaced by the proxies of Table 4 of the note (sub-item "Curso técnico" moved from 8104 to 8101). The proxies are used only in windows ending after the change and require the full dataset (all hierarchy levels), as returned by get_ipca() with both SIDRA tables.

The series starts 48 months after the first observation in data.

Author

Fernando da Silva <fernando@fortietwo.com>

Examples

if (FALSE) { # \dontrun{
library(magrittr)

ipca_dp <- get_ipca(period = "all") %>%
group_desc() %>%
core_dp(., "pct_change", "weight", "code", "group", "date")
} # }