 Hello everyone, welcome to the session of seasonality in time series. In the previous session we discussed different type of exponential smoothing models. We discussed the simple exponential smoothing model and then when the data has the trained part we discussed the hold model. Today we will discuss if the data has the seasonality then how to handle this time series data or that type of data and how to make the forecast. Generally, seasonality means it is common sense that there will be the data will have a seasonal pattern in the year or in a monthly basis or quarterly basis. Generally, the pattern is known to us whether it is a you know quarter list data or it is a monthly data or you know season wise data especially in the Indian context. So, the regular and the predictive pattern will be known to you and similar pattern will be occurring in the forthcoming years also, but since it will be to some extent mimicking process if not the exact data set, but it will be little bit of fluctuation, but that pattern is known to us. So, therefore, to some extent once you know the pattern of the data as seasonal it is easy to forecast with the similar pattern of season that means once you calculate the pattern of the data with uptrend or downtrend in a particular month or particular quarter which will be repeated every year, the corresponding index, seasonal index or the average weightage for that particular quarter you can calculate and you can make a forecast accordingly. In general, in India quarter one starts from say April to June, April, May, June and then second quarter starts from July or September this way. You can define and fourth quarter, then the December quarter and then the January, April quarter, January, February, March quarter. So, fourth quarter or in general most of the companies are also you know come out with their earning, sales, you know prediction, production everything based on the quarterly basis. And also you know you can define the season can be summer season, you can define the season can be say Mansun season, it can be autumn season, it can be winter season also. You can define it like you know festival season also, it is up to you define the data and the pattern and the sales you can plan it. But in general what I have mentioned here you can see it can be quarterly data, the seasonal pattern, it can be monthly, it can be weekly, it can be daily. Look at the figure here for the two years data I have kept here. It is like look at the during the middle of summer to say Mansun there is a high sale for every year. So, in the pattern are similar for the next year pattern will be similar like this. I will show you one examples you will get to know. Maybe little bit of extra sales are coming up every year in general you know it will be like similar. So, the pattern is known to you and the fluctuation will be predictable in a deterministic manner. So, you know what is going to happen, but you have to predict it according to the data which we have in the past and make the forecast as per the trend of that or as the corresponding pattern of the data. That means, if you look at this particular figure. So, suppose it was following like this say couple of year data you have. So, next it will be like this also. So, this you have to make the forecast. So, now if you look at the couple of you know information that you know whether it is agriculture sector, tourism sector, you know retail sector, you know any other like you know beverage or say you know cold drinks product. So, for them what happens you know during summer you will have a high sale every year. So, pattern will be repeated predictable, but in winter there will be less sales say things about Pepsi or Coke etcetera sprite. So, they will have a high sale in the summer, but less sale in the winter. So, that pattern will be repeated. So, that means that data has a seasonality you can think about agriculture products say you know say fertilizer or say you know agrochemicals products. So, during middle of summer on walls and the entire monsoon they will have a high sale. Look at this particular figure this figure that I have drawn here to some extent during this you know middle of summer to end of monsoon. So, they will have a high sale fertilizer as well as the agrochemical products, because there is a need for the country and the agricultural process, but once the crops are been harvested you will not find much sale for that you know fertilizer as well as the agrochemical products. So, they also follow similar pattern also the sales of that type of product also. So, in that case how to make the forecast, because data follow seasonality. So, you know it also helps to plan the companies to make their production plan, inventory holding planning as well as the marketing strategies, because they know the sales and etcetera that as per the seasonality they will make their inventory and production planning manufacturing system. So, everywhere you will get an advantage of that if you know the seasonality of the data pattern and if you can make better prediction for the forecast for that particular data type with seasonality aspects. So, let's discuss today how we can handle this type of seasonality, how can you make a better forecast. As I was mentioning in the retail sector you will find too much of you know seasonality also like you know during festival seasons you will find holiday etcetera, you will find good sales for the product and it will be repeated everywhere. For example, you know you go to the Dhanteras festival season of October, September, onwards to December you will find a good sale in the Marais season also you will find a good sale for Titan you know Malabar Gold or say you know Kallan Jailers because they will have a sales for that time people will have a demand for that and it will be repeated every year accordingly. So, that is a fall under you know seasonality also in airlines also airlines industry will have a during the vacation as well as the festival season they will have a high sale. Electric consumption also been high during summer and it is repeated every year. Coldings I already given example even e-commerce also companies also come up with good amount of sales and discount offer and gets more sale and that means during seasons also you know different festivals. So, it is gives them the boost for higher sales. So, in stock market also you might say the different type of product follow different type of season and therefore, their share price also follow accordingly. So, to some extent it may also follow seasonal pattern unless there is a impact of beta from market or not the external impact to the data sets. Otherwise the sales of the products will have a impact in their stock price also. Since the sales of the products follow seasonality therefore, they to some extent their sale the stock price also movement also follow to some extent you know seasonal pattern also as per the company's earning and the profit growth. So, there are ample of area where you can see the seasonality happen and we have to understand the data pattern and how can you extract the data and calculate the index and the corresponding average the weightage for that particular quarter or the particular period and how can you make a forecast. Generally, it can be monthly as I talked in the previous slides it can be weekly it can be you know daily basis it can be quarterly basis. We will discuss two aspects monthly basis and quarterly basis. In general you know there are many more methods exist in the literature to understand or to calculate the seasonal index, but today we will concentrate only two method simple average method and normalization method. Sometimes people call simple average method as a you know quarterly average method because quarterly data are majorly falls on the seasonality. So, therefore people call it is a in general quarterly average method. I have given the name of simple average method you can think it as a quarterly average method also. Then once we understand that for you know simple average method for monthly data with example as the process as well as the quarterly data and then we will extend our discussion to the normalization method. So, let us start with the simple average method or quarterly average method process. How to calculate the seasonality index and how to make the forecast for the forthcoming year or periods. So, here you can see simple moving average the steps the five steps I have mentioned here first what you have to do look at the data pattern two type of data I have kept here graph look at the sky color graph here it is follow seasonality. There is a uptrend also we will discuss that part together when seasonality and trend come together there are different methods we will discuss that in a forthcoming session. Now, if you look at this particular data data has a seasonality look at here in every year in a particular time period it has a peak. So, you have to calculate that index how this you know the seasonal peak you have to capture and you have to calculate the weightage for that particular quarter or particular period of the year every year similarly look at here look at this. So, data has a seasonality so that means in a particular month or particular quarter data is following a downtrend and in a particular quarter or particular period it is having a uptrend. So, you have to calculate the index or say weightage for that particular quarter how much weightage you want to give to this quarter as come to the other four quarter so this you have to calculate. So, let us see how the index and the corresponding weightage are being calculated and then how you know make a forecast for the forthcoming period. So, first step is the find the average main objective is to calculate the weightage the weightage the index the index or weightage weightage for that particular quarter this quarter for that particular year this quarter you have to calculate on an average. So, how you calculate the index once you get the index then you can make a trend line prediction and you may get the forecast for the future period. So, first find the average there are many method of calculating the index also here I will follow this particular steps find the average historical demand for each season first average historical demand for each season. So, that means you have a peak here for this year you have a peak here for this year you have a peak here for this year peak here for this year. So, you take that all this peak for that particular year or particular quarter and then the average for them. So, you will get the average sales for that particular peak period of every year. Say I am talking about the peak period that way in a intermediate period also where there is a less sales or the medium sales you take the average for that quarter also I will show you through example you do not worry. And then once you get the for particular quarter or particular month average then you calculate the overall average for all season put together. Like you know global sum you can say global average or you know say all together the average based on the data available to you overall average of the entire data sets entire data set you take the average then you find the weightage for that particular quarter. So, peak or say down whatever say particular that means how you will get is that the average of that particular quarter divided by the overall average. So, you will get the index or quarterly index or the seasonal index or monthly index or the weightage for that particular quarter. So, once you get the index seasonal index say for that particular season or quarter that means the average of that particular quarter data divided by the overall average of the entire season all demand or all the product or cells, whatever that you take and then you calculate the index. The third step is done now, once you get the index then what you do? You take the annual cells of each year and make the train line to predict the forthcoming year's demand, annual demand that is the fourth step, how to do the calculation soil illustration. Annual cells you consider for each year by taking the sum of the cells of the all quarter and then take the regression line or the train line and make the forecast for the next year, but that is annual forecast for the year then divide by the season, you will get the on an average, the on an average, the forecast for particular year, state line forecast or you know decennalized forecast for that particular year, for the forthcoming year, but that is not the forecast, final forecast will be multiply the index that you have calculated in third steps with the average forecast or you know decennalized forecast of that particular quarter, you will get the forecast accordingly again, seasonality will be bring back again, again once you multiply the index with the you know decennalized prediction for each quarter. So, let us see how this particular you know five steps, look at the five steps in summary I have written here, divide this estimate, the annual estimate you have done right, a calculated through regression of the train line, so divide that estimate of the total demand by the number of seasons, say four quarter divide by four, suppose you have a thousand annual cells and the divide by four you will get two three of the cells for each quarter, two fifty here, look at here, two fifty, two fifty, two fifty, two fifty everywhere you are getting two fifty, so state line forecast you are getting actually, because you have divided by the quarter, so is it the final forecast? No, again you multiply the index that you have calculated in the third steps, then you will get the zigzag pattern, as per the weightage you are distributing the data or the forecast according to their index or the weightage of the quarter, you will get the final forecast for the next year. Easy steps, but let us illustrate through numerical examples. So here you see, if you look at the data, suppose three year data you have 2010, 2011 and 2012, but this data are of monthly, but you will use the simple average method right, though I have talked of the quarter average that I will show you in the next example, but let us understand the monthly average data, logic will be mentioned monthly data, so you have 12 month data and three year data are being given to you, what is the step one, calculate the average of all January sale, you will get the average for 2013, you have to make the prediction right, so you have first step is to calculate the index, calculate the index for each month, January index, February index, so this way you have to you know, you have to calculate the index for each quarter, so let us see how we can calculate the index for each quarter first step, so here is the average of January data, look at here, average of January data, how come you have got 438, 444, 450, pi 3, you get the average of January data, so here we have calculated, step one, similarly if you drag the calculation in the excel, you will get the average sales each month, if you extend that concept to the quarterly data, then it will be 4 quarter data will be here for couple of years, we will get the average for each quarter, here it is monthly that is it, so first step is done now, calculate the global average, global average means all demand put together, the average of the data, how many 3 years into 12, so 36 total by 36, total by 36, we will get the global average or the overall average of the data, here we have calculated the overall average of the data, total demand sales of all the seasons put together by number of say season, so it is 36, we have divided by 36, we got the you know overall average for the entire data sets, now you got the per quarter average or per month average here, like for January average by putting the January data, and then you have got the overall average, so you divide that, you will get that means 444 by 309, you will get the January index, done, the weightage for the January, you will calculate for all the periods put together and that weightage will be used for the forthcoming period 2013 data prediction, so this is what the index calculation, so we have calculated the index for January, look at the index for calculation for January, so that we have calculated here, look at this data pattern here, if you see this data perhaps where we have the maximum weightage, you check, I think January has the maximum weightage, interesting, January has the maximum weightage, almost 43% extra than on average, total weightage should be 12, or say 12 month here, so total sum of this weightage should be 12, so if you take the entire index for all the month here, if you see here, perhaps June has the lowest sale, look at June has the lowest sale in the data sets, so in summer the product does not get sold out, that means the demand is not there for in summer, maybe that type of winter products, this product could be example, could be say winter product, so in summer they have a less amount of sale, so now we found, so index for January, June has only 17, so almost 21% less than the on an average index or sale, but January has the highest sale, but we have calculated not a matter, whatever the index are being found that we have to follow, so now this is the index for each month sale, store it, so third step, if you go back to the steps of the simple average methods, look at that, so look at the steps, so third steps are done, so these steps is, let me open the highlight part, you will get to know that these stage are calculated now, index is been calculated, now what you have to do, for each month index you have calculated, now estimate the next year total demand, that we are going to do, so look at how we will calculate the index is been calculated now, now we will have to calculate the annual sales for predicted sale for 2013, so for 2013 say, annual sales or demand say, this example is of demand, we will have to calculate, how we will calculate, take the annual sales for 2010, how you can take the, you can take the sum of them, if you take the sum of all 2000 data, you will get the 2010 total annual sales, similarly if you take the sum, you will get the 2011 total sales, and if you take the sum, you will get the 2012 annual sales, so for each year you got the total annual sales, now if you define a, in excel if you define two data sets say, x and y, x is your 2010 say, y is say 2011 and 2012 say, and that you represent one year one, year two, year three, just for your information, and y is the annual sales of 2010, y1, y2 are the annual sales of 2011, and y3 are the annual sales of 2012, so you get the three data and x as 1, 2, 3, now for 2013, what will be your annual prediction, you put this as a 4, 4 as a representative of 2013, and if you use the regression line, y equals to mx plus c or a plus bx, you will get the forecast for 2013, trend line prediction only, so this way you can make the forecast for 2013, so once you get it, you got the annual prediction, annual forecast based on the data pattern, data trend for 2013, you can follow some other methods also, suppose experts opinion you can take, suppose a new computer has come or some human judgment may come into the picture or company want to extend the product line, you might say the higher sale also, you can add that additional value, but on an average if you rely only on the past data, then you will have to follow the trend line, and you get the forecast for 2013, on an average annual forecast, look at here, we have found the forecast for 2013, what I have shown in the previous slides, I have summarized here, so you know annual sales of each year we found 2010, 2011, and 2012, so you got the annual sales, look at here, and then you use the regression line, there is the representative of them as x, if you use the regression line, I will show you in Excel, do not worry, you will get the forecast for the next year, so you found the forecast of this, but this is what 2013 overall forecast, right, how many periods are involved over here, how many periods 12 periods are involved over here, you divide that by 12, you will get on an average per year forecast, that means if you come here, say 2013, up to say you know 2010, 11, 12 are data are there, now you are making forecast for 2013, actually your forecast is like this, for January, for February, for March, for April, so this way for all month, you have the forecast of how much, say 3944 by 12, whatever the value you will get, that will be your forecast here, say, this is the forecast on an average, you know here, all are straight line, on the straight line, that means it is a steady data, it is a decentralized data, because you have taken the entire 2013 forecast by taking the annual sales, and you have divided that by 12, so on an average you got the decentralized forecast here, but this is not the final forecast, this is what actually the on an average, the predicted forecast for each month, then what you have to do, you have to multiply the index for the corresponding quarter or month, in January, how was the index that we calculated in third steps, almost 40% extra, so 1.43 you have to multiply with this average data, with this average data you have to multiply by 1.435, 40% extra, so you will get the forecast 472, suppose in that case this, whatever it is coming to be, you know almost 36, so plus say 360 plus say 400, so on an average 400 you are getting here, so you will get the on an average forecast for that particular month, it is straight line, it is a decentralized data, but that is not the final forecast, what you have to do, you have to multiply the index, on an average if you see, it is around 3944 by 12, so it is coming out to be around you know 300 say or say you know 300 say 25 or 30, 300 something, so 330 say, so you will get around 330 on an average say, so 330 say 328, so 328 or 330, whatever, so this actually you know, same forecast you are getting, but this is not the final forecast, because you are getting decentralized forecast, then you multiply the corresponding index, for January you got 1.43, then you multiply, you will get 472 as a forecast for that, it will go up actually, so it will go up, so in that case January a forecast is coming out to be here, now if you think about February, it is 38% extra, it is 454, so it will be like here, it will not be say 328, it will be say here, so it is going up, but if you look at the index, it is falling down, so effectively your forecast might fall down like this, it might be like this, let us see how we will get the forecast, so you have to final round, you have to multiply the index with the average forecast data, this average forecast data, if you get it, then your prediction will be like this, look at the predictions, and here if you see the index, as per your index, actually you are getting forecast, for January you have a high sales, because index is high, 40% high, and in June 20% less, so from the straight line forecast, so 320 or 330, whatever you average you will get, like 20% down will be there in June sale, it will say May and say June, in June it will be here, in September it has the lowest sale, so it will fall down further, and then it will be up little bit up, so let us see the pattern of the data, how we got the forecast here, look at, January has the highest sale, look at this 2013 forecast, the green one, January has the highest sale, then February, 43, then 38%, so this way you are reducing the weightage, we are not reducing, as per the index we found that particular month we found, we are calculating, then you see in September they have the lowest sale, because index is low, look at the index is low, so it is following the seasonality that means whatever the seasonal index you found based on the past data pattern, you are repeating that, it is predictable, but you are calculating as per the process of seasonality index, or simple average method, and look at the forecast now, and in June, July, or June, July, August, September are down, but in January, February, March, you have a high sales, again it is picking up in December, so this pattern will be followed every year, this pattern will be followed every year, so this is what the seasonality and index are coming.