## Ex18: Plotly-TimeSeries ## Objective: Use Python to create a time series chart that displays the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
## Ex18: Plotly-TimeSeries ## Objective: Use Python to create a time series chart that displays the stock prices of IBM, Google and Airbnb for an 18-month period from 1-Jan-2022 to 1-Jun-2023. Description: Create a time series chart using Plotly Graph Objects. 1. Name the exercise file, Ex18-Plotly-TimeSeries. 2. Use yfinance to download financial data from Yahoo. 3. Three yf.download() functions should be used to capture the stock prices of IBM, Google, and Airbnb for an 18-month period from 1-Jan-2022 to 1-Jun-2023. 4. Then, instantiate the traces on the time series chart by using three Scatter() classes. a. Markers should be added to each trace. 5. Place a range slider below the X-axis. 6. Finally, create a range selector with the following two buttons: a. The first should show the data for a period of nine months. b. The second should reset the chart and zoom out to display all available data. The web browser should render an output similar to the below (showing data for 18 months): > temp-plot.html CD Stock Price Data for IBM, Google, & ABNB 180 160 140 120 100 80 C:\WCU\CIS-240-Repo\CIS240\temp-plot.html 9m all Jan 2022 Mar 2022 May 2022 Jul 2022 Sep 2022 Nov 2022 Jan 2023 Mar 2023 May 2023 Incognito - IBM -GOOG -ABNB Jul 2023 ## Ex18: Plotly-TimeSeries ## Objective: Use Python to create a time series chart that displays the stock prices of IBM, Google and Airbnb for an 18-month period from 1-Jan-2022 to 1-Jun-2023. Description: Create a time series chart using Plotly Graph Objects. 1. Name the exercise file, Ex18-Plotly-TimeSeries. 2. Use yfinance to download financial data from Yahoo. 3. Three yf.download() functions should be used to capture the stock prices of IBM, Google, and Airbnb for an 18-month period from 1-Jan-2022 to 1-Jun-2023. 4. Then, instantiate the traces on the time series chart by using three Scatter() classes. a. Markers should be added to each trace. 5. Place a range slider below the X-axis. 6. Finally, create a range selector with the following two buttons: a. The first should show the data for a period of nine months. b. The second should reset the chart and zoom out to display all available data. The web browser should render an output similar to the below (showing data for 18 months): > temp-plot.html CD Stock Price Data for IBM, Google, & ABNB 180 160 140 120 100 80 C:\WCU\CIS-240-Repo\CIS240\temp-plot.html 9m all Jan 2022 Mar 2022 May 2022 Jul 2022 Sep 2022 Nov 2022 Jan 2023 Mar 2023 May 2023 Incognito - IBM -GOOG -ABNB Jul 2023
Expert Answer:
Answer rating: 100% (QA)
python import yfinance as yf import plotlygraphobjects as go Download stock data ibmdata yfdownloadI... View the full answer
Related Book For
Statistics For Business Decision Making And Analysis
ISBN: 9780321890269
2nd Edition
Authors: Robert Stine, Dean Foster
Posted Date:
Students also viewed these programming questions
-
The capital employed in a company is Rs. 5,00,000. The normal rate of return is 20%. During the last four years the actual returns wewre : 24 %, 26%, 28%, and 30% on capital. The goodwill of the...
-
Which term refers to groups of individuals, families, or companies that are placed together because it is believed they share similar needs?
-
Use a time series chart to display the data shown in the table. The table represents the percentages of the U.S. gross domestic product (GDP) that come from the manufacturing sector. Organize the...
-
A chilled water cooling coil receives 2.5 m3/s of air at 25 C db, 20 C wb. It is necessary for the air to leave the coil at 13 C db, 12 C wb. Assume sea level pressure. (a) Determine the SHF and the...
-
A large tank at 300 kPa delivers air through a nozzle of 1-cm2 throat area and 2.2-cm2 exit area. A normal shock wave stands in the exit plane. The temperature just downstream of this shock is 473 K....
-
In each case, find T-1 and verify that MDB (T)-1 = MBD(T-1). (a) T: R2 R2, T(a,b) = (a + 2b, 2a + 5b); B = D = standard (b) T: R3 R3 T(a,b,c) = b + c, a + c, a + b); B = D = standard (c) T : P2 ...
-
In a non-replacement life test, 50 water turbines were put into continuous operation, and the first 3 failures occurred after 400,600, and 1,050 hours. (a) Assuming the exponential model, construct...
-
Refer to the preceding facts for Pontiacs acquisition of 80% of Starks common stock and the bond transactions. Pontiac uses the simple equity method to account for its investment in Stark. On January...
-
Convert the following C code to assembly: if (a b || c == 10) { . . . codel... } else { . . . code2... } ...more code...
-
Determine the value of P0, as a function of H, for these two investment alternatives to be equivalent at an interest rate of i = 15% per year: 1.7H 2Po 05 1015 5 10 10 End of Year Po End of Year
-
Let e: B3 B6 be the encoding function with the following parity check matrix 1. 1. 1 0 1 0 1 1 100 0 1 001 (i) (ii) Determine the generator matrix and list all code words Decode the received words...
-
Give your thoughts on the "Holistic Family Violence Program" through Native Child and Family Services Toronto and include: How this could be of importance Why this program may be relevant within the...
-
Calculate the vertical voltage acting on each of: - Aggregate Road Base - Subgrade - Show the effect of adding a layer (Subbase E = 80 N /mm2, h = 15 cm) on the value of the efforts you calculated. ...
-
Executive Leadership at All About Analytics realized that their talent acquisition initiatives to hire new employees from diverse cultural backgrounds are experiencing great success. The team members...
-
What is the angle of tilt, 0, for this tank and slanted tube? L = 1.87 m 50 cm 50 cm Oil SG=0.8 Water SG = 1.0
-
Grace bought a $10 000 12-year bond issued by the company she works for. The bond pays 5% simple interest per annum. a. How much interest will Grace receive each year? b. If Grace holds the bond for...
-
Arrow Electronics is considering Projects S and L, which are mutually exclusive, equally risky, and not repeatable. Project S has an initial cost of $1 million and cash inflows of $370,000 for 4...
-
Accounting policies and practices that are most important to the portrayal of the companys financial condition and results, and require managements most difficult, subjective, or complex judgments...
-
Consider each situation. Identify the population and the sample, explain what p or represents, and tell whether the methods of this chapter can be used to create a confidence interval. If so,...
-
Modern combinatorial chemistry allows drug researchers to explore millions of products when searching for the next big pharmaceutical drug. An analysis can consider literally hundreds of thousands of...
-
An accounting firm assists small businesses file annual tax forms. It assigns each new client to a CPA at the firm who specializes in companies of that type and size. For instance, one CPA...
-
What is the difference between real objects and virtual objects? Give an example for each.
-
Give a superclass for the following three classes: car, airplane, tank.
-
How do business classes differ from utility classes? Provide one example for each.
Study smarter with the SolutionInn App