Retail Stocks – Different Seasonalities (Amibroker Code)
The strategy in plain English:
We present a strategy that holds two different mutual funds from Fidelity. The strategy is based on seasonality.
We hold:
FDFAX from May 1st through October 31st
FSRPX from November 1st through April 30th
Click here for the original article.
Amibroker code:
Here is the Amibroker code if we have many different stocks in the database. The code only test the tickers we want to test, we make an if function:
setOption(“MaxOpenPositions”,2);
SetPositionSize(49.75,spsPercentOfEquity);
if( Name() == “FDFAX” )
{
Buy= Month()==5 ;
BuyPrice=Ref(C,-1);
Sell= Month()==11;
SellPrice=Ref(C,-1);
}
if( Name() == “FSRPX” )
{
Buy= Month()==11;
BuyPrice=Ref(C,-1);
Sell= Month()==5;
SellPrice=Ref(C,-1);
}
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.
