03 · Trade Composition: What Does Bahrain Trade?

Objective. Quantify the size and composition of Bahrain's non-oil trade before the 2026 conflict: the split between imports, domestic exports and re-exports, and the commodity categories and products that dominate each flow.

Scope. Annual figures use complete years only (2021–2025). Including the nine-month 2026 in an annual average would bias it downward.

%load_ext autoreload
%autoreload 2

import pandas as pd
import plotly.express as px

from scripts.analysis import load_trade, full_years, to_millions
from scripts.plotly_theme import use_metro, RED, BLUE, ORANGE

use_metro()
pd.options.display.float_format = "{:,.1f}".format
TYPE_COLORS = {"import": RED, "export": BLUE, "re-export": ORANGE}

df = load_trade()
fy = full_years(df)

1. Annual trade volume

Three measures of size are reported: total declared value, total weight and number of records.

annual = fy.groupby("year").agg(
    value_bhd_m=("price_bhd", "sum"),
    weight_mt=("weight_kg", "sum"),
    records=("price_bhd", "size"),
)

annual["value_bhd_m"] = annual["value_bhd_m"] / 1e6   # BHD millions
annual["weight_mt"] = annual["weight_mt"] / 1e9       # million tonnes

annual
value_bhd_m weight_mt records
year
2021 9,988.9 42.6 368764
2022 11,529.0 42.8 377561
2023 10,443.0 43.3 384054
2024 10,554.7 42.0 386230
2025 11,115.7 44.8 389966
# Average per complete year, and the bias introduced by including partial 2026
avg_full = annual.mean()

annual_with_2026 = df.groupby("year").agg(
    value_bhd_m=("price_bhd", "sum"),
    weight_mt=("weight_kg", "sum"),
    records=("price_bhd", "size"),
)
annual_with_2026["value_bhd_m"] = annual_with_2026["value_bhd_m"] / 1e6
annual_with_2026["weight_mt"] = annual_with_2026["weight_mt"] / 1e9

avg_with_2026 = annual_with_2026.mean()

pd.DataFrame({"2021–2025 (complete years)": avg_full, "2021–2026 (incl. partial 2026)": avg_with_2026})
2021–2025 (complete years) 2021–2026 (incl. partial 2026)
value_bhd_m 10,726.3 9,991.3
weight_mt 43.1 38.6
records 381,315.0 358,413.0

2. Composition by trade type

The share of each trade type depends on the measure: value, weight or number of records.

composition = fy.groupby("trade_type").agg(
    value=("price_bhd", "sum"),
    weight=("weight_kg", "sum"),
    records=("price_bhd", "size"),
)
composition_pct = composition / composition.sum() * 100
composition_pct
value weight records
trade_type
export 38.9 37.3 4.6
import 54.1 62.0 84.1
re-export 7.1 0.7 11.3
temp = (
    composition_pct
    .reset_index()
    .melt(id_vars="trade_type", var_name="measure", value_name="share")
)

fig = px.bar(
    temp,
    x="share",
    y="measure",
    color="trade_type",
    orientation="h",
    text_auto=".1f",
    color_discrete_map=TYPE_COLORS,
)

fig.update_layout(
    title="Trade Composition by Measure, 2021–2025",
    xaxis_title="Share (%)",
    yaxis_title="Measure",
    legend_title_text="Trade Type",
    barmode="stack",
    height=420,
)

fig.show()

3. Commodity categories

Commodities are grouped into HS sections (see notebook 01). The chart compares the share of each category within imports and within domestic exports.

