PureBytes Links
Trading Reference Links
|
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 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 and paste two formulae below.
===========================
Seasonal Profit % - May-Oct
===========================
---8<------------------------------------------
{ Seasonal Buy & Hold.
Long: May to Oct.
System Profit Long % - fixed trade size - v2.2
Basic code - Entry/Exit on Close of signal.
©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 period }
trade:=((Month()>=start)-(Month()<=end))<>0;
trade:=If(start>end,trade,1-trade);
{ Entry Long }
entry:=trade;
{ Exit Long }
exit:=trade=0;
{ Trade Binary & clean Entry/Exit signals }
init:=Cum(IsDefined(entry+exit))=1;
flag:=ValueWhen(1,entry-exit<>0 OR init,entry);
entry:=flag*(Alert(flag=0,2)
OR entry*Cum(entry)=1);
exit:=(flag=0)*(Alert(flag,2)
OR exit*Cum(exit)=1);
{ Profit % curve }
EntryVal:=ValueWhen(1,entry,C*(1+cost));
Profit:=C*(1-cost)/EntryVal-1;
ProfitPer:=(flag*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.
Long: November to April.
System Profit Long % - fixed trade size - v2.2
Basic code - Entry/Exit on Close of signal.
©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 period }
trade:=((Month()>=start)-(Month()<=end))<>0;
trade:=If(start>end,trade,1-trade);
{ Entry Long }
entry:=trade;
{ Exit Long }
exit:=trade=0;
{ Trade Binary & clean Entry/Exit signals }
init:=Cum(IsDefined(entry+exit))=1;
flag:=ValueWhen(1,entry-exit<>0 OR init,entry);
entry:=flag*(Alert(flag=0,2)
OR entry*Cum(entry)=1);
exit:=(flag=0)*(Alert(flag,2)
OR exit*Cum(exit)=1);
{ Profit % curve }
EntryVal:=ValueWhen(1,entry,C*(1+cost));
Profit:=C*(1-cost)/EntryVal-1;
ProfitPer:=(flag*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<---------------------------
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<-------------------
jose '-)
http://www.metastocktools.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|