## HW: Python Stock Profit Calculator - Individual Homework

Description

The goal of this homework is to use Python to implement a stock profile calculator. Perform the following:

• Setup your Python development environment
• Research into how stock profit is being calculated.
• Implement a Python program that it will take the following inputs:
• A stock symbol
• Allotment (number of shares)
• Final share price (in dollars)
• Sell commission (in dollars)
• Inital share price (in dollars)
• Captial gain tax rate (in %)
• Output the following items after computation:
• Proceeds (Allotment x Final share price)
• Cost (Allotment x Initial Share Price + commissions + Tax on Capital Gain)
• Net Profit (in dollars)
• Return on investment (in %)
• Break even price (in dollars)

Example

Ticker Symbol:

Allotment:
100

Final Share Price:
110

Sell Commission:
15

Initial Share Price:
25

10

Capital Gain Tax Rate (%):
15

PROFIT REPORT:
Proceeds
\$11,000.00

Cost
\$3,796.25

Cost details:
Total Purchase Price
100 × \$25 = 2,500.00
Sell Commission = 15.00
Tax on Capital Gain = 15% of \$8,475.00 = 1,271.25

Net Profit
\$7,203.75

Return on Investment
189.76%

To break even, you should have a final share price of
\$25.25