factor_returns: Get return time series for factor as well as for long and...

Description Usage Arguments Value

Description

Get return time series for factor as well as for long and short legs independently.

Usage

1
2
3
4
5
6
7
8
factor_returns(
  data,
  positions,
  update_frequency,
  return_frequency,
  price_variable,
  weighted
)

Arguments

data

a dataframe/tibble. Columns must include name, date, field and value.

positions

a dataframe/tibble. Returned by function factor_positions.

update_frequency

a scalar character vector. Specifies the rebalancing frequency. Must be one of 'year', 'semester', 'quarter', 'month', 'week' or 'day'. Defaults to 'month'.

return_frequency

a scalar character vector. Specifies the frequency of the returns output. Must be one of 'year', 'semester', 'quarter', 'month', 'week' or 'day'. Defaults to 'day'.

price_variable

a scalar character vector. Specifies the name of the variable hosting asset prices. Must be found in the field columns of data.

Value

A data.table with factor returns by date and factor leg. Columns include date, name and position.


bautheac/factorem documentation built on June 7, 2021, 12:11 p.m.