Question: Please use R studio and provide the code. fb) Produce the output for the minimum of the Dow closing value in the dataset as shown

Please use R studio and provide the code.

Please use R studio and provide the code. \fb) Produce the outputfor the minimum of the Dow closing value in the dataset asshown below: [1] "The minimum Dow value of 18592 is at row

\fb) Produce the output for the minimum of the Dow closing value in the dataset as shown below: [1] "The minimum Dow value of 18592 is at row 56 on 3/23/20" c) Suppose you have an index fund tied to the Dow closing value. If you have invested on the minimum date, what date from the dataset you would have sold to gain the maximum percentage gain. The output is as shown below. Note that the code should be generic so that it works on any such dataset. [1] "I would sell on 4/29/20 when Dow is at 24634 for a gain of 32.50%" d) Use the diff function to calculate the differences between consecutive closing values in the dataset. Insert the value 0 at the beginning of these differences. Add this result as the DIFFS column of the data frame. The result is as shown below. V headcdowJ Date Close DIFFS 1/ 2/ 20 23869 3 1/3/20 28635 234 1/ 6/ 20 28 703 68 1/7/20 23584 -119 1/8/20 28745 161 1/9/20 2895? 212 mus-bumb- e) How many days did the Dow close higher than its previous day value? How many days did the Dow close lower than its previous day value? [1] "44 days Dow closed higher than previous day" [1] "47 days Dow closed lower than previous day" f) Show the subset of the data where there was a gain of at least 1000 points from its previous day value. Date Close DIFFS 41 3/2/20 25203 1294 43 3/4/20 22091 11?4 4? 3/10/20 25013 116? 50 3/13/20 23185 1985 52 3/12/20 2123? 1043 5? 3/24/20 20205 2113 59 3/25/20 22552 1351 56 4/5/20 22680 162

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