rank2sell | R Documentation |
outOFsell()
. This is a sell version of rank2return()
.Compute the portfolio return knowing the rank of a stock in the input ‘mtx’.
This function computes the return earned knowing the rank of a stock
computed elsewhere and named myrank associate with the data columns in
the input mtx of stock returns. For example, mtx has p=28 Dow Jones stocks
over n=169 monthly returns. Portfolio weights are assumed to be linearly
declining. If maxChosen=4, the weights are 1/10, 2/10, 3/10 and 4/10, which add
up to unity. These portfolio weights are assigned in their order
in the sense that first chosen stock (choice rank =p) gets portfolio weight=4/10.
The function computes return from the stocks using the ‘myrank’ argument.
This helps in assessing out-of-sample performance of (short)
the strategy of selling lowest ranking stocks. It is mostly for internal use
by outOFsell()
. This is a sell version of rank2return()
.
rank2sell(mtx, myrank, maxChosen = 0, pctChoose = 20, verbo = FALSE)
mtx |
a matrix with n rows (number of returns) p columns (number of stocks) |
myrank |
vector of p integers listing the rank of each stock, 1=best |
maxChosen |
number of stocks in the portfolio (with nonzero weights) default=0. When maxChosen=0, we let pctChoose determine the maxChosen |
pctChoose |
percent of p stocks chosen inside the portfolio, default=20 |
verbo |
logical if TRUE, print, default=TRUE |
average return from the linearly declining portfolio implied by the myrank vector.
Prof. H. D. Vinod, Economics Dept., Fordham University, NY
outOFsell
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.