Shares profit calculator
1. Info
Python script used to calculate stock/shares profit/loss.
It can be used to print profit (or loss) to terminal or send it via Gmail.
2. Demo
2.1. Example of stock/shares list
If |
[
{
"symbol": "AAPL",
"company": "Apple Inc.",
"numb_of_shares": 2.5,
"currency": "USD",
"price_buy": 125.49,
"price_sell": 170,
"date_buy": "2021/05/28",
"date_sell": "2022/05/28",
"commission_buy": 0,
"commission_sell": 1.21,
"cap_gain_tax": 27.5
},
{
"symbol": "MSFT",
"company": "Microsoft Corporation",
"numb_of_shares": 2,
"currency": "USD",
"price_buy": 250.84,
"price_sell": 0,
"date_buy": "2021/05/28",
"date_sell": "",
"commission_buy": 1.21,
"commission_sell": 1.21,
"cap_gain_tax": 27.5
}
]