# Sydney Stock Exchange – calendar view¶

This notebook helps you see the number of stock and share sheets in the bound volumes from the Sydney Stock Exchange for each day from 1901 to 1950. You can pick out major changes such as when the number of sheets per day changed, and when Saturday trading finished. For example, if you look at July 1934 you'll see the number of sheets produced per day changed from 5 to 6, and in April 1937 that increased again to 9. You'll also pick out official holidays and other days on which trading was suspended. Look for the ends of the wars! Hover over each day for more information.

However, the bound volumes are not always complete. You'll notice some days have fewer sheets than expected or none at all. In 1947, for example, there are no pages from September. Where there are no pages, I've searched Trove for evidence that trading was suspended and added a note when I've found something. In using these records it's important to be aware of the gaps.

In [1]:
from math import ceil

import altair as alt
import pandas as pd
from IPython.display import HTML, display

In [2]:
def week_of_month(dt):
"""
Returns the week of the month for the specified date.
From: https://stackoverflow.com/a/16804556
"""
first_day = dt.replace(day=1)
dom = dt.day

# Get the list of dates
df.loc[:, "week"] = df.loc[:, "date"].apply(week_of_month)
# Make empty reasons an empty string so they look better in tooltips
df["reason"].fillna(value="", inplace=True)

In [3]:
def make_year_chart(df, year):
# Filter df to specified year
df_year = df.loc[(df["date"] >= f"{year}-01-01") & (df["date"] <= f"{year}-12-31")]
chart = (
alt.Chart(df_year)
.mark_rect(stroke="white")
.encode(
# Days of the week. Have to set order specifically to put Sunday at the end of the week
x=alt.X(
"date:O",
timeUnit="day",
title=None,
sort=[
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday",
],
),
# The rows are weeks
y=alt.Y("week:O", title=None, axis=alt.Axis(ticks=False, labels=False)),
# Facet by month
facet=alt.Facet(
"month(date):T",
title="",
columns=4,
),
# Colours indicate the number of pages
color=alt.Color(
"pages:Q",
scale=alt.Scale(scheme="yelloworangebrown", domain=[0, 10]),
legend=alt.Legend(title="Number of pages"),
),
tooltip=[
alt.Tooltip("date:T", format="%a, %e %b %Y"),
"pages:Q",
"expected:Q",
"reason",
],
)
.resolve_scale(x="independent")
)
return chart

In [4]:
for year in range(1901, 1951):
display(HTML(f"<h2>{year}</h2>"))
display(make_year_chart(df, year))