NSA Implements Python System, Revises Historical Price Indices

Share This Article:

Windhoek: The Namibia Statistics Agency (NSA) has completed the transition to a Python-based automated processing system for the Namibia Producer Price Index (NPPI), resulting in the revision of producer price estimates dating back to 2015. This development marks a significant shift in the agency's approach to data processing and analysis.

According to Namibia Press Agency, the NSA announced this change in the NPPI bulletin for the second quarter of 2026, released in Windhoek. NSA Statistician-General and Chief Executive Officer Alex Shimuafeni detailed the transition from the agency's previous MS Excel-based system to the new Python-driven framework. The new system is designed to improve data accuracy, enhance error detection, and refine mathematical modeling.

The previous Excel system calculated missing price entries using an unweighted class mean method. In contrast, the Python system automates the imputation of missing values by computing a weighted average of observed price relatives within the relevant product group. This method allows items with larger market turnovers to have a proportional impact on sub-industry trends, thereby improving the reliability of the indices.

Shimuafeni emphasized that the methodological enhancement achieved through the weighted average approach aligns imputed values more closely with actual price movements. This adjustment is expected to improve the quality, accuracy, and reliability of the indices.

The Python system also introduces automated validation protocols that monitor individual establishment files, identifying extreme price fluctuations and data entry errors from quarterly questionnaires. A strict rule is enforced where missing price entries can only be imputed for a maximum of three consecutive periods before necessitating a replacement item, which is incorporated after two consecutive price observations. The system employs a modified Laspeyres formula to aggregate basic output prices, excluding VAT, excise duties, and transport costs.

This technological upgrade is timely as domestic producers contend with significant inflationary pressures. In the second quarter of 2026, overall producer price inflation soared by 50.7% year-on-year, following an 8.8% increase from the previous quarter. The mining and quarrying sector experienced a 79.8% annual growth, driven by substantial gains in uranium, gold, and diamonds. Manufacturing producer prices also increased by 23.5% annually, largely due to rising costs in rubber and plastic products and diamond processing.

Shimuafeni cautioned about the potential downstream effects, stating, 'Such sustained increases in producer prices may eventually be transmitted to consumer prices, depending on the ability of producers to pass these higher costs on to final consumers.'