Description Usage Arguments Examples
Apply Position Stop-Loss on xts Object Containing Weights
1 | apply_position_sl(weights, prices, sl1, sl2, ma = c("ALMA"), n = 5)
|
weights |
xts object with portfolio weights |
prices |
price list of instruments in portfolio weights object |
sl1 |
number indicating drawdown at which to initiate gradual stop loss |
sl2 |
number indicating drawdown to which to extend gradual stop loss |
ma |
moving average type (SMA, EMA, ALMA or DEMA) to use for drawdown calculation |
n |
number of periods to use for moving average calculation |
1 | apply_position_sl(stock_weights, stock_prices, sl1 = -0.2, sl2 = -0.3, ma = "EMA", n = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.