cat = (
    fy[fy["trade_type"].isin(["import", "export"])]
    .groupby(["trade_type", "commodity_category"], observed=True)["price_bhd"].sum()
    .reset_index()
)
cat["share"] = cat["price_bhd"] / cat.groupby("trade_type")["price_bhd"].transform("sum") * 100
cat_wide = cat.pivot(index="commodity_category", columns="trade_type", values="share").fillna(0)
cat_wide.sort_values("import", ascending=False)
trade_type export import
commodity_category
Machinery / Electrical 0.9 19.6
Chemicals & Allied Industries 6.9 15.8
Mineral Products 17.6 15.5
Transportation 0.5 8.3
Metals 58.5 6.9
Stone / Glass 3.5 6.3
Foodstuffs 2.6 5.3
Animal & Animal Products 4.6 4.6
Miscellaneous 0.8 4.4
Vegetable Products 0.2 4.2
Plastics / Rubbers 2.4 3.4
Textiles 0.6 2.6
Wood & Wood Products 0.6 1.8
Footwear / Headgear 0.1 0.6
Raw Hides, Skins, Leather, & Furs 0.0 0.4
Special Classification 0.0 0.3
# order categories by their import share, largest at the top
order = cat_wide.sort_values("import", ascending=False).index.tolist()

fig = px.bar(
    cat,
    x="share",
    y="commodity_category",
    color="trade_type",
    barmode="group",
    orientation="h",
    color_discrete_map=TYPE_COLORS,
    category_orders={"commodity_category": order},
)

fig.update_layout(
    title="Commodity Categories: Share of Import and Export Value, 2021–2025",
    xaxis_title="Share of Trade-Type Value (%)",
    yaxis_title="Category",
    legend_title_text="Trade Type",
    height=750,
)

fig.show()

4. Leading products

Individual 8-digit commodities ranked by total value. The concentration of value in a few products is examined in more detail in notebook 07.

def top_products(trade_type, n=10):
    sub = fy[fy["trade_type"] == trade_type]
    total = sub["price_bhd"].sum()
    out = (
        sub.groupby("commodity_name")["price_bhd"].sum().nlargest(n)
        .rename("value_bhd_m").to_frame()
    )
    out["share_%"] = out["value_bhd_m"] / total * 100
    out["value_bhd_m"] = to_millions(out["value_bhd_m"])
    return out

top_imports = top_products("import")
top_imports
value_bhd_m share_%
commodity_name
NON-AGGLOMERATED IRON ORES AND CONCENTRATES 3,294.9 11.4
OTHER ALUMINIUM OXIDE 2,387.0 8.2
PARTS FOR AIRCRAFT ENGINES 889.4 3.1
GOLD INGOTS 752.1 2.6
JEWELLERY OF GOLD 525.9 1.8
JEEPS, CURRENT YEAR, SPARK IGNITION, OVER 3000 CC 435.5 1.5
SMARTPHONES 415.3 1.4
JEEPS, CURRENT, SPARK IGNITION, 1501 TO 3000 CC 391.9 1.4
OTHER MEDICAMENTS PUT IN FORMS OR PACKINGS FOR RETAIL SALE 389.1 1.3
PETROLEUM COKE NOT CALCINED 387.6 1.3
top_exports = top_products("export")
top_exports
value_bhd_m share_%
commodity_name
UNWROUGHT ALUMINIUM ALLOYS 6,034.8 28.9
AGGLOMERATED IRON ORES AND CONCENTRATES 3,632.3 17.4
ALUMINUM WIRE, NOT ALLOYED, OVER 7 MM THICK 1,055.4 5.1
UNWROUGHT ALUMINIUM, NOT ALLOYED 1,038.1 5.0
PROCESSED CHEESE, NOT GRATED OR POWDERED 763.2 3.7
BRIDGES AND BRIDGE-SECTIONS 687.0 3.3
UREA, WHETHER OR NOT IN AQUEOUS SOLUTION 640.4 3.1
SEMI-FINISHED IRON AND STEEL, UNDER 0.25 PERCENT CARBON, RECT. 567.7 2.7
JEWELLERY OF GOLD 357.2 1.7
ALUMINIUM ALLOYS FLATTENED OR GRAINED COILS AND STRIPS OF A THICKNESS EXCEEDING 0.4 MM BUT NOT EXCEEDING 8 MM 323.9 1.6
top_reexports = top_products("re-export")
top_reexports
value_bhd_m share_%
commodity_name
TURBO-JETS OF A THRUST EXCEEDING 25 KN 291.2 7.7
GOLD INGOTS 210.2 5.6
JEEPS, CURRENT YEAR, SPARK IGNITION, OVER 3000 CC 203.5 5.4
PARTS FOR AIRCRAFT ENGINES 190.2 5.0
SMARTPHONES 108.7 2.9
OTHER TELEVISION CAMERAS, DIGITAL CAMERAS AND VIDEO CAMERA RECORDERS 102.3 2.7
PICKUPS, TWO CABS, SPARK IGNITION, 5 TONS OR LESS 92.5 2.4
OTHER WRISTWATCHES, PRECIOUS METAL, AUTOMATIC WINDING 88.8 2.3
CONFIDENTIAL GOODS 75.8 2.0
OTHER BODY PARTS 75.0 2.0
temp = top_imports.reset_index()
temp["commodity_name"] = temp["commodity_name"].str.title().str.slice(0, 45)   # shorten long names

