Morocco FX Analytics · Foreign trade
FX demand (imports) versus FX supply (exports). The trade imbalance is the primary source of structural pressure on the dirham.
Trade deficit
Coverage ratio
Office des Changes — IMEE · customs basis · cumulative through May 2026.
Annual trend · billions MAD
Deficit as bars · coverage ratio (exports/imports) as line
Solid shade = flows with settlement (generates FX demand) · light shade = flows without payment (temporary admission, FX-neutral)
Origin of FX demand · billions MAD
The Office des Changes retroactively revises its sectoral breakdowns from one publication to the next (all categories, not just automotive/aerospace). Last-year figures may therefore differ from previously published values. Year-on-year changes are recalculated on the revised base, not on the previously published figure — which avoids artefacts but means that a YoY percentage here may differ from press releases that used the pre-revision base.
What share of the trade deficit is attributable to energy? Formula: |energy balance| ÷ |total deficit|. A high ratio means the trade deficit largely depends on the energy bill — and therefore on world oil/gas prices.
The 'Energy & minerals' scope (Office des Changes classification) includes fuels (~90% of the item) and a residual share of minerals. The weight varies with commodity prices: it surged in 2022 (oil shock), then fell back. The ratio is calculated from annual customs data (export − import by sector); provisional years may be revised.
Which sectors deepen the deficit, which offset it? Each bar = sector balance (exports − imports). The sum of all bars equals the net trade deficit (dashed line).
The structure reflects prices and volumes — a sector dominating in a shock year (e.g. energy in 2022) does not imply a structural dependency. Cross-check with the time series below. 'Other' regroups the smallest sectors to keep the chart readable. Bars are sorted by contribution to the deficit (largest negative first).
Trade balance by sector = exports − imports (Office des Changes, MAD). The 5 smallest sectors are grouped as 'Other'. The structure is nominal — a price surge (e.g. energy 2022) shows up in the levels, not in the volumes. 'Net deficit' (dashed line) = overall trade balance; if it falls below the largest red bar, other sectors are partially offsetting.
The energy sector trade balance tracks world commodity prices — a price shock deepens the deficit regardless of import volumes.
The chemicals & pharma trade surplus rises with phosphate prices — a favorable cycle amplifies the net contribution.
The food sector trade deficit tracks world commodity prices — a price surge worsens the import bill.
Read with caution: world prices are monthly (blue curve, latest data point = most recent month available) while trade balances are annual (bars, latest bar = last published year). The visual correlation therefore has a structural lag — the price curve may advance 6 to 12 months beyond the last bar without any 'gap': it simply reflects data that the annual trade balance has not yet captured. Index base 100 compresses the level differences to display both series on a single scale; the absolute levels (double axis) restore the true magnitudes.