Description Usage Arguments Value
Given a reference dataset and a set of parameters, construct the desired asset pricing factor and returns its return and position time series by leg.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
name |
a scalar character vector specifying the name to use for the factor. |
data |
a dataframe/tibble. Columns must include |
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 |
sort_variable |
a scalar character vector. Specifies the name of the variable
to use for sorting. Must be found in the |
sort_levels |
a scalar logical vector. If |
weighted |
a scalar |
ranking_period |
a scalar integer vector. Specifies number of periods in term
of |
long_threshold |
a scalar numeric vector. Specifies the threshold for short positions. Default: 0.5. |
short_threshold |
a scalar numeric vector. Specifies the threshold for long positions. Default: 0.5. |
An S4 object of class AssetPricingFactor
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.