Wednesday, March 26, 2014

Testing Seasonality in MetaStock

Does Target stock go up during holiday months?

Do Wheat prices go up during the summer?

Does the price of Oil rise during the winter? 

Are these trade opportunities?

In my travels, I've met lots of traders who are interested in trading based on seasonality.  MetaStock's system tester can be easily modified to test a security to find if there are profitable seasonable patterns. 
In this post, I'll show you how to create a seasonality test easily in Metastock.

In MetaStock, from the Power Console click on System test and then New:

On the General tab you will put in a name for the System Test.  In this example I named it Seasonality - Longs.

Once we've finished up the General tab we'll want to setup some variables that we can use during the test.  So click on the Optimization tab:

We are going to setup four different variables.  Click on New and Setup the following variables:

OPT 1 Month Buy- Mimimum 1 Maximum 12 Step 1
OPT2  Day Buy- Minimum 1 Maximum 31 Step 1
OPT 3 Month Sell- Mimimum 1 Maximum 12 Step 1
OPT4  Day Sell - Minimum 1 Maximum 31 Step 1

This will allow us to setup our variables for use in our System Test--We are almost done. 

Now we want to setup our Buy order. 

Under the Buy Order Tab you will want to put the following formula:

Month()=OPT1 and DayOfMonth()= OPT2

Under the Sell Order Tab you will put the following formula :

Month()=OPT3 and DayOfMonth()= OPT4

It should look like this: 

What we are telling MetaStock to do is to test Buying on January 1st and Selling on January 2nd.  Except with this simple code, we are telling it to test every possible combination and tell us what would be the most profitable. 

With the MetaStock data you can literally test this back decades to see if there is a seasonal correlation with the instruments you are interested in. 

Now you can type in all this information by hand.  If you'd prefer you can download a copy this importer file from my DropBox folder and automatically add my seasonality test to your MetaStock program.    Here's the link:

No comments: