2019S1 QBUS6840 Assignment 1 of 5 QBUS6840 Assignment 1 — Homework: Due Dates: Friday 12 April 2019 Value: 2019S1 QBUS6840 Assignment 1 of 5 QBUS6840 Assignment 1 — Homework: Due Dates: Friday 12 April 2019 Value: 15% Rationale This assignment has been designed to help students to develop basic predictive analytics skills on synthetic and possible real applied problems, including data visualization, model building and analysis in terms of understanding in theory, practices with raw data and programming in Python. Tasks

1. Consider the (odd order) centred MA-(2+ 1) (i.e. CMA-(2 + 1)) and the two layer (2m+1)x(2n+1)-MA. (a) Show that a 3×5-MA is equivalent to a 7-term weighted moving average and find out all the weights. For general nonnegative integers m and n, argue that a (2m+1)x(2n+1)-MA is equivalent to a X-term weighted moving average. What is X? (b) Write out the formula for the CMA-(2 + 1), and use your general formula to write out the formula for CMA-11. (c) Prove that when the given time series is periodic With the period 2+ 1, the smoothed time series by the CMA-(2 + 1) is a constant series. Find out the value of that constant. (d) Again assume that the time series is periodic with the period 2???? + 1. Its first order difference time series is defined as. Proving that the new time series is also periodic with the period M, And identify the smallest value for M. Apply CMA-(M) to and find out the smoothed time series You must clearly show each step of reasoning.

[25 Marks]

3. Consider the dataset plastic.csv which consists of the monthly sales (in thousands) of product A for a plastics manufacturer for fives years. (a) Plot the time series of sales of product A. Analyze and identify seasonal fluctuations and/or a trend-cycle? (b) Write your own Python program to implement the classical multiplicative decomposition to calculate the trend-cycle and seasonal indices. Discuss whether the results support the graphical interpretation from part (a). (c) Compute and plot the seasonally adjusted data. (d) Change one observation to be an outliner (e.g., add 500 to one observation), and recompute the seasonally adjusted data. What is the effect of the outlier? (e) To use the decomposition for forecasting, build a regression model for the trendcycle component, and then use this trend-cycle components and other components to make three forecasts (one-step ahead, two-step ahead and three-step ahead predictions). [20 Marks]
5. In your program, you may include the following code to implement SSE.

def sse(x, y):

return np.sum(np.power(x – y,2))
6. In Task 3, you may need build a linear regression model. This can be easily done by

using Python sklearn package (a machine learning package). The following code

from sklearn import linear_model

lm = linear_model.LinearRegression(fit_intercept=True)

model = lm.fit(X,y) % Fitting linear model to data

forecasts = lm.predict(x) % times series forecasting

where X and y are input and dependence variables respectively.
7. In answering question (c) in Task 4, you may produce about 100 alpha and 100 beta values, respectively, By using alphas = np.arange(0.01,1,0.01) betas = np.arange(0.01,1,0.01) Presentation Please submit your project through the electronic system on the Canvas. The assignment material to be handed in will consist of a PDF or WORD document that: i) Details ALL steps. ii) Demonstrates an understanding of the relevant principles of forecasting by showing your analysis and calculation. 2019S1 QBUS6840 Assignment 1 Page 5 of 5 iii) Clearly and appropriately presents any relevant tables, graphs and screen dumps from programs if any. iv) Provide your program code (if any) as separated py file(s). You will be instructed how to submit your program code files. Late Penalty The assignment is due at Friday 16:00pm 12 April 2019. The late penalty for the assignment is 5% of the assigned mark per day, starting after 16:00 pm on the due date. The closing date,
8. April 2019, 16:00pm is the last date on which an assessment will be accepted for marking.

WX: codehelp