The January Effect In The S&P 500 (Amibroker And Tradestation Code)

The strategy in plain English:

  • Buy at the open in January.
  • Sell at the open in February.

(If the S&P 500 decline in January, the average percentage change for the next eleven months is 2.25%. If the S&P 500 rises during January, the average percentage change in the next 11 months is 10.4%.)

 

Click here to see the original article.

 

Amibroker code:

 

Buy= Month()==1 ;
buyPrice=Open;
Sell= Month()==2;
sellPrice=Open ;

 

 

Tradestation code:

 

//First set your interval to Monthly bars
If month(date) = 12 then buy next bar at open;
If month(date) = 1 then sell next bar at open;

 

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.