ACB: Calculate capital gains from realized gain transactions

View source: R/ACB.R

ACBR Documentation

Calculate capital gains from realized gain transactions

Description

Calculate realized and unrealized capital gains/losses

Usage

ACB(
  data,
  transaction = "transaction",
  price = "price",
  quantity = "quantity",
  fees = "fees",
  total.price = "total.price",
  spot.rate = "spot.rate",
  as.revenue = c("staking", "interests", "mining"),
  sup.loss = TRUE,
  cl = NULL,
  verbose = TRUE
)

Arguments

data

The dataframe

transaction

Name of transaction column

price

Name of price column

quantity

Name of quantity column

fees

Name of fees column

total.price

Name of total.price column

spot.rate

Name of spot.rate column

as.revenue

Name of as.revenue column

sup.loss

Logical, whether to calculate superficial losses

cl

Number of cores to use for parallel processing.

verbose

Logical: if FALSE, does not print progress bar or warnings to console.

Value

A data frame, with the following columns: date, transaction, quantity, price, fees, total.price, total.quantity, ACB, ACB.share, gains

Examples

data <- data_adjustedcostbase1
ACB(data, spot.rate = "price", sup.loss = FALSE)
ACB(data, spot.rate = "price")

cryptoTax documentation built on March 7, 2023, 7:46 p.m.