paper_compute {dispositionEffect}R Documentation

Papers' estimation

Description

Compute paper gains and paper losses as either simple counts, total quantities, expected returns and financial duration.

Usage

paper_count(
  portfolio_quantity,
  portfolio_price,
  market_price,
  allow_short = TRUE
)

paper_total(
  portfolio_quantity,
  portfolio_price,
  market_price,
  allow_short = TRUE
)

paper_value(
  portfolio_quantity,
  portfolio_price,
  market_price,
  allow_short = TRUE
)

paper_duration(
  portfolio_quantity,
  portfolio_price,
  market_price,
  datetime_difference = NULL,
  previous_datetime = NULL,
  transaction_datetime = NULL,
  allow_short = TRUE
)

paper_compute(
  portfolio_quantity,
  portfolio_price,
  market_price,
  previous_datetime,
  transaction_datetime,
  assets,
  allow_short = TRUE,
  method = "all"
)

Arguments

portfolio_quantity

Numeric vector. The portfolio quantities of assets into the investor's portfolio.

portfolio_price

Numeric vector. The portfolio prices of assets into the investor's portfolio.

market_price

Numeric vector. The market prices of assets into the investor's portfolio.

allow_short

Logical. If TRUE short positions are allowed, otherwise only long positions are allowed.

datetime_difference

Numeric value of time difference between the previous_datetime and the transaction_datetime, computed through difftime_financial. If NULL, then previous_datetime and transaction_datetime must be specified.

previous_datetime

POSIXct value. The date-time of the last transaction performed by the investor.

transaction_datetime

POSIXct value. The date-time at which the transaction is going to occur.

assets

Character vector. The name of assets into the investor's portfolio but the traded asset.

method

Character string. The method used to compute papers. Allowed values are "count", "total", "value", "duration" and "all".

Value

The described functions have different return behaviors

In particular:

Functions

See Also

realized_compute, gains_losses


[Package dispositionEffect version 1.0.1 Index]