Lowest Unemployment Numbers in 49 Years and a Shrinking Labor Pool - What Does That Mean?
Introduction
Were seeing the lowest unemployment numbers in 49 years!! Were all seeing a shrinking labor pool - what does this all mean? MORE: Blog or code: http://www.viralml.com/video-content.html?fm=yt&v=85uGWYBDIZ8 Signup for my newsletter and more: http://www.viralml.com Connect on Twitter: https://twitter.com/amunategui Check out my book on Amazon The Little Book of Fundamental Market Indicators https://amzn.to/2DERG3d Articles: https://www.epi.org/news/shrinking-labor-force-explains-drop-unemployment/ https://www.cbo.gov/publication/53452 https://www.cbpp.org/gross-domestic-product-6 Transcript Wow, Were seeing the lowest Unemployment Numbers in 49 Years!! Heck, I dont even remember those days, I was too busy learning how to walk. so what does this mean? are we all busy working away happily? But theres also rumblings of a shrinking labor pool and anemic wage growth. - what does that mean? What Gives? Stong Demand in low paid jobs mixed with Baby boomers retiring? and job seekers giving up, more stay at home parent to raise families? Lets check those numbers for ourselves. All fascinating questions and we can speculate all day - but instead, lets roll up our sleeves, find reliable data - Ill show you where to get it (point with finger), and start charting. This is the Hippocratic Oath of the data analyst and data scientist. We want to keep things simple, transparent and reproducible. What I show you, you will be able to reproduce on your computer and make your own conclusion Welcome to the anohter ViralML show, I am your host, Manuel Amunategui. Rolling out a new look pretty soon. The Little Book of Fundamental Indicators where I share my favorite hands-on market analysis fundamental indicators Signup for my newsletter to get early access to my material. Subscribe to the channel - and give it a big thumbs up, pretty please! Plus I have an exciting announcement to make at the end of this video - so please watch. Center on Budget and Policy Priorities Recessions tend to push labor force participation down relative to its potential, an effect that lingers for several years even after the end, in CBOs judgment. The recovery of labor force participation following the 2007–2009 recession has been especially slow. https://www.cbo.gov/publication/53452 just one factor of the many: Since about 2000, the labor force participation of people without a college degree has declined, but the effect of that decline on the overall labor force participation rate is lessened because the share of the population without a college degree has decreased. Between the end of the recession and 2015, however, the rate fell by 2 percentage points, from 83 percent to 81 percent. Although the rate inched up slightly in both 2016 and 2017, it is likely to stay about the same between 2018 and 2027, CBO estimates. https://www.cbo.gov/publication/53452 CATEGORY:Finance HASCODE:ViralML-Hands-On-Unemployment-Labor-Pool-vs-SP500.html
Code
from IPython.display import Image
Image(filename='../viralml-book.png')
Unemployment, Labor Pool and the S&P500¶
Let's Compare overlay the Unemployment Rates on the S&P500 Let's continue exploring the stock market with Python. We've looked at the VIX, we've looked at the long and short-term bonds, Now let's take into the unemployment numbers.
You can find the unemployment rates directly from the Bureau of Labor Statistics: https://data.bls.gov/timeseries/lns14000000
Civilian Labor Force Participation Rate:
https://fred.stlouisfed.org/series/CIVPART
https://fred.stlouisfed.org/categories/12
And the S&P500 index (^GSPC): https://finance.yahoo.com/quote/%5EGSPC/
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
import io, base64, os, json, re
import pandas as pd
import numpy as np
import datetime
# get the SP500 (^GSPC) from Yahoo Finace
sp500_df = pd.read_csv('^GSPC.csv')
sp500_df['Date'] = pd.to_datetime(sp500_df['Date'])
sp500_df = sp500_df[['Date', 'Adj Close']]
sp500_df.columns = ['Date', 'SP500_close']
sp500_df['SP500_pct_change'] = sp500_df['SP500_close'].pct_change()
sp500_df.head()
# loading employment data
# https://data.bls.gov/timeseries/lns14000000
unemployment_df = pd.read_csv('labor-force-bureau-of-labor-statistics-full.csv',sep='\t')
unemployment_df.head()
def monthToNum(shortMonth):
return{'Jan' : 1,
'Feb' : 2,
'Mar' : 3,
'Apr' : 4,
'May' : 5,
'Jun' : 6,
'Jul' : 7,
'Aug' : 8,
'Sep' : 9,
'Oct' : 10,
'Nov' : 11,
'Dec' : 12
}[shortMonth]
monthToNum('Feb')
# stack the data together to have on row per month
unemployment_df = (unemployment_df.set_index(['Year'])
.stack().reset_index(name='Unemployment')
.rename(columns={'level_1':'Month' }))
unemployment_df['Month'] = [monthToNum(m) for m in unemployment_df['Month'].values ]
unemployment_df.tail()
# format the year and the month into an actual date
unemployment_df['Date'] = [str(y) + '-' + str(m) + '-' + '01' for y,m in zip(unemployment_df['Year'].values, unemployment_df['Month'].values)]
unemployment_df = unemployment_df[['Date','Unemployment']]
unemployment_df['Unemployment_pct_change'] = unemployment_df['Unemployment'].pct_change()
unemployment_df['Date'] = pd.to_datetime(unemployment_df['Date'])
unemployment_df.head()
fig, ax = plt.subplots(figsize=(16, 8))
plt.plot(unemployment_df['Date'], unemployment_df['Unemployment'], color='blue')
plt.legend()
plt.grid()
plt.title('Labor Force Statistics from the Current Population Survey and the S&P 500')
# add second axis
ax2 = ax.twinx()
plt.plot(sp500_df['Date'],
sp500_df['SP500_close'], color='green', label='SP500_close', linestyle= 'dotted')
ax2.legend(loc='lower right', frameon=False)
plt.show()
# cut off data for further analysis
cut_off_date = '1980-01-01'
unemployment_df = unemployment_df[unemployment_df['Date'] >= cut_off_date]
sp500_df = sp500_df[sp500_df['Date'] >= cut_off_date]
fig, ax = plt.subplots(figsize=(16, 8))
plt.plot(unemployment_df['Date'], unemployment_df['Unemployment'], color='blue')
plt.legend()
plt.grid()
plt.title('Labor Force Statistics from the Current Population Survey and the S&P 500')
# add second axis
ax2 = ax.twinx()
plt.plot(sp500_df['Date'],
sp500_df['SP500_close'], color='green', label='SP500_close', linestyle= 'dotted')
ax2.legend(loc='lower right', frameon=False)
plt.show()
unemployment_df['Diff'] = unemployment_df['Unemployment_pct_change']
unemployment_df['Diff'] = unemployment_df['Diff'].rolling(window=50).mean().values
fig, ax = plt.subplots(figsize=(16, 8))
plt.plot(unemployment_df['Date'],
unemployment_df['Diff'],
color='black', label='Unemployment_pct_change')
plt.axhline(0)
plt.title('Unemployment_pct_change vs SP500')
plt.legend()
plt.grid()
# background colors
unemployment_df['i'] = range(1,len(unemployment_df)+1)
# track whenever the percentage change is above or b
pos_1 = unemployment_df[unemployment_df['Diff'] >= 0]['i']
neg_1 = unemployment_df[unemployment_df['Diff'] < 0]['i']
for x in pos_1:
ax.axvline(unemployment_df[unemployment_df['i']==x]['Date'].values, color='blue',linewidth=1,alpha=0.3)
for x in neg_1:
ax.axvline(unemployment_df[unemployment_df['i']==x]['Date'].values, color='red',linewidth=1,alpha=0.3)
# add second axis
ax2 = ax.twinx()
plt.plot(sp500_df['Date'],
sp500_df['SP500_close'], color='green', label='SP500_close', linestyle= 'dotted')
ax2.legend(loc='lower right', frameon=False)
plt.show()
Comparing Unemployment VS Labor Force¶
# https://fred.stlouisfed.org/series/CIVPART
labor_df = pd.read_csv('CIVPART.csv')
labor_df.columns = ['Date', 'Labor_Participation']
labor_df['Date'] = pd.to_datetime(labor_df['Date'])
labor_df['Labor_Participation_pct_change'] = labor_df['Labor_Participation'].pct_change()
labor_df.head()
fig, ax = plt.subplots(figsize=(16, 8))
plt.plot(labor_df['Date'], labor_df['Labor_Participation'], color='blue')
plt.legend()
plt.grid()
plt.title('Labor Participation and the S&P 500')
# add second axis
ax2 = ax.twinx()
plt.plot(sp500_df['Date'],
sp500_df['SP500_close'], color='green', label='SP500_close', linestyle= 'dotted')
ax2.legend(loc='lower right', frameon=False)
plt.show()
All Together Now!¶
cut_off_date = '1980-01-01'
labor_df = labor_df[labor_df['Date'] >= cut_off_date]
fig, ax = plt.subplots(figsize=(16, 8))
plt.plot(labor_df['Date'], labor_df['Labor_Participation'], color='red',
label='Labor_Participation')
plt.legend()
plt.grid()
plt.title('Labor Participation 24-54 and the S&P 500')
# add second axis
ax2 = ax.twinx()
plt.plot(sp500_df['Date'],
sp500_df['SP500_close'], color='green', label='SP500_close', linestyle= 'dotted')
ax2.legend(loc='lower right', frameon=False)
# add third axis
ax3 = ax.twinx()
plt.plot(unemployment_df['Date'],
unemployment_df['Unemployment'], color='blue', label='unemployment')
ax3.legend(loc='upper left', frameon=False)
plt.show()
Show Notes
(pardon typos and formatting -these are the notes I use to make the videos)
Were seeing the lowest unemployment numbers in 49 years!! Were all seeing a shrinking labor pool - what does this all mean? MORE: Blog or code: http://www.viralml.com/video-content.html?fm=yt&v=85uGWYBDIZ8 Signup for my newsletter and more: http://www.viralml.com Connect on Twitter: https://twitter.com/amunategui Check out my book on Amazon The Little Book of Fundamental Market Indicators https://amzn.to/2DERG3d Articles: https://www.epi.org/news/shrinking-labor-force-explains-drop-unemployment/ https://www.cbo.gov/publication/53452 https://www.cbpp.org/gross-domestic-product-6 Transcript Wow, Were seeing the lowest Unemployment Numbers in 49 Years!! Heck, I dont even remember those days, I was too busy learning how to walk. so what does this mean? are we all busy working away happily? But theres also rumblings of a shrinking labor pool and anemic wage growth. - what does that mean? What Gives? Stong Demand in low paid jobs mixed with Baby boomers retiring? and job seekers giving up, more stay at home parent to raise families? Lets check those numbers for ourselves. All fascinating questions and we can speculate all day - but instead, lets roll up our sleeves, find reliable data - Ill show you where to get it (point with finger), and start charting. This is the Hippocratic Oath of the data analyst and data scientist. We want to keep things simple, transparent and reproducible. What I show you, you will be able to reproduce on your computer and make your own conclusion Welcome to the anohter ViralML show, I am your host, Manuel Amunategui. Rolling out a new look pretty soon. The Little Book of Fundamental Indicators where I share my favorite hands-on market analysis fundamental indicators Signup for my newsletter to get early access to my material. Subscribe to the channel - and give it a big thumbs up, pretty please! Plus I have an exciting announcement to make at the end of this video - so please watch. Center on Budget and Policy Priorities Recessions tend to push labor force participation down relative to its potential, an effect that lingers for several years even after the end, in CBOs judgment. The recovery of labor force participation following the 2007–2009 recession has been especially slow. https://www.cbo.gov/publication/53452 just one factor of the many: Since about 2000, the labor force participation of people without a college degree has declined, but the effect of that decline on the overall labor force participation rate is lessened because the share of the population without a college degree has decreased. Between the end of the recession and 2015, however, the rate fell by 2 percentage points, from 83 percent to 81 percent. Although the rate inched up slightly in both 2016 and 2017, it is likely to stay about the same between 2018 and 2027, CBO estimates. https://www.cbo.gov/publication/53452 CATEGORY:Finance HASCODE:ViralML-Hands-On-Unemployment-Labor-Pool-vs-SP500.html