Question: Please use this link : https://files.fm/u/f5d798tw9 It has a jupyter file with questions and a csv file to get the data. Please provide pandas code

Please use this link : https://files.fm/u/f5d798tw9

It has a jupyter file with questions and a csv file to get the data.

Please provide pandas code and result for below questions using the files in the above link.

Q1.1, When is the first date this sotck close at more than 130 dollars?

Q1.2, After stock price hit 130 dollar, how many trading days it took to reach the historical high?

Q1.3 Find the top 5 largest one-day % gain (in % compared to the closing cost of the previous trading day). Make sure that your output is a Series object that shows both date and the % gain.

Q 1.4With following investment strategy: buy on day 1, sell on day 3. If based on this strategy, what's the most dollars amount you can lose in one trading?

Q1.5 In which days did we observe that the price has increased of more than 60% within the 9 preceding trading sessions? Report your result as a Series (d,gain) where d is the trading session date when the increase was observed and gain is the maximum percentage gain (%) observed over the 9 days preceding session(today compare with previous 9 trading days).Hint: use a rolling minimum . Today + 9 more days -> use rolling(10).

Q1.6What was the worst possible "buy&sell" operation? Find the two days x and y so that the % loss resulting from buying in x and selling in y (with y after x) is maximized. Your code should work for any data.Hint: Use method cummax() or method cummin(). Cummax/Cummin returns the maximum/minimum value encountered so far. Make sure to return the trading days x and y, as well as the % loss resulting from buying in x and selling in y.

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