The Holiday Effect: President’s Day/George Washington Day (Amibroker And Tradestation Code)

The strategy in plain English:

  1. We go long at the close on the first calendar day of the month that is bigger than 11.
  2. We exit at the calendar day 21 or more.

Click here for the original article.

Amibroker code:

Buy= day()>11 AND Day()<21 AND Month()==2;

buyPrice=Close;

Sell= Day()>=21 ;

sellPrice=Close ;

Tradestation code:

{
The Holiday Effect: President's Day/George Washington Day (strategy 10)
https://www.quantifiedstrategies.com/trading-the-holiday-effect-anomaly-in-stock-markets/
We go long at the close on the first calendar day of the month that is bigger than 11. 
We exit at the calendar day 21 or more.
}

if (Dayofmonth(Date)>11) and (Dayofmonth(Date)<21) and (Month(Date)=2) Then
	Buy this bar on close;
	
if (Dayofmonth(Date)>=21) Then
	Sell this bar on close;

Disclosure: We are not financial advisors. Please do your own due diligence and investment research or consult a financial professional. All articles are our opinions – they are not suggestions to buy or sell any securities.