Write a Python program to:
- Process the stocks.xlsx excel file in the picture (can be exported as a txt file first)
- Implement a function to determine the total purchase price (of the portfolio)
- Implement another function to determine the profit margin of the portfolio (current price minus purchase price of all stocks)
A B с D 1 Purchase Date Purchase Shares Symbol 6/10/2014 $28.13 52 MTNB 4/18/2013 $52.43 10 BERY 4/23/2013 $73.53 53 SIRI 2/21/2012 $32.67 20 BMA 2/1/2005 $78.83 75 ADT 9/8/2012 $29.12 2 3 4 5 6 7 8 9 10 11 3/29/2008 $86.51 9/20/2016 $22.19 1/25/2018 $44.21 5/16/2011 $62.66 7 ZNGA 21 BOOM 21 CNTY 86 NOK 95 NMR E Current Price $0.79 $38.38 $106.70 $13.46 $99.91 $80.81 $40.50 $103.10 $84.11 $35.98 F
Write a Python program to: - Process the stocks.xlsx excel file in the picture (can be exported as a txt file first) - I
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am