Technical Analysis of the S&P500

download Technical Analysis of the S&P500

of 13

Transcript of Technical Analysis of the S&P500

  • 8/4/2019 Technical Analysis of the S&P500

    1/13

    TECHNICAL ANALYSIS APPLIED TO

    THE S&P500 INDEX

    By A. Balasch

    Investigation of Past Performance of the S&P 500 and a

    Technical Analysis Algorithm*

    * Technical Analysis Algorithm written by A. Balasch

  • 8/4/2019 Technical Analysis of the S&P500

    2/13

    TECHNICAL ANALYSIS APPLIED TO THE S&P500

    INDEX

    Table of Contents

    Historic Performance of the S&P500 Index........................................................................ 1Historic Performance of the S&P500 Index with a 5 year Investment

    Horizon.......................................................................................................................................... 3Technical Analysis Performed on the S&P 500 Index...................................................... 4

    One Year Performance Case Study .................................................................. 4Thirty Year Performance ...................................................................................... 5

    Performance over a 5 year Investment Horizon................................................................ 7Yearly Performance of the Market vs. Technical Analysis........................................... 10Technical Analysis Summary............................................................................................... 11

    Table of Figures

    Figure 1: Yearly returns of the S&P 500 Index for from 1950 to 2010 ....................................2

    Figure 2: Output of technical analysis algorithm from February 9, 2009 to

    March 23, 2011. ............................................................................................................4

    Figure 3: Market and Technical Analysis performance for 5 year investment

    horizons since 1950. .....................................................................................................8

    Figure 4: Market and Technical Analysis yearly returns ........................................................10

    List of Tables

    Table 1: Summary of yearly performance of the S&P500 index for 61 years

    from January 1st, 1950 to December 31

    st, 2010 ........................................................... 1

    Table 2: Annual returns for twelve 5-year investment horizons since 1950 ........................... 3

    Table 3: Performance of Technical Analysis Algorithm from Feb 9 2009 to

    March 23, 2011. .............................................................................................................. 5

    Table 4: Performance of Technical Analysis Algorithm from January 2, 1981

    to March 23, 2011........................................................................................................... 6Table 5: Market and Technical Analysis performance for 5 year investment

    horizons since 1950 ........................................................................................................ 8

    Table 6: Three bear markets over the last thirty years were the market

    return was negative........................................................................................................ 9

    Table 7: Comparison of yearly returns realized by the market and technical

    analysis for 61 years from 1950 to 2010. .................................................................... 10

  • 8/4/2019 Technical Analysis of the S&P500

    3/13

    Page 1

    Historic Performance of the S&P500 Index

    Before the technical analysis portion of this study, this study will begin by looking at how the

    S&P500 index has performed since 1950.

    Historical data for the S&P 500 index was downloaded from www.finance.yahoo.com. The

    Yahoo finance website allows one to download and export historical data in Excel spreadsheet

    comma delimited format. January 1st, 1950 is the earliest date for which the data is available. The

    downloaded data includes daily closing prices from January 1st, 1950 to March 23 2011, which is

    when the data was downloaded.

    The daily closing data from the downloaded file is first read into a database where it is used as

    input into a computer program that generates a series of buy and sell signals based on a technical

    analysis algorithm. The buy and sell signals are determined based on moving averages and uses a

    technical analysis algorithm similar to the moving average convergence-divergence technique.

    Yearly returns from the 1950 through to the end of 2010 were calculated and the results are

    summarized in the table below.

    Annualized

    Yearly

    Return

    Average of

    Yearly

    Returns

    Median

    Yearly

    Return

    33%ile

    Yearly

    Return

    66%ile

    Yearly

    Return

    Number of

    years with

    positive

    returns

    % age of

    years with

    positive

    returns

    7.37% 8.74% 9.44% 2.94% 17.66% 44 of 61 72%

    Table 1: Summary of yearly performance of the S&P500 index for 61 years from

    January 1st, 1950 to December 31

    st, 2010

    The annualized rate of return is that rate of return which if every year since 1950 realized this

    rate of return, and compounded annually, would result in the total gain of the index from 1950

    through to the end of 2010. From 1950 to the end of 2010, the S&P500 realized a total gain of

    7534%. If every year from 1950 to 2010 realized a yearly rate of return of 7.36% and

  • 8/4/2019 Technical Analysis of the S&P500

    4/13

    Page 2

    compounded annually, after 61 years one would end up with the same total gain of 7534%

    (ignoring rounding errors).

    The Median rate of return means there is a 50% chance of the yearly return being higher than this

    number and a 50% chance of the yearly return being lower than this number. There are 30 years

    that achieved a rate of return above the median rate and, because 61 is an odd number, 31 years

    achieved a rate of return below the median rate. The 33rd

    percentile is the rate for which 33%

    (one third) of the years had a return less than this number. Likewise, 66% (two thirds) of the

    years gave a rate of return less than the 66th

    percentile; which is equivalent to saying that one

    third gave a rate of return greater than this number. When all 61 years are analyzed, 20 out of 61

    years realized a rate of return less than 2.94% and 21 out of 61 years realized a rate of return

    above 17.66%.

    Figure 1 below the next page graphically shows the rate of return that was realized for all 61

    years from 1950-2011.

    Figure 1: Yearly returns of the S&P 500 Index for from 1950 to 2010

    The average rate of return can easily be misleading if one does not fully realize that this is the

    average for all 61 years; the actual return realized for any given year can be very different from

    the average. For example, if an investor entered the market at the start 2000 with the intention of

    keeping his or her money in the market for a ten year investment horizon to the end of 2009 and

    operated under the assumption that that he or she should be able to reasonably expect a rate of

    return in the vicinity of the average (8.7% +/- 3% = 5.7-11.7%),. such an investor would be very

    disappointed. Six of the ten years from the start 0f 2000 through to the end of 2009 were

  • 8/4/2019 Technical Analysis of the S&P500

    5/13

    Page 3

    significantly lower the average (significantly lower is taken to mean 3% below the average) and

    the average rate of return over the ten year period from 2000 to the end of 2009 period was

    slightly below zero percent (-0.74%). If the investor had the foresight to get out of the market at

    the end of 2007 before the 2008 market crash, the average rate of return for the eight years from

    2000 through to the end of 2007 still would have been only 0.83%.

    Historic Performance of the S&P500 Index with a 5 year Investment Horizon

    Table 2 investigates the performance of the S&P500 for 5 year investment periods since 1950.

    For example, if one were to invest on January 1st, 1950 and exit the market on December 31st,

    1955 the total gain realized would have been 120.6% which is equivalent to an annualized rate of

    return of 17.14% when compounded annually

    Table 2: Annual returns for twelve 5-year investment horizons since 1950

    Again, if an investor entered the market with an assumption that one can reasonably expect a rate

    of return near the average (say 5.5-9.5%), 5 of 12 (42%) of the 5 year investment horizons in

    Table 2 did not meet the minimum 5.5% that was expected.

    Investment

    Period

    Total

    Return

    Annualized

    Rate of

    Return

    Best Yearly

    Return

    Worst Yearly

    Return

    Number of

    years with

    positive returns

    % age of yea

    with positiv

    returns

    2005-2010 -5.7% -1.18% +21.6% -35.6% 4 of 5 80%

    2000-2005 -17.4% -3.75% +21.9% -21.3% 2 of 5 40%

    1995-2000 217.0% 25.95% +35.2% +18.4% 5 of 5 100%

    1990-1995 27.6% 5.00% +27.8% -9.2% 3 of 5 60%

    1985-1990 117.5% 16.81% +30.6% +3.5% 5 of 5 100%

    1980-1985 56.4% 9.35% +28.9% -10.0% 4 of 5 80%

    1975-1980 50.6% 8.53% +29.4% -12.3% 4 of 5 80%

    1970-1975 -24.4% -5.46% +17.1% -28.1% 2 of 5 40%

    1965-1970 12.8% 2.00% +19.6% -12.8% 3 of 5 60%

    1960-1965 40.6% 7.05% +23.3% -11.7% 3 of 5 60%

    1955-1960 63.0% 10.27% +37.5% -12.7% 4 of 5 80%

    1950-1955 120.6% 17.14% +6.0% +47.3% 4 of 5 80%

    AVERAGE 7.64%

  • 8/4/2019 Technical Analysis of the S&P500

    6/13

    Page 4

    Technical Analysis Performed on the S&P 500 Index

    One Year Performance Case Study

    February 9, 2009 to March 23, 2001

    A technical analysis software application was developed that makes use of moving averages and

    uses an algorithm not unlike the moving average convergence-divergence technique to generate

    buy and sell signals. Figure 2 below shows a small example of the output of the technical

    analysis algorithm. The start date for this example is February 9, 2009 and the end date for the

    example is March 23, 2011. In Figure 2, the interval between the vertical divisions is 20 trading

    days, which ignoring statutory holidays, 20 trading days is equivalent to four weeks.

    Figure 2: Output of technical analysis algorithm from February 9, 2009 to March 23, 2011.

    In Figure 2, there are nine buy-sell cycles. Four of the buy-sell cycles are annotated on the figure.

    All nine buy-sell cycles are tabulated on the next page.

  • 8/4/2019 Technical Analysis of the S&P500

    7/13

    Page 5

    Table 3 below tabulates the buy and sell dates along with the realized return for all nine buy-sell

    cycles during the Feb. 9, 2009 to March23, 2011 period.

    Buy Sell

    Return from Technical

    Analysis

    March 25, 2009 May 18, 2009 +11.7%

    July 16, 2009 August 17, 2009 +4.1%

    August 25, 2009 September 3, 2009 -2.4%

    September 11, 2009 September 29, 2009 +1.7%

    October 12, 2009 October 27, 2009 -1.1%

    November 10, 2009 November 27, 2009 -0.1%

    February 18, 2010 April 30, 2010 +7.2%

    September 3, 2010 November 17, 2010 +6.7%

    December 3, 2010 February 25, 2011 +7.8%

    Table 3: Performance of Technical Analysis Algorithm from Feb 9 2009 to March 23, 2011.

    For this small example, 6 out of 9 (67%) buy-sell cycles gave positive returns. The average

    return was 4.0%. The total return of the S&P500 index in Figure 2 was 49.2% while the total

    return realized by using the technical analysis algorithm was 40.6%

    Total market return for February 9, 2009 to March 23, 2011: 49.2%

    Annualized return: 20.8%

    Return using technical analysis for February 9, 2009 to March 23, 2011: 40.6%

    Annualized return: 18.6%

    Thirty Year Performance

    January 2, 1981 to March 23, 2001

    The following table compares the results of the technical analysis algorithm to market results

    over the past thirty years since 1981. Several different investment horizons were chosen that

  • 8/4/2019 Technical Analysis of the S&P500

    8/13

    Page 6

    generally corresponded with significant events or breaks in the market. For each investment

    horizon, the market return and the return that would have been realized form the technical

    analysis algorithm is calculated.

    Table 4: Performance of Technical Analysis Algorithm from January 2, 1981 to March 23, 2011.

    As can be seen from Table 4, the average annualized return realized from the technical analysis

    algorithm was 10.8% compared to an average market return of 16.1%; the average market return

    was one and a half times the technical analysis return. However, the standard deviation of the

    returns, which is commonly used as a measure of risk, is 17.5% for the market returns compared

    to 7.0% for the technical analysis returns. From the standard deviations, it is reasonable to say

  • 8/4/2019 Technical Analysis of the S&P500

    9/13

    Page 7

    that the market is 2.5 times (17.5/7.0) more risky than the technical analysis algorithm. This is an

    illustration of the trade off between the technical analysis algorithm versus the market return;

    that is the market may realize a greater return, but the greater return is achieved at the expense of

    a greater risk. Also note that out of the 16 investment horizons in Table 4, technical analysis beat

    the market in six of these;

    the 1981-1982 downtrend (2.6% versus -13.8%)

    the July 1983 to September 1985 period. (5.2% versus 3.7%)

    the July 1985 to December 1987 period that included the October 1987 crash. (18.3% versus

    15.8%)

    the December 1987 to March 1991 period that included the 1990-91 market correction.

    (13.9% versus 12.5%)

    the 1998 to 2003 period that included the dot com crash and subsequent downtrend. (2.3%

    versus -4.2%)

    the 2003 to March 2009 period that included the late 2008 crash and subsequent downtrend.

    (5.1% versus -2.8%)

    Performance over a 5 year Investment Horizon

    Table 5 on the next page tabulates and compares the annualized rate of return achieved by the

    market and by technical analysis for five year investment horizons since 1950. Along with the

    tabulation of the results, Figure 3 graphically illustrates the performance of a market buy and

    hold strategy compared to the performance of the technical analysis strategy.

  • 8/4/2019 Technical Analysis of the S&P500

    10/13

    Page 8

    Annualized Rate of ReturnInvestment Period

    Market Technical Analysis

    2005-2010 -1.18% 6.13%

    2000-2005 -3.75% 17.10%

    1995-2000 25.95% 9.40%

    1990-1995 5.00% 7.00%

    1985-1990 16.81% 14.40%

    1980-1985 9.35% 9.00%

    1975-1980 8.53% 7.40%

    1970-1975 -5.46% 8.70%

    1965-1970 2.00% 5.80%

    1960-1965 7.05% 6.90%

    1955-1960 10.27% 9.00%

    1950-1955 17.14% 12.30%

    AVERAGE 7.64% 9.43%

    MEDIAN RATE 7.79% 8.85%

    STANDARD DEVIATION 9.24% 3.48%

    Table 5: Market and Technical Analysis performance for 5 year

    investment horizons since 1950

    Figure 3: Market and Technical Analysis performance for 5 year investment horizons since 1950.

  • 8/4/2019 Technical Analysis of the S&P500

    11/13

    Page 9

    In Table 4, which examined the performance of both the market returns and the technical

    analysis returns over the thirty years from 1981 to 2011, both the average and expected return for

    the technical analysis algorithm was less than the return achieved by the market. In table 5

    however, the technical analysis algorithm outperforms the market by roughly 2% for the average

    rate and 1% for expected rate. This suggests that for longer term investment horizons, the

    technical analysis algorithm does have a record of outperforming a market buy and hold strategy.

    Table 5 also agrees with what was said pertaining to Table 4 about risk; that if the standard

    deviation is used as a measure of risk, then the market buy and hold strategy is roughly 2.5 times

    more risky than the technical analysis results. (9.24% divided by 3.48% ~ 2.5)

    Also from table 4 which looked at the performance of the two investment strategies over 30years, there were three periods were the market was in a bear market and the annualized rate of

    return from the market buy and hold strategy was negative;

    Table 6: Three bear markets over the last thirty years were the market return was

    negative

    In all three of these cases, the annual rate of return realized from the technical analysis algorithm

    was positive. This suggests that the technical analysis algorithm can outperform a market buy

    and hold strategy during bear markets but the market buy and hold strategy generally

    outperforms the technical analysis algorithm during bull markets. This can be used to explain

    why the average and median rates for the technical analysis algorithm marginally outperformed

    the market buy and hold strategy in Table 5; that most, if not all, of the 5 year investment

    horizons in Table 5 contained at least one extended (~1year) bear market or several smaller

    (~1-3 months) bear markets.

  • 8/4/2019 Technical Analysis of the S&P500

    12/13

    Page 10

    Yearly Performance of the Market vs. Technical Analysis

    Table 7 summarizes the results when the yearly performance of the market and the yearly

    performance realized by technical analysis for the 61 years since 1950 are compared.

    Market Technical Analysis

    Average

    of Yearly

    Returns

    Median

    Yearly

    Return

    Number of

    years with

    positive

    returns

    Standard

    Deviation

    (Risk)

    Average

    of Yearly

    Returns

    Median

    Yearly

    Return

    Number of

    years with

    positive

    returns

    Standard

    Deviation

    (Risk)

    8.64% 9.44% 44 of 61 16.89% 9.37% 8.83% 55 of 61 8.21%

    Table 7: Comparison of yearly returns realized by the market and technical analysis for

    61 years from 1950 to 2010.

    Figure 4 graphically compares the performance of a market buy and hold strategy c to theperformance of the technical analysis strategy.

    Figure 4: Market and Technical Analysis yearly returns

    The average and the median rate for both the market and technical analysis are all in the 8-9%range. According to the standard deviation, the market is approximately twice as risky as the

    technical analysis algorithm. From what was said earlier in this study regarding the risk of the

    buy and hold strategy compared to the risk of the technical analysis strategy, it can be concluded

    that the market buy and hold strategy is roughly 2-2.5 times more risky than the technicalanalysis strategy.

  • 8/4/2019 Technical Analysis of the S&P500

    13/13

    Page 11

    Technical Analysis Summary

    There were 221 buy-sell cycles from January 1st, 1950 to March 23, 2001 for the S&P500 index.

    Out of the 221 buy-sell cycles, 173(78%) yielded a positive return. The average return for all 221

    buy-sell cycles was 2.42%. The median rate was slightly lower at 1.81%. Despite the average

    rate of return for an individual buy-sell cycle being only 2.42%, if there are 3 buy-sell cycles peryear, the compounded return comes to more respectable return of 7.44%

    There is actually an average of 3.6 buy-sell cycles per year (221 buy-sell cycles/61 years)

    although there can be no buy-sell cycles for extended periods of time; for example there were no

    buy-sell cycles during the period from April 2008 to late March 2009 as well as from November2005 to August 2006.