knitr::opts_chunk$set(echo = TRUE)
Income from stock holdings outside of retirement savings accounts is taxed with two different tax rates, 27 percent and 42 percent respectively, depending on which tax bracket the income falls into.
This package allows you to easily import data from Nordnet portfolio accounts. It then automatically calculates your total taxable income, and provides advice on actions to take to optimize the long term taxation on your income from stocks. In order to optimize the tax rate, the income in the lowest tax bracket should be maximized. Conversely, income in the highest tax bracket should be minimized.
First step is to export the entire transaction history from your Nordnet portfolio account. Then specify the file path for the transactions file.
nordnet <- "transaktionsfil.csv" degiro <- "Account.csv"
Now with a single function call, calculate your taxable income for every year in the transactions history:
devtools::install_github("atmdv/CalcYourTax", quiet=TRUE) library(CalcYourTax) tax_income <- calcyourtax(nordnet=nordnet, degiro=degiro)
knitr::kable(tax_income, col.names= c("Year", "Profits", "Dividends", "Tax Income", "Bracket limit", "How to optimize", "Amount"), align = c("c", "r", "r", "r", "r", "l", "r"), digits=0, format="markdown", format.args = list(big.mark = ","))
So in each of the previous three years I should have realized more gains in order to maximize my income in the lowest tax bracket. Too bad I didn't have this tool handy!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.