28.17. Elementary unit-value indices. The compilation of price indices normally involves a first stage in which price indices for elementary commodity groups are calculated, which are subsequently combined to produces price indices at higher levels of aggregation. In the case of unit-value indices based on customs records, elementary price indices are simply ratios of unit values each of which is the result of dividing total value by total quantity at the most detailed level of aggregation available (which can be a specific stratum within a particular commodity code, deemed to include relatively homogeneous types of goods). Elementary unit-value indices are implicitly weighted by quantity information for each individual record.
28.18. Elementary price indices. On the other hand, elementary price indices based on survey data involve the unweighted aggregation of price relatives (i.e., the ratios of directly reported prices over time), as data on the traded value shares, or quantities of the surveyed goods, are usually not readily available. Based on the analysis of the properties of various alternatives, one of the preferred formulas for the calculation of elementary price indices is the Jevons index formula, which takes the geometric average of the price relatives (or, equivalently, the ratio of the geometric average of prices in each period). However, this formula is highly sensitive to extreme price decreases, and its practical use may require imposing upper and lower bounds to the individual price relatives used in the compilation. Also, the Jevons index makes the implicit assumption that revenue shares are constant, which is equivalent to assuming that quantities fall as relative prices increase.
28.19. Index formulas at higher levels of aggregation. Regardless of elementary price, indices are based on (quantity-weighted) unit values or (unweighted) price relatives. They need to be combined into aggregate indices for broader categories of goods with the help of a specific weighting structure. There are various alternative formulations for calculating these aggregate indices, and although their detailed discussion is not within the scope of this chapter, some of the most important classes of index formulas are as follows:
28.20. Chain indices. If a fixed-base index is used, it is good practice to frequently update the base period (at least every five years), as the quantities used to determine the weight structure become less relevant in describing the actual mix of goods being traded. As an alternative, chain indices are constructed by linking a series of individual indices that bilaterally compare every two consecutive periods, so that in each comparison the weight and price reference periods are moved forward in time. However, chaining should not be carried out at the sub-annual level before seasonal adjustment of the time series, as the seasonal fluctuations in prices and quantities would cause serious distortions in the chained time series owing to the fact that chaining is “path-dependent”, i.e., the change in the index between two given periods depends on the price changes that occur in each and all the intervening periods.
28.21. Focus on optimal use of trade data from administrative sources. With the above in mind, the methodology used in compiling unit-value indices for imports and exports should provide for the handling of seemingly erratic behaviour in customs data, so as to extract as much information as possible from the data available in custom records and other administrative sources. This may entail, inter alia, the use of appropriate stratification variables to disentangle the difference between genuine variations in price levels and shift effects in the quality or in the mix of goods reported under a given item specification.
28.22. Error detection and treatment of outliers. The statistical properties of the data used in the compilation of foreign trade indices, either from administrative or survey sources, also need to be examined in detail to identify outliers and correct or eliminate outright erroneous observations. In general, the treatment of outliers from direct surveys is less complicated than for UVI’s, due to the relatively smaller amount of information collected by products and by traders. However, in both instances compilers should try using to the maximum extent possible all the information they have available to determine whether particular data points should be considered outliers or not.
28.23. Treatment of quality change. Compilers of foreign trade indices based on price survey data can handle quality changes by asking survey respondents to provide an estimate of the value of the quality change whenever an item description has changed. An adjustment can be made to the price to separate out the value of the description change from any remaining price change. In some cases where the items being compared are too divergent, the original item needs to be replaced by the new one and the price series is starting over again from the current period. The use of hedonic regression models to estimate the value of the quality change for technology products like computers and some computer peripherals is also a good practice, which is currently followed by some countries.
 The design of a price survey may introduce an implicit weighting structure, e.g., through the probabilistic selection of establishments based on their shares in total exports, etc. However, at the elementary level, implementation of such probabilistic sample designs in the compilation of foreign trade price indices is infrequent. See Export and Import Price Index Manual: Theory and Practice for a more detailed discussion.
 See Export and Import Price Index Manual for a discussion of the advantages and disadvantages of alternative formulas for the calculation of elementary price indices.
 Statistical analyses may include estimation of univariate densities and cluster analysis to help assess whether a certain strata or commodity classifications may composed by various sub-categories of products with heterogeneous price trajectories.
 This is, for instance, a practice currently followed by the United States Bureau of Labor Statistics.