fig = px.bar(
    temp,
    x="value_bhd_m",
    y="commodity_name",
    orientation="h",
    text_auto=".0f",
)

fig.update_layout(
    title="Top 10 Imported Products by Value, 2021–2025",
    xaxis_title="Value (BHD m)",
    yaxis_title="Commodity",
)

fig.update_traces(marker_color=RED)
fig.update_yaxes(categoryorder="total ascending")

fig.show()
temp = top_exports.reset_index()
temp["commodity_name"] = temp["commodity_name"].str.title().str.slice(0, 45)

fig = px.bar(
    temp,
    x="value_bhd_m",
    y="commodity_name",
    orientation="h",
    text_auto=".0f",
)

fig.update_layout(
    title="Top 10 Exported Products by Value, 2021–2025",
    xaxis_title="Value (BHD m)",
    yaxis_title="Commodity",
)

fig.update_traces(marker_color=BLUE)
fig.update_yaxes(categoryorder="total ascending")

fig.show()

Stability of the leading imports over time

Annual value of the ten leading import products, to check whether the ranking reflects persistent dependence or isolated years.

top_names = top_imports.index
yearly = (
    fy[(fy["trade_type"] == "import") & (fy["commodity_name"].isin(top_names))]
    .pivot_table(index="commodity_name", columns="year", values="price_bhd", aggfunc="sum")
    .reindex(top_names)
)
yearly = yearly / 1e6
yearly.index = yearly.index.str.title().str.slice(0, 40)

fig = px.imshow(
    yearly,
    text_auto=".0f",
    aspect="auto",
    title="Top 10 Import Products: Annual Value (BHD m)",
    labels={
        "x": "Year",
        "y": "Commodity",
        "color": "BHD m"
    }
)

fig.update_xaxes(type="category")
fig.update_layout(height=650)

fig.show()

Findings

  1. Size. Over 2021–2025, Bahrain's non-oil trade averaged BHD 10.73 bn, 43.1 million tonnes and 381,315 records per year. Annual value ranged from BHD 9.99 bn (2021) to 11.53 bn (2022). Correction to the earlier deck: the figures on its slide 7 (BHD 9.99 bn, 38.6 Mt, 358,413 records) averaged in the nine-month 2026, which understates all three measures by 6–11%.
  2. Imports are the largest flow by every measure. They account for 54.1% of value, 62.0% of weight and 84.1% of records. Domestic exports contribute 38.9% of value, and re-exports 7.1% of value but only 0.7% of weight (high-value, low-weight goods).
  3. Imports are diversified across categories, exports are not. The three leading import categories are Machinery / Electrical (19.6%), Chemicals (15.8%) and Mineral Products (15.5%). Domestic exports are concentrated in Metals (58.5%), followed by Mineral Products (17.6%).
  4. A few industrial inputs dominate imports. Iron ore (11.4% of import value) and alumina (8.2%) alone make up about one fifth of all imports. Both are raw materials for Bahrain's main exports, aluminium alloys (28.9% of export value) and agglomerated iron ore pellets (17.4%). Import dependence and export capacity are therefore directly linked.
  5. The dependence is persistent. Iron ore and alumina are the two largest imports in every year from 2021 to 2025. Alumina imports rose from BHD 378 m to 558 m over the period. Smartphones have no 2021 value because their commodity code was introduced in the HS 2022 revision.