Question: Greetings hope you're doing well Write a Java Program that calculates the maximum profit: Hint ~ Answer should be 183.86 File Link - https://www.dropbox.com/s/tpyvapym5t8xx80/Data.csv?dl=0 The

Greetings hope you're doing well

Write a Java Program that calculates the maximum profit:

Hint ~ Answer should be 183.86

File Link - https://www.dropbox.com/s/tpyvapym5t8xx80/Data.csv?dl=0

Greetings hope you're doing well Write a Java Program that calculates the

The statement "max profit occures between 3/24/17 and 4/3/17 is merely just to give you an example (an idea) it doesn't mean anything. Paste the screenshot of your JAVA code here to prove it compiled and ran. Thanks

Problem The stock market generates a massive amount of data each day, so much so that computerized methods are required to manage the volume. You are asked to write a program that uses real data to evaluate a stock. Requirements Write a Java program that will read and analyze the provided real stock price data and determine the maximum profit possible based on buying at a low price and selling at a high price The program will read data from a file called "Data csv" to retrieve the date and value per share (adicose). The only columns of interest in this comma separated value file are the first and the last columns: the "Date" column and the "Adj Close" column respectively We can find the profit per share by searching through the closing share values and finding the largest positive difference between a pair of values. Obviously, the shares must be bought before they can be sold. The profit realized between any two days is computed as the difference between the later share value and the earlier share value. You will note that the file is arranged by date starting with the latest values and going back in time output You are required to output only the buy and sell dates and the profit per share that could have been realized for making the best possible trade. For example, given the small subset of the data shown here Date Open High Low Close Volume Adi Close 3/4/2017 831.36 835.18 829.036 834.57 1044400 83 4.5 4/3/2017 82 9. 22 840.85 829.22 838.55 167 0200 838.55 3/31/2017 328.97 831.64 827.39 829. S6 139 700 329. S6 833. 831.5 1052800 831.5 3/30/2017 833.5 68 829 332.765 822.38 831.41 1796200 831.41 3/29/2017 825 3/28/2017 320.41 825.99 314.027 320.92 1618000 320.92 3/27/2017 80 6.95 821.63 803.37 819.51 E1894300 819.51 3/24/2017 320.08 321.93 308.89 814.43 1970900 814.43 822.57 812. 257 817.58 3483800 817. 58 3/23/2017 821 Would result in and output of The maximum profit. occurs between 3/24/2017 and 4/3/2017 and is $24.12 per share

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 Databases Questions!