Question: Your client is an investor who needs your help analyzing a large data set. The data consists of 5 years of prices of large-cap companies
Your client is an investor who needs your help analyzing a large data set. The data consists of 5 years of prices of large-cap companies (largest companies that cover 75% of the American equity market by capitalization). You were provided a flat text file with the prices. First column represents the company name; the rest of the columns are prices for each business day. Weekends and national holidays are excluded from the file 2 TITANIUM METALS CORP MCDERMOTI INTL INC 8.29 185 1816 184 17.4817.64 9.271933 140 19. 19.4319.78 7.72.91 36 652 6.22 6.10 21.172129 2116 21.19 2086 21.13 0.721108 1LOS1131114 113 9.4019.52 1959155 19.221943 17.63 19.99 5.65 21.19 11.59 9.65 8.36 41.91 7.36173117. 17.6 17.30 17.34 17.32 2.47 SOUTHWESTERN ENERGY CO 21 6 COMPUWARE CORP DENBURY RESOURCES INC SERVICE CORP INTERNATIONAL FMC TECHNOLOGIES INC .05 4.374443 446 44.05 43.72 43.6 813 16 8.13 4) O QUESTAR CORP SAPIENT CORP 2.7712.9 13.00 12.5 12.5912.45 Your client believes that the best way to predict the next year performance of a stock is to calculate growth ratio using the following formula: Ending Pricel You will get 5 bonus points if you use the average price for the last two years (504 business days-assuming that one calendar year equals to 252 business days. First row with the date header need to be ignored using if statement. Ending Pricel Average Price ast so4 days) You will get 10 bonus points if you use the average price for two years prior years (2008 and 2009). Your code will need to use the dates to use the prices in 2008 and 2009 only Ending Price] Average Price)oos &200) You will get 15 bonus points if you make the program interactive and let the user specify the years to compute the growth ratios for (not limited to two years). Suggestion is to create an extra class "DatePrice" that has two attributes: date and price. And instead of array of doubles of prices, each Stock will have array of DatePrice(s) so that you can match date with the price. In this case the first row becomes very important as it will be used in matching prices to dates Develop a Java application that will read the file and identify the company with the highest growth ratio. Refer to the image below on how the output should look like. Pick one or the other formula
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
