Summarizing the performance of the stocks

We'll get a quick summary of the performance of the stocks over the past 18 years by executing the following code:

summary_by_year = df.groupby('Year')['1st Day % Chg'].describe() 
 
summary_by_year 

The preceding code generates the following output:

From the table, we can see the extraordinary average return of the IPO market in 2000. At over 35%, it is more than double any other year on the list. Also notable is the fact that every year has had a positive average return for first-day performance.

Let's plot first-day performance to get a better feel for it:

fig, ax = plt.subplots(figsize=(16,8)) 
summary_by_year['mean'].plot(kind='bar', ax=ax) 
ax.set_title('Mean First Day Percentage Change by Year', fontdict={'size': 18}, y=1.02); 

The preceding code generates the following output:

The important point about these numbers is that they are not the first-day performance that the general investing public could expect to receive on that first-day. Only investors who got in on the offering could expect to see these numbers.

The first-day return that the general public could expect to receive would be the difference between the opening price and the closing price. This is entirely different, and much less lucrative. Let's now add a column of data to reflect that value and see the results:

df['1st Day Open to Close % Chg'] = ((df['1st Day Close'] - df['Opening Price'])/df['Opening Price']) 
 
df['1st Day Open to Close % Chg'].describe() 

The preceding code generates the following output:

This shows returns that are markedly less exciting. Let's now plot them as before:

fig, ax = plt.subplots(figsize=(16,8)) 
df.groupby('Year')['1st Day Open to Close % Chg'].mean().plot(kind='bar', ax=ax) 
ax.set_title('Mean First Day Open to Close % Change by Year', fontdict={'size': 18}, y=1.02); 

The preceding code generates the following output:

Comparing the preceding chart to the earlier one, it is clear that annual average returns on the first day are displayed in the range of their order of magnitude which is lower in many cases.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.185.87