Question: Write function rel_std(stock_data) which receives the stock data downloaded from a web site, and returns a relative standard deviation (which is standard deviation of the

Write function rel_std(stock_data) which receives the stock data downloaded from a web site, and returns a relative standard deviation (which is standard deviation of the stock close values divided by the stock close value average and multiplied by 100).

Function main():

Downloads stock data for year 2022 for 8 Dow Jones companies:

Boeing, Coca-Cola, Exxon Mobil, General Electric, JPMorgan Chase, Nike, Pfizer, Verizon

Calls rel_std(stock_data) to collect relative standard deviation for the companies.

Stores relative standard deviations in a dictionary, with company stock symbol as a key and relative standard deviation as value.

Print the company names and corresponding relative standard deviations. It is not important if the order of the companies is not the same as when you inserted them into the dictionary.

Print all numbers rounded to two decimal places.

Sample output:

Program that calculates relative standard deviation

for eight Dow Jones companies.

Company Relative std deviation

---------------------------------------------

Boeing 16.55

Coca Cola 4.08

Exxon Mobil 12.71

General Electric 14.17

JP Morgan 11.36

Nike 15.19

Pfeizer 6.52

Verizon 13.69

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