data_options: Create Data Options

View source: R/data_options.R

data_optionsR Documentation

Create Data Options

Description

Creates a list of data options of class tidyfinance_data_options used for TidyFinance-related functions. These options map the specific data variables to the TidyFinance naming conventions, allowing functions to flexibly work with different datasets by specifying the relevant column names. Additional options can be passed through ....

Usage

data_options(
  id = "permno",
  date = "date",
  exchange = "exchange",
  mktcap_lag = "mktcap_lag",
  ret_excess = "ret_excess",
  portfolio = "portfolio",
  siccd = "siccd",
  price = "prc_adj",
  listing_age = "listing_age",
  be = "be",
  earnings = "ib",
  ...
)

Arguments

id

A character string representing the entity variable (defaults to "permno").

date

A character string representing the date variable (defaults to "date").

exchange

A character string representing the exchange variable (defaults to "exchange").

mktcap_lag

A character string representing the market capitalization lag variable (defaults to "mktcap_lag").

ret_excess

A character string representing the excess return variable (defaults to "ret_excess").

portfolio

A character string representing the portfolio variable (defaults to "portfolio").

siccd

A character string representing the Standard Industrial Classification code variable (defaults to "siccd").

price

A character string representing the (adjusted) price variable (defaults to "prc_adj").

listing_age

A character string representing the listing age variable (defaults to "listing_age").

be

A character string representing the book equity variable (defaults to "be").

earnings

A character string representing the earnings variable (defaults to "ib", the Compustat income before extraordinary items column).

...

Additional arguments to be included in the data options list.

Value

A list of class tidyfinance_data_options containing the specified data options.

See Also

Other portfolio functions: assign_portfolio(), breakpoint_options(), compute_breakpoints(), compute_long_short_returns(), compute_portfolio_returns(), filter_options(), filter_sorting_data(), implement_portfolio_sort(), portfolio_sort_options()

Examples

data_options(
  id = "permno",
  date = "date",
  exchange = "exchange"
)


tidyfinance documentation built on June 1, 2026, 1:06 a.m.