Sharesight¶
cgt-calc reads two Sharesight reports: All Trades for acquisitions and disposals, and Taxable Income for dividends and tax deducted from them. This is useful when Sharesight already combines activity from several brokers into one GBP portfolio.
Use a Sharesight portfolio whose base currency is GBP. The importer treats local income and the portfolio value of foreign-exchange trades as GBP.
Export the reports¶
All Trades¶
Export all trades from the portfolio's first transaction. Earlier acquisitions can still affect disposals in the tax year you are reporting; see Before you start.
- Open Tax and select All Trades Report.
- Set the date range to Since inception.
- Select Do not group (Holdings).
- Export the report to a spreadsheet or Google Drive. Do not use the PDF export.
- Open the exported spreadsheet and save or download the sheet containing the All Trades table as a CSV file.
See Sharesight's current All Trades Report instructions for the report controls.
Taxable Income¶
- Open the portfolio's Taxable Income Report.
- Set the date range to the tax year you are calculating.
- Export the report to a spreadsheet or Google Drive. Do not use the PDF export.
- Open the exported spreadsheet and save or download the report sheet as a CSV file.
Sharesight recommends checking its income figures against your dividend statements because the report relies on third-party data. Its Taxable Income Report instructions explain the available periods and exports.
Prepare the directory¶
Keep both CSV files directly in one directory, for example:
sharesight/
├── All Trades Report.csv
└── Taxable Income Report.csv
cgt-calc recognises each report from its contents, whatever its name, and does not read the original
.xlsx files or search subdirectories. Keep other files out of the directory: cgt-calc stops at a
CSV or JSON file it does not recognise. An All Trades report exported Since inception repeats
the trades of every earlier export, so move an older All Trades file out of the directory when you
add a new one. cgt-calc stops when two files hold the same transaction; see
Two files in the directory hold this transaction.
With --sharesight-dir, use the filenames shown above: that option reads only the CSV files whose
names start with All Trades Report or Taxable Income Report, and ignores every other file.
Do not rename or delete columns when converting the worksheets. In addition to the legacy headings,
cgt-calc accepts aliases including Market Code, Qty, Instrument Currency and Exch. Rate. You
can compare the legacy structure with the
sanitised example reports.
Generate the report¶
For the 2024/25 tax year, run:
cgt-calc --year 2024 sharesight/ --no-balance-check
You can pass the two CSV files themselves instead of the directory. --year 2024 means 6 April 2024
to 5 April 2025. --no-balance-check is needed because these two reports do not contain the
complete cash activity required to reconcile a broker balance. Follow
Generate a report to find and check the output.
You can also pass the directory with --sharesight-dir sharesight/, which reads the two reports by
name without recognising them first.
Supported activity¶
The Sharesight importer currently handles:
| Report | Included activity |
|---|---|
| All Trades | Buy and Sell rows, including Sharesight foreign-exchange rows, and equity grants entered as described below |
| Taxable Income | Local and foreign dividend payments, including Tax Deducted and Foreign Tax Deducted amounts |
Equity grants¶
cgt-calc identifies an equity grant through the trade comment. To record a vest:
- Record it as a
Buyin Sharesight. - Enter the market value per share on the vest date as the price.
- Include
Stock Activityanywhere in the trade comment.
cgt-calc then treats the row as stock activity rather than a cash purchase. A Sell row carrying
that marker is rejected. If the CSV has no Comments column, cgt-calc warns that it cannot detect
these markers.
Funds with excess reported income¶
cgt-calc adds a reporting fund's excess reported income (ERI) to a holding
through the fund's ISIN. cgt-calc reads a market and a code from the All Trades report, not an ISIN,
and names the holding after both, such as LSE:VAGP. cgt-calc's bundled ISIN data knows a London
fund by its ticker alone, such as VAGP, so nothing links the two: the holding gets none of the
fund's ERI, and cgt-calc does not check it for missing reports.
For a holding on the LSE market whose code is a London ticker of a fund cgt-calc has ERI for,
cgt-calc prints a warning beginning cgt-calc has excess reported income reports for fund, followed
by the fund's ISIN, and shows a row for your
ISIN translation file. The warning does
not link the holding to the fund, because a code alone does not prove which security it is. To link
them:
- Check the ISIN against your contract note or the fund's documents. If the holding is a different security, leave the file as it is; the warning then appears on every run.
- If the file has a row for that ISIN, add the holding's name to it and keep every name already
there. Otherwise, add the row the warning shows. Keep one row for each ISIN: a second row for it
stops the run, and a row that leaves out a name takes the fund's ERI away from a holding under
that name. When two warnings name one ISIN, such as for
LSE:VAPXandLSE:VDPX, add both names to the same row. - Run cgt-calc again. The warning stops, and any ERI for the tax year appears under the holding's
name in the terminal's Excess Reported Income list. If a row of your own
--eri-raw-filegives the fund a different figure for the same period, the run stops instead and shows the row to check.
If you also hold the fund under its bare ticker through another broker, both holdings then get its ERI, but they stay two separate holdings, so do not rely on their gains; see the warning under ISIN to ticker translation. cgt-calc does not check holdings on other markets. If you know such a holding's ISIN, map it the same way.
Bond funds¶
The Taxable Income report can name a fund differently from the All Trades report. In the
sanitised example reports,
the income of FOO, traded on NASDAQ, is named FOO.NASDAQ, while cgt-calc names the holding
NASDAQ:FOO, as the final portfolio shows. To report a bond fund's distributions as interest, pass
the name its income has, as the terminal's Dividends list shows it: here
--interest-fund-tickers FOO.NASDAQ. FOO or NASDAQ:FOO leaves the distributions as dividends,
and cgt-calc warns that the value matched no income and names FOO.NASDAQ. Once the holding
receives ERI as described below, NASDAQ:FOO matches that ERI, so it no longer warns.
ERI goes by the holding's name instead. The holding receives ERI, whether bundled with cgt-calc or
given with --eri-raw-file, only once you
map the fund's ISIN to its name, here
NASDAQ:FOO; see Funds with excess reported income. Then pass
the name of each kind of income your files have: both names,
--interest-fund-tickers FOO.NASDAQ,NASDAQ:FOO, when there are distributions and ERI, and
NASDAQ:FOO alone when there is only ERI. If you list only one of two names, the other income stays
a dividend, and cgt-calc cannot warn, because the name you listed still matches some of the fund's
income. See Bond-fund income.
Known limitations¶
Opening Balancetrades are not supported. Sharesight uses them when the original buy and sell records are unavailable, but cgt-calc needs the original acquisition dates and costs for UK share matching.Split,ConsolidationandBonusrows are not supported. They stop the import with an unknown action error. Do not delete such a row on its own to make the calculation run: later quantities and gains would be wrong. For a split or consolidation, remove the row in a working copy only together with a RAWSTOCK_SPLITrow stating the change to your whole pooled holding.- Cash deposits, withdrawals and balances are not imported, which is why
--no-balance-checkis required. - Taxable Income sections other than local and foreign dividend payments are not imported.
- If a newer All Trades report gives a non-zero brokerage charge in a currency different from the trade currency (GBP for foreign-exchange rows), the import stops. That fee cannot yet be represented exactly from this report without risking an incorrect allowable cost.
- Overlapping reports are not merged. cgt-calc stops when two files hold a transaction that reads the same in both. It cannot detect a transaction that the two files state differently, such as a trade whose quantity or comment you edited in Sharesight between two exports, and counts that one twice. Do not keep an older Since inception All Trades export of a portfolio beside a newer one, or a report whose dates another file already covers.
Troubleshooting¶
No transactions are detected¶
Check that you converted the spreadsheet worksheet to CSV: .xlsx files are not read. Confirm that
both files are directly inside the directory you passed. With --sharesight-dir, also check that
their filenames start with All Trades Report and Taxable Income Report. Filenames are matched
case-insensitively; additional text after Report and uppercase .CSV extensions are accepted.
Missing expected columns¶
cgt-calc found the report's header row but not every column it needs. This happens when headings were edited during conversion, or when Sharesight has changed the report format.
Export the report again and convert it without editing the headings. If an unchanged report still fails after you upgrade cgt-calc, follow Reporting problems and include the CSV header with a failing row.
No row has the headings that start the All Trades table¶
cgt-calc read a CSV file whose name starts with All Trades Report, but no row in it has the
Code, Type and Market (or Market Code) headings that start the trades table, so it cannot
read any trade from the file. This happens when another worksheet was saved as the CSV file, when
the headings were edited during conversion, or when Sharesight has changed the report format.
Open the CSV file and look for the trades table. If it is not there, save the sheet containing the
All Trades table again, as described in All Trades. If the table is there, export the
report again and convert it without editing the headings. If the error remains, follow the steps
under Missing expected columns.
If the portfolio has no trades at all, move the file out of the directory: it adds nothing to the calculation.
Unknown action¶
Compare the named action with Known limitations. Do not remove the row unless you replace it with an equivalent supported transaction whose UK tax treatment you have verified.
Two files in the directory hold this transaction¶
cgt-calc found the same transaction in two CSV files and stopped, because reading both would count it twice. The error shows the transaction once for each file, with the file and the row it was read from. It reports the first one it finds; the two files can share others.
Open both files and compare them:
- One file is a copy of the other, such as a report downloaded twice. Move one of them out of the directory.
- Both are All Trades reports for the same portfolio, exported Since inception. Each starts at the portfolio's first trade, so the newer one already holds the trades of the older one as Sharesight records them now. Move the older file out of the directory.
- The two reports cover date ranges that overlap, as two Taxable Income reports can. Keep both files until you have exported reports whose date ranges do not overlap, then use those instead.
- The two rows are separate transactions that only look the same. This can happen when the directory holds reports for two portfolios: for example, the same trade or dividend in each. Both must be counted, so put both rows in one file as described below.
Do not delete either of two separate transactions, and do not run cgt-calc on the two files separately: either would leave transactions out of the calculation. Instead:
- Copy both original files to somewhere outside the directory, and edit the two that stay in it.
Their names must still start with
All Trades ReportorTaxable Income Report, or cgt-calc does not read them. - Compare the column headings above each of the two rows. If they are the same and in the same order, insert one of the two rows as a new line directly below the other. If they differ, export both reports again in the same layout first, or put each value of the row under the matching heading of the file it moves to. Never paste the row over one that is already there.
- Remove that row from the file it came from.
- Run cgt-calc again. If the two files hold another matching pair, it reports that one next.
cgt-calc counts every row of a list, including rows that match. A row placed anywhere other than directly below its match can fall outside the list it belongs to and be left out.
The portfolio or dividend totals look wrong¶
Check that the All Trades export starts at the portfolio's first transaction, the Taxable Income export covers the tax year being calculated, and both came from the same GBP portfolio. Compare dividends and deducted tax with your broker statements, and review the terminal's final portfolio for missing or excessive holdings before relying on the tax report.