Index numbers¶
In the app: Help → Help contents, Index numbers.
Data → Transform → Index numbers… does what statistics offices, central banks and ministries do to their series every release. In formulas: rebase(cpi, 2020) is cpi scaled to average 100 over 2020 (its four quarters or twelve months); rebase(cpi, "2020Q1", 1) to 1 in one quarter; rebase(cpi, "2019:2021") to 100 over a span. splice(old, new) joins a discontinued series and its replacement at the first period both have: before it, the old series times the link factor new / old there, so the old growth is carried back on the new level; splice(old, new, "2015", "difference", "forward") links by the difference over 2015 and carries the new series forward on the old level. deflate(nominal, price, 2020) is the series in 2020 prices, nominal × 100 / the price index rebased to 100 in 2020. They work in derived series, so they stay up to date. In Python the same are rebase(), splice(), link_factor(old, new), deflate() and implicit_deflator(nominal, real) on pandas series.
price_index(prices, quantities) and quantity_index() compute Laspeyres, Paasche, Fisher and Törnqvist indices, fixed-base or chained period to period, from a column per item (or values and prices). chain_link(values, prices) builds the chain-linked volume of an aggregate from its components at the previous year's average prices, as the IMF Quarterly National Accounts Manual (2017, chapter 8) describes: the annual overlap (quarters add up to the annual chain-linked volume), the one-quarter overlap and the over-the-year technique, scaled so the reference year's sum equals its current-price value. Chain-linked components do not add up to the chain-linked total, except in the reference year and (annual overlap) the year after; the discrepancy column says by how much. contributions_to_growth() splits the aggregate's percentage change into components' contributions, in percentage points, that add up exactly: for a chained Fisher index by the BEA's formula, for the annual-overlap volume by the QNA Manual's (the change from the last quarter to the previous year's average at the prices of the year before, and from that average onwards at the previous year's prices). with_index(), with_chain_linked() and with_contributions() add the results to a dataset, as the dialog does.
A worked example, annual data, two products. Prices and quantities: A 1, 1.2, 1.5 and 10, 11, 12; B 2, 2.1, 2 and 5, 6, 8. Values at current prices are 20, 25.8 and 34; at the previous year's prices 23 (year 2: 11 × 1 + 6 × 2) and 31.2 (year 3: 12 × 1.2 + 8 × 2.1). Chain-linked with year 1 as reference: 20, 20 × 23 / 20 = 23, and 23 × 31.2 / 25.8 = 27.814. The components at year-1 prices are A 10, 11, 12 and B 10, 12, 16; they add up to 28 in year 3, so the discrepancy is -0.186 (none in years 1 and 2). Contributions to year 3's growth of 20.93%: A (12 × 1.2 - 13.2) / 25.8 = 4.65 points, B (8 × 2.1 - 12.6) / 25.8 = 16.28 points. The Laspeyres price index of year 2 (year 1 = 100) is 100 × (1.2 × 10 + 2.1 × 5) / 20 = 112.5, the Paasche 100 × 25.8 / 23 = 112.17, the Fisher their geometric mean, 112.34.
values = pd.DataFrame({"a": [10, 13.2, 18], "b": [10, 12.6, 16]}, index=pd.period_range("2001", periods=3, freq="Y"))
prices = pd.DataFrame({"a": [1, 1.2, 1.5], "b": [2, 2.1, 2]}, index=values.index)
chain_link(values, prices, reference=2001) # a, b, total, discrepancy
contributions_to_growth(values, prices, method="annual-overlap")
price_index(prices, values=values, formula="laspeyres")
Elementary aggregates of prices without weights (Jevons, Dutot, Carli) belong to a statistics office's price collection and are not here.
See also¶
References¶
- International Monetary Fund (2017). Quarterly National Accounts Manual, 2017 Edition. Chapter 8: Price and Volume Measures. Washington, DC: IMF. (search)
- ILO, IMF, OECD, UNECE, Eurostat and World Bank (2020). Consumer Price Index Manual: Concepts and Methods. Washington, DC: IMF. (search)
- Reinsdorf, M. B., Diewert, W. E. and Ehemann, C. (2002). Additive decompositions for Fisher, Törnqvist and geometric mean indexes. Journal of Economic and Social Measurement 28(1-2), 51-61. (search)
- Bloem, A. M., Dippelsman, R. J. and Mæhle, N. Ø. (2001). Quarterly National Accounts Manual: Concepts, Data Sources, and Compilation. Washington, DC: IMF. (search)