View on GitHub

Stock-Exchange-Data

CS-1400 Project 4

Project 4: Stock Exchange Data

Yondu

Problem Statement

You need simple summary information on three of your stocks: Apple, Microsoft, and IBM. What you have is an unsorted csv file listing the daily adjusted closing price for 10 years.

For each stock, print the following information to both the console and the file stock_summary.txt:

Add the following footer to both the console and the file stock_summary.txt:

Your input file (stocks_data.csv) covering the period from 01/02/2009 to 12/31/2018 is in the following format:

Symbol Date Adj. Close
MSFT 4/16/2014 35.807358
MSFT 6/21/2010 20.752356
IBM 2/10/2009 68.930023
AAPL 2/14/2018 164.227203
IBM 6/13/2017 141.24379
IBM 12/26/2017 142.835663
MSFT 4/1/2009 15.053272
AAPL 4/17/2009 15.445643

Directions

  1. Develop your algorithm in detail before writing any code. Read the problem statement very closely several times to make sure you understand all the small details.

  2. Accept the assignment in GitHub by opening the Assignment Invitation URL link provided in your Canvas assignment.
    • This video provides step-by-step directions for completing GitHub assignments.
  3. From inside your GitHub repository, click the Work in Repl.it button.

  4. Open the exercise.py file in the src directory, and begin coding your solution.

  5. Update the module docstring with your information.

  6. Test your program by running it and examining the output.

  7. Format your output to both the output file and the console exactly as shown below. Replace the placeholders with specific values.

     AAPL
     ----
     Max: price date
     Min: price date
     Ave: mean
    
     IBM
     ----
     Max: price  date
     Min: price date
     Ave: mean
    
     MSFT
     ----
     Max: price  date
     Min: price date
     Ave: mean
    
     Highest: Symbol price date
     Lowest: Symbol price date
    
  8. Click the Version Control icon in the left menu, type a memo in the What did you change text box, then click Commit & push

  9. Navigate back to your GitHub repository, open the Actions tab, and check your program for accuracy.
    • A green icon indicates your code passed all test cases. Congratulations!
    • A red icon indicates your code needs to be revised and resubmitted.

Helpful Resources