logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Mitchie SimaCriminology
(5/5)

547 Answers

Hire Me
expert
Bryan ThomsonPsychology
(5/5)

845 Answers

Hire Me
expert
Nikhil AroraGeneral article writing
(5/5)

835 Answers

Hire Me
expert
Rashmi AgnihotriComputer science
(5/5)

662 Answers

Hire Me
MATLAB
(5/5)

Use the corresponding coefficients to calculate the predicted output p_test_hat for test input t for polynomial p.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

1.We need to  develop an autoregression model to predict the stock price for the PRAN group.  We have been given stock values for one month. Use AR (6) model for your prediction. Let’s design the AR model and measure its quality with regards to unseen test data.

a.       Select first 60% data for training  and  40% data for test

b.      Your AR model should be as follows:

Yt+1   = c0  + c1yt-5 + c2yt-4   + c3yt-3 + c4yt-2 + c5yt-1 + c6yt

Where yt is the stock value at time t. So the future value yt+1 can be predicted using the above equation.

c.       Learn the coefficients (all c’s)  using the train data.

d.      Use the learned coefficients to predict the stock values for the test data.

e.      Plot actual stock value  (red line) and predicted stock value (blue line)  for the test data

f.        Calculate SSE for actual stock and predicted stock values. Then calculate R2

Data:

5-Oct-2020

34

6-Oct-2020

67

7-Oct-2020

66

8-Oct-2020

71

9-Oct-2020

77

10-Oct-2020

79

11-Oct-2020

80

12-Oct-2020

79

13-Oct-2020

86

14-Oct-2020

88

15-Oct-2020

87

16-Oct-2020

88

17-Oct-2020

89

18-Oct-2020

92

19-Oct-2020

94

20-Oct-2020

95

21-Oct-2020

93

22-Oct-2020

96

23-Oct-2020

96

24-Oct-2020

97

25-Oct-2020

97

26-Oct-2020

99

27-Oct-2020

100

28-Oct-2020

101

29-Oct-2020

101

30-Oct-2020

102

31-Oct-2020

105

1-Nov-2020

106

2-Nov-2020

106

3-Nov-2020

110

4-Nov-2020

110

 

2.   In this part, you we will fit the following two cubic polynomials p(t) and q(t) at the same time

Train data:

 p(1) = 2,

 p(2) = 7,

p(5) =2,

p(7) =12,

p(8) = 13,

p(10) =6,

p(17) = 6,

q(5) = 4,

q(10) = 5,

q(12) = 10,

q(10) = 8,

q(12) = 19,

p(7) = q(7),

p’(19) = q’(10),

p’’(1) = q’’(7),

 

Test Data:

p(6) =1,

p(10) =2,

p(18) = 30,

p(20) =36,

p(22) = 16,

q(15) = 14,

q(20) = 15,

q(22) = 29,

q(18) = 18,

 

a)      From train data, create vandermonde matrix A. And output vector b_train

b)      Use A and b_train, calculate the coefficients c_hat =  [c0, c1, c2, d0, d1, d2]T. You cannot use pinv() function anyway.

c)       Now you have coefficients for both polynomials.

d)      Use the corresponding coefficients to calculate the predicted output  p_test_hat for test input t for polynomial p.  Plot actual  p(t) and  p_test_hat(t) for test input t

e)      Use the corresponding coefficients to calculate the predicted output  q_test_hat for test input t for polynomial q.  Plot actual q(t) and  q_test_hat(t) for test input t

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme