Question: This needs to be coded in Python and saved as a stocks.py Thanks ! You need to process daily stock prices that are stored in

This needs to be coded in Python and saved as a stocks.py

Thanks!

This needs to be coded in Python and saved as a stocks.py

You need to process daily stock prices that are stored in CSV files. Each stock is stored in a CSV file named after the stock's ticker symbol. For example, the stock prices for Alphabet, Inc are stored in a file named G00G.csy Solution Description Write a module named stocks that includes two classes Company with the following instance attributes o symbol: str -the official stock ticker symbol o name str -the company's name o sector: str - the company's sector, as defined by Yahoo Finance o stock_data: dict[datetime, StockData] -a dictionary mapping datetime objects to StockData objects and the following instance methods: -which takes arguments that are used to initialize the values of the instance attribute listed above(except stock-data), in the order listed above. Only the -init symbol must be provided when creating a Company instance, the other instance attributes (except stock_data) should have the value None if not provided as arguments to _initwhen creating a Company object. * o a method which is automatically called whenever a Company object is printed or converted to a str and returns a string with the company's name and stock symbol in parentheses, e.g., Alphabet (EooG) o a method which is automatically called by the Python REPL to print the value of a Company object to the console and returns a string with the class name and all the name-Alphabet, attributes (except stock-data) between angle brackets, e.g.,

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