formula - seasonal trading

Hi,

My first post here.

Working on creating a custom chart program in Python. So far so good. I would like to add another indicator that shows, for example, the seasonal average indicating when the bull/bear cycles start and end over a ten year period. Here is a link to show an example. http://charts.equityclock.com/nasdaq-composite-seasonal-chart

I am not really looking for an answer on how to this in Python but more on how to come up with a mathematical formula. I was thinking of putting each year's closes in separate arrays. Getting the average of the closes for each same calendar day and putting the results into one final array. I haven't attempted it yet but I am sure that I will run into a problem that each year has a different amount of days for the others.

Anyhow, if anyone has any ideas or already knows how to achieve this I would appreciated it.

Thanks.
 
I think you would need to find first the High and Low of each year,
then do a normalization of the prices for each year, ie. scale the prices so that the years get comparable to each other by using the same basis for all.
I think I would also do a smoothing of the curves by using a moving average over the scaled prices, and analyse just the smoothed values, ie. the MAs.
From there on the computational comparison should become much easier.
Here's some basic info:
http://www.stats.govt.nz/browse_for...uctuations-in-fresh-fruit-and-vegetables.aspx
https://www.extension.iastate.edu/agdm/livestock/html/b2-19.html
https://www.tradestation.com/educat...epts/seasonality-studying-annual-price-cycles
http://www.investopedia.com/articles/05/seasonaltrends.asp
 
Last edited:
gaihosa

Check out Trade Navigator by Genesis

www.tradenavigator.com they have some really good seasonal charts.

Also, you might consider using the trading day of the year or of the month to accumulate and average your data rather than using the date. Much of the seasonal data I have used was compiled this way.

Good Luck

NUTSNEAL
 
How do you figure out the trading day for the year? Below is how many days I have per each year's array based on a Yahoo query. Not sure why 2006 only has 63 days but that something I'll figure out.

Would you just make each trading date of the year the corresponding position in each the arrays? Leave days off that are great than 251?

2006 63
2007 251
2015 252
2014 252
2008 253
2009 252
2011 252
2010 252
2013 252
2012 250
 
How do you figure out the trading day for the year? Below is how many days I have per each year's array based on a Yahoo query. Not sure why 2006 only has 63 days but that something I'll figure out.

Would you just make each trading date of the year the corresponding position in each the arrays? Leave days off that are great than 251?

2006 63
2007 251
2015 252
2014 252
2008 253
2009 252
2011 252
2010 252
2013 252
2012 250

gaihosa

First let me say I believe NOT that I know. Make each trading Day # of the year (not trading DATE of the year) the corresponding position. Also as far a leaving out trading day numbers for which you have fewer data points, I would not think you would. There would just be fewer data points and therefore they or those day numbers would be less reliable. As I started with, I don't really know. I have not calculated this type of seasonal data. I have bought it and used it. I do think Trade Navigator would be a good trial for you. I think they offer a FREE two week trial but not sure.

I looked at what they use for EUR/USD (it will have more trading days per year because that market is rarely closed)

2006 258
2007 259
2008 262
2009 261
2010 261
2011 260
2012 261

Good Luck

NUTSNEAL

Keep us posted.
 
Back
Top