Import CSV
CSV import is used to read transactions from a broker or another source. The import creates ordinary events in AksjeFiks, just as if they had been registered manually, but only after they have been shown in a preview.
CSV import can create buys, sales, dividends, and option expirations. Rows mapped to withholding tax do not create separate events; they are attached to dividends when possible. Option buys and option sales can be imported as ordinary buys or sales when the transaction type exists in the selected import profile.
Only transaction types included in the import profile’s mappings are imported. Other rows are ignored and shown as warnings in the preview. Corporate actions such as splits, mergers, demergers, spinoffs, subscription rights, and manual tax adjustments must be registered manually.
Before import
Section titled “Before import”First create the accounts that the transactions should be associated with. The import dialog selects one account for the whole import, so import one file per account if you use multiple accounts.
The import does not check whether transactions already exist in the portfolio. Importing the same file or overlapping periods can therefore create duplicate events. Only import transactions that have not already been registered.
Also check the CSV file before importing:
- the file should have a header row with column names
- date, transaction type, currency, amount, quantity, ISIN, security, and security currency should be present in the columns expected by the import profile
- amount and quantity should represent the row total, not the price per share
- currencies must use one of the currency codes supported by AksjeFiks:
NOK,SEK,EUR,CAD,USD,DKK, orGBP - rows that should not be imported should be removed or mapped to Ignore in the import profile
Older history is especially important to review. If earlier buys, sales, splits, or account transfers are missing, imported sales may produce incorrect FIFO results even when the CSV row itself is read correctly.
Import Flow
Section titled “Import Flow”First select Bank account and Select bank/broker. The built-in import profiles are:
| Import profile | Delimiter | Notes |
|---|---|---|
| Avanza | Semicolon | Reads buys, sales, dividends, and withholding tax, among other rows. |
| Nordnet Sverige | Tab | Reads buys, sales, dividends, and withholding tax, among other rows. |
| Nordnet Norge | Tab | Has default mappings for option buys, option sales, and option expirations. |
| DNB | Semicolon | Reads buys and sales. |
Then choose whether the import should use exchange rates from Norges Bank. All built-in profiles use Norges Bank by default. If the profile has no exchange-rate column, this is required. If the profile has an exchange-rate column, you can choose whether the rate should come from the CSV file or from Norges Bank for the relevant transaction date. If no rate is available for that date, the most recent available banking day is normally used.
An exchange rate from the CSV file must express the value in NOK of one unit of the transaction currency. Nordnet Norge has an exchange-rate column in its default profile. If the rate in the file is blank, zero, or cannot be parsed as a number, Norges Bank is used as a fallback. Amounts already expressed in NOK are not converted.
Exchange rates in Nordnet’s CSV files have sometimes been observed to differ in the fourth decimal place from both Norges Bank’s rates and the rates Nordnet itself displays under transactions. Nordnet has been asked about this, but has not yet provided an answer about the cause of the discrepancy.
When Add import comment is selected, every imported event gets a comment with the import source and import time. This makes imported events easier to find and review later.
Click Choose CSV file to read the file. AksjeFiks does not import anything immediately, but first builds a preview.
Preview
Section titled “Preview”The preview shows the events that can be imported. It shows date, security, event type, quantity, and calculated NOK amount. New securities are marked with New.
The summary above the table shows:
- how many events can be imported
- how many new securities will be created
- how many rows are ignored
Warnings are shown if a row cannot be parsed, if the transaction type has no mapping, if the currency is missing or unknown, or if a withholding-tax row could not be attached to a dividend. Warnings do not prevent the remaining events from being imported.
The import is saved only when you confirm the dialog. If the preview is not correct, cancel the import and fix the file or import profile before trying again.
How Rows Are Interpreted
Section titled “How Rows Are Interpreted”The import profile determines how each CSV row is read. Column names must match the headers in the CSV file. Leading and trailing whitespace in headers is removed, but otherwise the names must match.
If a CSV file contains several columns with the same header, duplicate headers get the suffix _2, _3, and so on during import. This is why some profiles use column names such as Valuta_2.
The transaction type in the CSV file is compared with the import profile’s mappings. A row can be mapped to:
- Buy
- Sell
- Dividend
- Option expiration
- Withholding tax
- Ignore
Amounts and quantities are read as positive values. The event type, such as buy or sell, determines how the event affects the holding and result.
All imported events on the same date get automatic times from midday onward, giving the events a stable internal order. Check the order manually if multiple transactions in the same security on the same day affect the FIFO calculation.
Securities Created During Import
Section titled “Securities Created During Import”AksjeFiks first tries to find an existing security with the same ISIN. If the ISIN is missing or does not match, the security name is used as a fallback, with exact name matching ignoring uppercase and lowercase differences.
If no security is found, a new security is created. Name, ISIN, and security currency are read from the CSV file when available. The type is normally stock, but Nordnet Norge and some Nordic option symbols may be identified as options.
Always check automatically created securities after import. This is especially important for security type, country, default currency, listing status, fund type, and option details.
If the same security has received a new ISIN, import the older transactions before changing the security’s ISIN. Read how to handle an ISIN change in the security dialog.
Withholding Tax
Section titled “Withholding Tax”Rows mapped to Withholding tax do not create separate events. Instead, AksjeFiks tries to attach the withholding tax to the closest previous dividend for the same security, based on ISIN or the same imported security key.
Withholding tax is converted to NOK using the dividend’s exchange rate. Therefore, check that the withholding-tax amount is expressed in the same currency as the dividend, even if the tax row has a different date.
If the withholding tax cannot be matched, a warning is shown and the row is not imported. This can happen, for example, if the dividend is missing from the same import, if the ISIN differs, or if the date order in the file does not make it possible to find the correct dividend.
Check imported dividends especially carefully:
- the dividend amount should match the gross amount to be reported
- withholding tax should be attached to the correct dividend
- the dividend date should be the correct tax recognition date, not necessarily the broker’s payment date
CSV import cannot determine the company’s dividend decision date by itself. Read more in the help page for dividends and returns of capital.
Import Configurations
Section titled “Import Configurations”The Import configurations tab is used to review, edit, and create import profiles. A profile consists of:
- profile name
- delimiter: semicolon, tab, or comma
- column names for required fields
- optional column for exchange rate
- default exchange-rate source
- mappings from the broker’s transaction types to event types in AksjeFiks
All columns except Exchange rate are required. If the exchange-rate column is left blank, Norges Bank is used as the exchange-rate source.
To add a new source, create a new import profile and fill in the column names exactly as they appear in the CSV file’s header row. Then add a mapping for each transaction type that should be imported. Rows without a mapping are ignored.
Select Save profile to apply the changes. Edited and new import profiles are included when you save the portfolio file and remain available when it is reopened. Reset profiles removes custom profiles and customisations and restores the built-in profiles.
Checks After Import
Section titled “Checks After Import”After import, review the events and securities before saving or using the year summary.
Check in particular that:
- every row ended up on the correct account
- buys and sales have the correct date, quantity, total amount, and currency
- dividends have the correct gross amount, withholding tax, and tax recognition date
- new securities have the correct type, country, currency, and listing status
- FIFO positions and realised results look reasonable after imported sales
- any import warnings have been resolved or consciously accepted
- corporate actions that are not imported from CSV have been registered manually
If something is wrong, imported events can be edited or deleted in the same way as manually registered events. The import is performed as one grouped change, so it can also be undone immediately after import if the result is wrong.