Learn R Programming

cryptoTax (version 0.0.5)

ACB: 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
)

Value

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

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.

Examples

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

Run the code above in your browser using DataLab