Description Usage Arguments Value
Relative Momentum Strategy
1 2 | RelativeMomentum(xts.ret, xts.rank, n = 1, ret.fill.na = 3,
UseTC = TRUE, TCmin = 30, TCrate = 0.001, size = 1, price)
|
xts.ret |
Object of returns |
xts.rank |
Object of ranked returns |
n |
Number of assets in portfolio. Has to be less than number of assets |
ret.fill.na |
Number of NA'sto put in the beginning |
UseTC |
Logical if one want to use transaction cast |
TCmin |
Minimum transactionamount |
TCrate |
Rate in which the transaction cost is calculated. This is only used if it is over the minimal amount |
size |
Size of long position when one is buying. Increasing this can decrease the size of transaction cost, assuming they are independent of size |
price |
object of prices |
list
name mat |
Matrix of returns for top ranked assets |
name ret |
Vector of returns for tp ranked assets. If TC is not null, tranding cost is in the calculation |
name rank |
Matrix of ranks for the top |
name NumberTrades |
Scalar number of trades |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.