Question
Have posted this Question 5 times on Chegg please answer it correctly or don't answer it all. Read the instructions carefully if you don't know
Have posted this Question 5 times on Chegg please answer it correctly or don't answer it all. Read the instructions carefully if you don't know how to read than don't do this assignment.
HINT ~~ Answer is supposed to be 183 and dates where the max profit happened is supposed to be dates are (6/27 to 3/17)
You are given a CSV file (you're supposed to read information in Java from it) analyze it and output the dates where the max profit occured and how much was the profit. Please attach a screenshot to prove your code worked.
CSV FILE LINK - https://www.dropbox.com/s/tpyvapym5t8xx80/Data.csv?dl=0
Code is supposed to be in Java and Answer is supposed to be 183 and dates where the max profit happened is supposed to be dates are (6/27 to 3/17)
Hint 2 - You can take a look at this code -> https://www.dropbox.com/s/30jie0esd9akknu/Main.java?dl=0 this prints out where maximum loss happened and how much was the loss. We have to do the OPPOSSITE we have to find out where maximum profit happened and how much was the max profit.
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 "Adi 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 tradeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started