# How is a seasonality chart calculated for a specific stock?

I have seen several websites offer a Seasonality chart for stocks, and I tried to recreate it, but my results have the general line pattern, but its not the same as what I see on other sites.

My calculation was as follows:

• Get the Closing price of the stock for each day since the IPO,
• Break down the price to annual results - basically arrays for the closing price per day for that year,
• Create another set of arrays, for each year, where the rate of change is calculated (today's closing minus yesterday's closing), and the first trading day of the year is zero,
• Create another set of arrays, for each year, where it calculates the percent change for each day, (today's closing minus yesterday's closing) divided by today's closing multiplied by 100 to get the percent,
• Then for each year, create a running cumulative percent change; add the percent change for each.
• Create a daily average of the running cumulative change, and then plot it.

Issue is that when I compare my result to what other sites are showing, its different. Is my calculation method correct?

If your results are different from what is displayed on various web sites then your methodology isn't the same.

A quick google search indicates that there are a variety of ways that a generic indicator can be calculated. I'd offer that it isn't that important to duplicate a particular web site's numbers but rather, can you discern anything useful from whatever you're looking at? And some sources already do the heavy lifting - for example, ThinkOrSwim.

• That is, of course, assuming that there is any seasonality that you can detect and somehow exploit. The fact that you can compute something doesn't mean it's useful, especially when others may already have looked for it and damped it out. Commented Oct 15, 2023 at 20:25
• It's not what you look at that matters, it's what you see. Commented Oct 19, 2023 at 14:17
• It sorta matters whether what you see is an illusion, or transient, or no longer valid. Which is the problem with most analysis based on the stock rather than on the company. Commented Oct 19, 2023 at 15:32
• Like visual illusions, judgment and decision errors are involuntary and difficult to correct. Commented Oct 20, 2023 at 4:28

A "running cumulative percent" is not the right approach. If a stock goes up by 50% one day and 50% again the second day, the cumulative YTD change is not 100%, but 125% (1.5 * 1.5 = 2.25). That is likely one difference you see.

A better methodology would be:

• Create a 2-d array of price, where the rows are the years and the columns are the days of that year (~260 weekdays)
• divide all values in each row by the price on the first day of that year (the first element in that row)
• subtract 1 from everything

That should get you a rolling YTD percentage for each year, starting at 0%.