Description Usage Arguments Value Examples

ROCmoving

1 2 |

`x` |
xts object in the form of OHLC or only closing prices |

`k` |
# of days to take SimpleMovingAverage over (init 200) |

`nd` |
# of trading days (init 365.25 since this is made for crypto. Else use 250) |

`rf` |
Risk free rate used calculating the Sharperatio. (init 1) |

`alpha` |
quantile used calculating the VaR and ES |

`Initpocket` |
Initial pocket to implement the strategy |

`TransCost` |
Transaction cost, here it is assumed the same for buy and sell |

List with xts objects of cum. returns, weights and table of values of performance. If Initpocket and TransCost is not null,xts object of these will be returned. Warnings will come if there isn't enough money to implement the strategy.

1 2 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.