quantilePortfolio: Quantile portfolio formation

Description Usage Arguments Value

View source: R/eapr_portfolios.R

Description

This function creates a univariate or bivariate quantile portfolio

Usage

1
2
3
4
5
6
7
quantilePortfolio(x, q, on.x, on.y = NULL, sort = "univariate")

quartilePortfolio(x, on.x, on.y = NULL, sort = "univariate")

quintilePortfolio(x, on.x, on.y = NULL, sort = "univariate")

decilePortfolio(x, on.x, on.y = NULL, sort = "univariate")

Arguments

x

An eapr object which contains the time series of variables for all stocks.

q

Either a vector of percentile cut points or the number of quantiles to compute. If the latter, quantiles are computed using evenly spaced percentile cut points.

on.x

First variable to sort on.

on.y

Second variable to sort on. This option is ignored if 'univariate' sorting is selected.

sort

Type of sort for portfolios. Options are univariate, bivariate.ind (independent bivariate), and bivariate.dep (dependent bivariate) sorts.

Value

An eaprPortfolio object containing a data.table of the time series of portfolio assignments for each stock in each period.


GregoryBrownson/EAPR documentation built on Oct. 28, 2019, 7:27 p.m.