Data import
Imported file format
Import file TransCalc takes as an input a list of transactions stored in a CSV (comma separated value) file. The CSV file is usually exported from a broker service. An example file is included which may look like
time | equity | buy/sell | amount | price | comission |
2018-05-31-13.14.06 | equity2 | B | 20 | 10 | 1 |
2018-06-04-09.32.09 | equity2 | S | 10 | 14 | 1 |
2018-06-30-13.14.01 | equity1 | B | 20 | 10 | 0,2 |
2018-07-01-09.32.05 | equity1 | S | 10 | 14 | 2 |
The columns are:
- datetime - transaction date and time*
- equity - name of an equity
- buy_sell - the buy or sell indication. If omitted, the sign (+ or -) of the amount decides about the direction of a trade.
- amount - number of traded shares*
- price - price for a single share*
- commission - transaction commission/provision
* - mandatory data
Date-time format
- Y
- year*
- m
- month*
- d
- day*
- H
- hour
- M
- minute
- S
- second
* - mandatory data
Examples
Pattern | Date-time |
Y-m-d-H.M.S | 2018-07-01-09.32.05 |
Y-m-d | 2018-07-01 |
Y/m/d-H:M:S | 2018/07/01-09:32:05 |
Import errors
- Date error:
date or time format in the imported file doesn't not match the format given in the field "Date-time format".
- Buy/sell error:
you defined a column with trade direction, which requires "B" letter for buy transaction and "S" letter for sell transaction. The data in the column doesn't match this pattern.
- Provision error:
the data in column 'provision' is not valid.
- Price error: the data in column 'price ' is not valid.
- Data incomplate: The data doesn't have all mandatory fields - date-time, price and amount. If the mandatory data exists check the columns separator.
Reports
Report contents
- First transaction: the date of the earliest transaction taken into computations
- Last transaction: the date of the last transaction taken into computations
- Expenditure: money invested
- Revenue: money returned
- Gain: money invested - money returned
- Provision: additional cost incurred by an investor
- Transactions: list of transactions
- Transaction groups: list of transactions groups
Transaction status
A buy transaction is:
- closed if it is balanced by a sell transaction
- partially if it is not fully balanced by a sell transaction
- open if there is no sell transaction to balance it.
To understand the concept of open, partially open and closed transaction better, lets look at the example below. We have here 4 transactions:
trans. id | buy/sell | amount | price |
1 | B | 10 | 10 |
2 | B | 20 | 15 |
3 | B | 10 | 15 |
4 | S | 15 | 20 |
After applaying FIFO we have
trans. id_1 | trans_id_2 | amount | gain |
1 | 4 | 10 | 100 |
2 | 4 | 5 | 25 |
The transactions status is
trans. id | buy/sell | amount | price | status |
1 | B | 10 | 10 | Closed |
2 | B | 20 | 15 | Part. open |
3 | B | 10 | 15 | Open |
4 | S | 15 | 20 | Closed |
Transaction:
- 1 is closed because it is balanced by the transaction 4,
- 2 is partially open because part of it is balanced by
by the transaction 4,
- 3 is open because as yet there is no transaction match in the sell transactions
- 4 is open because it is balanced by the transaction 1,