%matplotlib inline
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import PortfolioAnalytics as PortfolioAnalytics
import PortfolioLoadData as PortfolioLoadData
import PortfolioRisk as PortfolioRisk
import PortfolioStatistics as PortfolioStatistics
ind49_rets = PortfolioLoadData.get_ind_returns(weighting="vw", n_inds=49)["1974":]
ind49_mcap = PortfolioLoadData.get_ind_market_caps(49, weights=True)["1974":]
Load the Fama-French Dataset for the returns of the Top and Bottom Deciles by MarketCap. We take a look at the period from 1926 until 1969 and then again from 1970 until 2018. We then calculate the peaks and the following drawdowns.
long1926 = PortfolioLoadData.get_ffme_returns()
long1926.head()
PortfolioRisk.drawdown(long1926[:"1969"]["LargeCap"])[["Wealth","Peaks"]].plot(figsize=(12,6))
plt.show()
PortfolioRisk.drawdown(long1926[:"1969"]["LargeCap"]).min()
When was the drawdown
PortfolioRisk.drawdown(long1926[:"1969"]["LargeCap"]).idxmin()
In the first period we have had three major recessions:
The Wall Street Crash of 1929 (Black Tuesday): The Wall Street Crash of 1929, also known as Black Tuesday or the Stock Market Crash of 1929, began in late October 1929 and was the most devastating stock market crash in the history of the United States, when taking into consideration the full extent and duration of its fallout. The crash signaled the beginning of the 10-year Great Depression that affected all Western industrialized countries.The Roaring Twenties, the decade that followed World War I and led to the Crash, was a time of wealth and excess. On March 25, 1929, however, a mini crash occurred after investors started to sell stocks at a rapid pace, exposing the market's shaky foundation. The American economy was now showing ominous signs of trouble.Steel production was declining, construction was sluggish, car sales were down, and consumers were building up high debts because of easy credit. On September 20, the London Stock Exchange (LSE) officially crashed when top British investor Clarence Hatry and many of his associates were jailed for fraud and forgery. The LSE's crash greatly weakened the optimism of American investment in markets overseas. In the days leading up to the crash, the market was severely unstable. Periods of selling and high volumes of trading were interspersed with brief periods of rising prices and recovery. Economist and author Jude Wanniski later correlated these swings with the prospects for passage of the Smoot–Hawley Tariff Act, which was then being debated in Congress.
On October 24 ("Black Thursday"), the market lost 11% of its value at the opening bell on very heavy trading. Several leading Wall Street bankers met to find a solution to the panic and chaos on the trading floor.The meeting included Thomas W. Lamont, acting head of Morgan Bank; Albert Wiggin, head of the Chase National Bank; and Charles E. Mitchell, president of the National City Bank of New York. They chose Richard Whitney, vice president of the Exchange, to act on their behalf. With the bankers' financial resources behind him, Whitney placed a bid to purchase a large block of shares in U.S. Steel at a price well above the current market. As traders watched, Whitney then placed similar bids on other "blue chip" stocks. This tactic was similar to one that ended the Panic of 1907. It succeeded in halting the slide. The Dow Jones Industrial Average recovered, closing with it down only 6.38 points for the day; however, unlike 1907, the respite was only temporary. Over the weekend, the events were covered by the newspapers across the United States. On October 28, "Black Monday", more investors decided to get out of the market, and the slide continued with a record loss in the Dow for the day of 38.33 points, or 13%. The next day, "Black Tuesday", October 29, 1929, about sixteen million shares were traded, and the Dow lost an additional 30 points, or 12%,amid rumors that U.S. President Herbert Hoover would not veto the pending Smoot–Hawley Tariff Act. The volume of stocks traded on October 29, 1929 was a record that was not broken for nearly 40 years. On October 29, William C. Durant joined with members of the Rockefeller family and other financial giants to buy large quantities of stocks in order to demonstrate to the public their confidence in the market, but their efforts failed to stop the large decline in prices. Due to the massive volume of stocks traded that day, the ticker did not stop running until about 7:45 p.m. that evening. The market had lost over USD 30 billion in the space of two days which included USD 14 billion on October 29 alone.
1937-38 Recession: The Recession of 1937–1938 was an economic downturn that occurred during the Great Depression in the United States. By the spring of 1937, production, profits, and wages had regained their 1929 levels. Unemployment remained high, but it was slightly lower than the 25% rate seen in 1933. The American economy took a sharp downturn in mid-1937, lasting for 13 months through most of 1938. Industrial production declined almost 30 percent and production of durable goods fell even faster.
Unemployment jumped from 14.3% in 1937 to 19.0% in 1938.Manufacturing output fell by 37% from the 1937 peak and was back to 1934 levels.Producers reduced their expenditures on durable goods, and inventories declined, but personal income was only 15% lower than it had been at the peak in 1937. In most sectors, hourly earnings continued to rise throughout the recession, which partly compensated for the reduction in the number of hours worked. As unemployment rose, consumers' expenditures declined, thereby leading to further cutbacks in production.[
The Kennedy Slide of 1962: The Kennedy Slide of 1962, also known as the Flash Crash of 1962, is the term given to the stock market decline from December 1961 to June 1962 during the Presidential term of John F. Kennedy. After the market experienced decades of growth since the Wall Street Crash of 1929, the stock market peaked during the end of 1961 and plummeted during the first half of 1962. During this period, the S&P 500 declined 22.5%, and the stock market did not experience a stable recovery until after the end of the Cuban missile crisis. The Dow Jones Industrial Average fell 5.7%, down 34.95, the second-largest point decline then on record.
PortfolioRisk.drawdown(long1926["1970":]["LargeCap"])[["Wealth","Peaks"]].plot(figsize=(12,6))
PortfolioRisk.drawdown(long1926["1970":]["LargeCap"]).min()
PortfolioRisk.drawdown(long1926["1970":]["LargeCap"]).idxmin()
In the second period we had a number of drawdowns where 2009 tuurned out to be the worst.
The 1973 Oil Crisis: The 1973 oil crisis started in October 1973 when the members of Organization of Arab Petroleum Exporting Countries or the OAPEC (consisting of the Arab members of OPEC, plus Egypt, Syria and Tunisia) proclaimed an oil embargo. By the end of the embargo in March 1974, the price of oil had risen from US$3 per barrel to nearly $12.OAPEC initiated the embargo in response to US involvement in the Yom Kippur War. Six days after Egypt and Syria launched the surprise military campaign against Israel to regain territories lost to Israel in the Six Day War, the United States chose to re-supply Israel with arms. OAPEC decided to retaliate, announcing an oil embargo against Canada, Japan, the Netherlands, the United Kingdom, and the United States.
The 1979 Energy Crisis: The 1979 (or second) oil crisis or oil shock occurred in the United States due to decreased oil output in the wake of the Iranian Revolution. Despite the fact that global oil supply decreased by only ~4%, widespread panic resulted, driving the price far higher than justified by supply. The price of crude oil rose to $39.50 per barrel over the next 12 months and long lines once again appeared at gas stations, as they had in the 1973 oil crisis.[2] As with the 1973 crisis, global politics and power balance was impacted. OPEC lost influence. In 1980, following the outbreak of the Iran–Iraq War, oil production in Iran nearly stopped, and Iraq's oil production was severely cut as well. After 1980, oil prices began a 20-year decline, eventually reaching a 60 percent fall-off during the 1990s. Oil exporters such as Mexico, Nigeria, and Venezuela expanded production; the USSR became the top world producer; and North Sea and Alaskan oil flooded the market. A 1980's US recession was triggered. Oil prices did not return to pre-crisis levels until the mid-80's.
1987 Black Monday Crash: In finance, Black Monday refers to Monday, October 19, 1987, when stock markets around the world crashed, shedding a huge value in a very short time. The crash began in Hong Kong and spread west to Europe, hitting the United States after other markets had already declined by a significant margin. The Dow Jones Industrial Average (DJIA) dropped by 508 points to 1738.74 (22.61%). A popular explanation for the 1987 crash was selling by program traders, most notably as a reaction to the computerized selling required by portfolio insurance hedges. However, economist Dean Furbush points out that the biggest price drops occurred when trading volume was light.
The dot-com Bubble: The dot-com bubble (also referred to as the dot-com boom, the Internet bubble and the information technology bubble) was a historic speculative bubble covering roughly 1997–2000 (with a climax on March 10, 2000, with the NASDAQ peaking at 5,408.60 in intraday trading before closing at 5,048.62) during which stock markets in industrialized nations saw their equity value rise rapidly from growth in the Internet sector and related fields. While the latter part was a boom and bust cycle, the Internet boom is sometimes meant to refer to the steady commercial growth of the Internet with the advent of the World Wide Web, as exemplified by the first release of the Mosaic web browser in 1993, and continuing through the 1990s. The period was marked by the founding (and, in many cases, spectacular failure) of a group of new Internet-based companies commonly referred to as dot-coms. Companies could cause their stock prices to increase by simply adding an "e-" prefix to their name or a ".com" to the end, which one author called "prefix investing." A combination of rapidly increasing stock prices, market confidence that the companies would turn future profits, individual speculation in stocks, and widely available venture capital created an environment in which many investors were willing to overlook traditional metrics, such as P/E ratio, in favor of basing confidence on technological advancements. The collapse of the bubble took place during 1999–2001. Some companies, such as Pets.com, failed completely. Others lost a large portion of their market capitalization but remained stable and profitable, e.g., Cisco, whose stock declined by 86%. Some later recovered and surpassed their dot-com-bubble peaks, e.g., Amazon.com, whose stock went from 107 to 7 dollars per share, but a decade later exceeded 400
2007 L/S Quantmare: During the week of August 6th 2007, a number of high-profile (including Highbridge , Renaissance and Goldman Sachs) quantitative long/short hedge funds experienced unprecedented losses. Based on empirical evidence and simulated style returns the losses were initiated by rapid unwinding of highly geared, multi asset positions in currency and especially equity where L/S exposures turned out to be extremely crowded in a few style bets such as value, momentum, reversal and quality. The losses evolved into a fire-sale during the first week, but were reverted in the following week. The main causes of the “quant-mare” was: 1) Extremely high leverage 2) betting on the same styles and 3) Similar optimization methods favouring systematic risk reduction rather than systemic event driven risk reduction.
2008 Global Financial Crisis: The financial crisis of 2007–2008, also known as the global financial crisis and the 2008 financial crisis, was a severe worldwide economic crisis considered by many economists to have been the most serious financial crisis since the Great Depression of the 1930s, to which it is often compared.
It began in 2007 with a crisis in the subprime mortgage market in the United States, and developed into a full-blown international banking crisis with the collapse of the investment bank Lehman Brothers on September 15, 2008. Excessive risk-taking by banks such as Lehman Brothers helped to magnify the financial impact globally. Massive bail-outs of financial institutions and other palliative monetary and fiscal policies were employed to prevent a possible collapse of the world financial system. The crisis was nonetheless followed by a global economic downturn, the Great Recession. The Asian markets (China, Hong Kong, Japan, India, etc.) immediately impacted and volatilized after the U.S. sub-prime crisis. The European debt crisis, a crisis in the banking system of the European countries using the euro, followed later.
In 2010, the Dodd–Frank Wall Street Reform and Consumer Protection Act was enacted in the US following the crisis to "promote the financial stability of the United States". The Basel III capital and liquidity standards were adopted by countries around the world.