Seasonality and the stock markets ================================= It is often stated that there is a historical period of seasonal weakness in US equities between May and October for each calendar year. Could this seasonal bias be the result of just a few past yearly anomalies? Is it relevant to the NASDAQ, or just the Dow and S&P 500 indices? Is it relevant to any other markets? Does this bias exist at the security level, or is it present on just some major securities and indices? All these questions and more can be answered with the two MetaStock profit % indicators and exploration below. Plot both seasonal profit indicators in the same window below your price chart, and compare their profit curves. Run the seasonal profit exploration on your universe of stocks, and sort columns according to exploration note instructions to determine median profit for each seasonal period. MetaStock -> Tools -> Indicator Builder -> New -> copy & paste two formulae below. =========================== Seasonal Profit % - May-Oct =========================== ---8<------------------------------------------ { Seasonal Buy & Hold - v3.0 Profit % Long: May to October. Buys on the Open of period's first trading day, Sells on the Close of period's last trading day. Fixed trade size. ©Copyright 2005~2006 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. All code remains the property of Jose Silva. http://www.metastocktools.com } { User inputs } start:=Input("Start trading at start of Nth month [1-12]",1,12,5); end:=Input("End trading at end of Nth month [1-12]",1,12,10); cost:=Input("Total Transaction costs (Brokerage + Slippage) %:",0,100,.2)/200; plot:=Input("plot: [1]%Profit curve, [2]Trade signals",1,2,1); { Trade (Long) monthly period } trade:=((Month()>=start)-(Month()<=end))<>0; trade:=If(start>end,trade,1-trade); { Start of trade period signal } entry:=trade AND Alert(trade=0,2) OR Cum(trade)=1; { End of trade period signal } tradeX:=trade-(Cum(1)=1); BH:=LastValue(Cum(trade=0))<2; exit:=Zig(If(BH,Frac(Cum(1)/2)=0,tradeX),1,$)=1; exit:=If(BH,Cum(1)=LastValue(Cum(1)),exit); tradeX:=trade-exit; { Profit % curve } EntryVal:=ValueWhen(1,entry,O*(1+cost)); Profit:=C*(1-cost)/EntryVal-1; ProfitPer:=(tradeX*Profit+Cum(exit*Profit))*100; { Plot in own window below chart } If(plot=1,ProfitPer,entry-exit) ---8<------------------------------------------ ============================= Seasonal Profit % - Nov-April ============================= ---8<------------------------------------------ { Seasonal Buy & Hold - v3.0 Profit % Long: November to April. Buys on the Open of period's first trading day, Sells on the Close of period's last trading day. Fixed trade size. ©Copyright 2005~2006 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. All code remains the property of Jose Silva. http://www.metastocktools.com } { User inputs } start:=Input("Start trading at start of Nth month [1-12]",1,12,11); end:=Input("End trading at end of Nth month [1-12]",1,12,4); cost:=Input("Total Transaction costs (Brokerage + Slippage) %:",0,100,.2)/200; plot:=Input("plot: [1]%Profit curve, [2]Trade signals",1,2,1); { Trade (Long) monthly period } trade:=((Month()>=start)-(Month()<=end))<>0; trade:=If(start>end,trade,1-trade); { Start of trade period signal } entry:=trade AND Alert(trade=0,2) OR Cum(trade)=1; { End of trade period signal } tradeX:=trade-(Cum(1)=1); BH:=LastValue(Cum(trade=0))<2; exit:=Zig(If(BH,Frac(Cum(1)/2)=0,tradeX),1,$)=1; exit:=If(BH,Cum(1)=LastValue(Cum(1)),exit); tradeX:=trade-exit; { Profit % curve } EntryVal:=ValueWhen(1,entry,O*(1+cost)); Profit:=C*(1-cost)/EntryVal-1; ProfitPer:=(tradeX*Profit+Cum(exit*Profit))*100; { Plot in own window below chart } If(plot=1,ProfitPer,entry-exit) ---8<------------------------------------------ MetaStock -> Tools -> The Explorer -> New -> Copy and paste formula below. =============== Seasonal profit =============== ---8<--------------------------- Notes: ----- 1) Click on columns A or B profit % headers to rank results by profitability; 2) Select the middle profit % result, so that clicking again on the column header (and reversing the profitability order) does not change the position of the selected result. Exploration references default values in following two indicators: "Seasonal Profit % - May-Oct" "Seasonal Profit % - Nov-April" ©Copyright 2004~2006 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. All code remains the property of Jose Silva. http://www.metastocktools.com ------------------ ------------------ Column A: May-Oct { May-October seasonal profit % } Fml("Seasonal Profit % - May-Oct") ------------------ ------------------ Column B: Nov-Apr { November-April seasonal profit % } Fml("Seasonal Profit % - Nov-April") ------------------ ------------------ Filter: colA<>0 OR colB<>0 ---8<--------------------------- Question: -------- "I've plotted a third copy of the seasonal profit % indicator with settings to buy January (1) & sell December (12), resulting in a continuous Buy & Hold profit % plot. The May-Oct and Nov-April indicators combined cover each complete trading year, which should result in a combined profit total identical to Buy & Hold's. The combined May-Oct and Nov-April profits don't add up to the same profit % from Buy & Hold. Why is this?" There are two reasons for this: 1) Buying and selling twice a year results in two additional set of transaction costs for each year, as opposed to only one total set of transaction costs for Buy & Hold. 2) The profit % indicators buy on the Open and sell on the Close of the designated trading period. The first of the two seasonal profit indicators above buys on the Open of the first trading day in May, and sells on the Close of the last trading day in October. There is a trading gap between the Close of the last trading day in October and the Open of the first trading day in November, when the next indicator kicks in. This overnight gap accounts for a large part of the discrepancy between the two complementary indicators and Buy & Hold. Note for owners of the MACDH Divergence & URSC kits --------------------------------------------------- http://www.metastocktools.com/MACDH/MACDHdiverg.htm http://www.metastocktools.com/URSC/URSC.htm To adapt your risk-normalized and annualized profit indicators: 1) Copy "... Profit Long %" & "... Profit Long pa%" indicators. 2) In the "... Profit Long %" indicator, Change the original code: ---8<------------------- ... {* Entry Long *} x:=...; entry:=x=1; {* Exit Long *} exit:=x=-1; {* Variable Trade Size % formula *} VarSize:=... ---8<------------------- To new code: ---8<------------------- ... {Trade period} start:=11;{start} VarSize:=4;{end} exit:=((Month()>=start)-(Month()<=VarSize))<>0; exit:=If(start>VarSize,exit,1-exit); {Entry/Exit} entry:=exit; exit:=exit=0; {Var Size % formula} VarSize:=0; ... ---8<------------------- 16.5 years (2/Jan/1990 - 9/June/2006) of further testing individual month's seasonality in the Dow index, yields the following total profit results: January: +6.9% February: +11.6% March: +9.2% April: +32.0% May: +25.1% June: -13.4% July: +10.2% August: -29.5% September: -32.2% October: +29.7% November: +38.4% December: +29.9% As a result, trading Dow stocks (or its index) between June and September results in a loss of 52% over the last 16.5 years. Trading the same securities only between October and May over the same period, results in an accumulated net profit of 207%, (12.5%pa), with a correspondingly smoother profit curve (i.e., less risk). Anyone for holidays until 1st October? :) jose '-) http://www.metastocktools.com