A weekly series of quick random charts made in Python π
The chart of this week is a line chart from the article A coup in Guinea adds fuel to aluminiumβs red-hot rally published in The Economist
Guinea is only the latest factor behind the surging aluminium price. So far this year it has shot up by around 40%, faster than that of any other highly traded metal.
The Economist (Sep 11th 2021)
Guinea, China, and the Aluminium Price
Why a coup in Guinea matters for the aluminium prices?
In recent years, Guinea π¬π³ has increased its bauxite –a sedimentary rock which is processed to make aluminium– production substantially. The country went from producing 21m tonnes in 2015 to 90m tonnes in 2020.
In 2020, Guinea’s bauxite production accounted for almost 25% of the global total. This production supplies more than half the bauxite used in Chinese π¨π³ refineries, which in turn produce more than 50% of the world’s aluminium production
What else pushing aluminium prices?
1οΈβ£ Growing demand
- Lock-downs consumption change. As bar and restaurants were force to close, the demand of canned beer and ciders increased (More on this).
- Re-opening of the economy. Countries around the world are starting to re-open and this has increased the demand for aluminium for construction purposes. Moreover, America πΊπΈ, China π¨π³, and Europe πͺπΊ have expressed plans to spend more in infrastructure to boost the economy.
2οΈβ£ Supply constrains around the world
- Jamaica’s π―π² second biggest bauxite refinery was closed indefinitely in August due to a major fire. This plant refined bauxite ore into alumina, this is then used to produce aluminium. (More on this)
- Rio Tinto, the world’s second largest metal and mining corporation, reduced its aluminium production due to a worker’s strike in Kitimat, Canada π¨π¦. (More on this)
- Projections of a decrease China π¨π³ aluminium output due to new energy-consumption targets as well as a drought in Yunnan which is hitting the supply of hydropower.
Python Code
# Author: @QuantGirl
# Title: Aluminium Prices
# Source: The Economist
# Original plot: https://www.economist.com/finance-and-economics/a-coup-in-guinea-adds-fuel-to-aluminiums-red-hot-rally/21804363
# Type: Line Chart
import datetime as dt
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import pandas as pd
prices = pd.read_csv('Data/Aluminium_Roiled.csv', parse_dates=['Date'], index_col='Date')
colors = ['#008bbc', '#3e647d', '#1a476f', '#EFF5F5']
colors_lines = ['#90353b', '#01a2d9', '#bfa19c', ]
fig, ax = plt.subplots(figsize=(12, 12), frameon=True, facecolor=colors[3])
prices[['Aluminium', 'Copper', 'Iron_Ore']].dropna().plot.line(figsize=(10, 10), ax=ax, color=colors_lines, linewidth=2,
legend=None)
ax.spines[['top', 'right', 'left']].set_visible(False)
ax.set_facecolor(colors[3])
ax.plot([0.05, 0.075], [1, 1], color="#e3120b", linewidth=20, clip_on=False, transform=fig.transFigure)
ax.text(x=0.05, y=0.93, s="Aluminium roiled", fontsize=20, fontweight="bold", ha="left", transform=fig.transFigure)
ax.text(x=0.05, y=0.90, s="Metal prices, January 1st 2021=100", fontsize=16, ha="left", transform=fig.transFigure)
ax.axhline(y=100, color="#e3120b", linewidth=1.5)
xpos = dt.datetime.strptime('2021-01-04', '%Y-%m-%d')
ypos = 100
ax.plot(xpos, ypos, marker="o", color='black', markersize=10)
xpos = dt.datetime.strptime('2021-02-04', '%Y-%m-%d')
ypos = 122
ax.text(xpos, ypos, 'Copper', fontsize=14, color='black', )
xpos = dt.datetime.strptime('2021-07-30', '%Y-%m-%d')
ypos = 142
ax.text(xpos, ypos, 'Aluminium', fontsize=14, fontweight='bold', color=colors_lines[0], ha='left')
xpos = dt.datetime.strptime('2021-07-30', '%Y-%m-%d')
ypos = 90
ax.text(xpos, ypos, 'Iron Ore', fontsize=14, color='black', ha='left')
ax.yaxis.set_ticks_position('right')
ax.set_ylim([80, 160])
ax.set_yticks(range(80, 170, 20))
ax.tick_params(axis="y", direction="out", length=0, color=colors[2], pad=5, labelsize=12)
ax.set_xlabel('2021', fontdict={'fontsize': 16}, labelpad=7)
ax.xaxis.set_ticks_position('bottom')
ax.tick_params(axis='x', direction='out', length=12, pad=5, labelsize=12)
for tick in ax.xaxis.get_major_ticks():
tick.label.set_horizontalalignment('center')
locator = mdates.AutoDateLocator(minticks=3, maxticks=4)
formatter = mdates.ConciseDateFormatter(locator)
ax.xaxis.set_major_locator(mdates.MonthLocator())
ax.xaxis.set_major_formatter(formatter)
ax.xaxis.set_major_formatter(mdates.DateFormatter('%b'))
ax.xaxis.set_tick_params(rotation=0)
ax.text(x=0.05, y=0.05, s="Sources: Bloomberg, Refinitiv Datastream; The Economist", fontsize=10, ha="left",
transform=fig.transFigure)
ax.text(x=0.95, y=0.05, s="@QuantGirl", ha="right", transform=fig.transFigure,
fontdict={'fontsize': 16, 'fontweight': 'bold', 'family': 'sans-serif', 'fontname': 'PT Serif Caption',
'color': 'purple'})
ax.grid(axis='y')
plt.subplots_adjust(top=0.85, bottom=0.18, left=0.05, right=0.9)
plt.show()