Question: My Solutions > Task 1 (Stock prices, working with data, plotting) Load a Matlab data file named NYSEstock. It contains two arrays, stocki and stock2,

 My Solutions > Task 1 (Stock prices, working with data, plotting)

My Solutions > Task 1 (Stock prices, working with data, plotting) Load a Matlab data file named NYSEstock. It contains two arrays, stocki and stock2, each having 1738 rows and 6 columns. The columns contain the following information for each stock and each day in this order): time stamp in numeric form (you can see it in date form using Matlab's function datestr) opening price . maximal price minimal price closing price trade volume a) Count on how many days the closing price of stock 1 was higher than the closing price of stock2 (result variable sihigh), and on how many days it was lower (51low). b) Calculate returns of each stock (differences between given day's and previous day's closing price). You can use Matlab's function diff. Call the results siret and s2ret. c) Which of the stocks has the highers average returns? Variable mret should have value 1 if it's stock1 and value 2 if it's stock 2. d) Which of the stocks has the highest single day return? Variable dret should have value 1 if it's stock1 and value 2 if it's stock 2 e) Plot the data in one figure having the stock closing prices together, and in another one having the returns together. My Solutions > Task 1 (Stock prices, working with data, plotting) Load a Matlab data file named NYSEstock. It contains two arrays, stocki and stock2, each having 1738 rows and 6 columns. The columns contain the following information for each stock and each day in this order): time stamp in numeric form (you can see it in date form using Matlab's function datestr) opening price . maximal price minimal price closing price trade volume a) Count on how many days the closing price of stock 1 was higher than the closing price of stock2 (result variable sihigh), and on how many days it was lower (51low). b) Calculate returns of each stock (differences between given day's and previous day's closing price). You can use Matlab's function diff. Call the results siret and s2ret. c) Which of the stocks has the highers average returns? Variable mret should have value 1 if it's stock1 and value 2 if it's stock 2. d) Which of the stocks has the highest single day return? Variable dret should have value 1 if it's stock1 and value 2 if it's stock 2 e) Plot the data in one figure having the stock closing prices together, and in another one having the returns together

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!