Tag Info

Hot answers tagged

3

Answering my own question as it could be useful for others. Actually package fOptions is vectorized. The only constraint (and that make sense) is that you can't compute at the same time 2 different greeks, or mix up calls and puts. So assuming that you want to compute the delta of a set of puts, the code will be the following: ...


2

Most technical indicators must be available in the TTR package. However, if they are not then you can write a custom indicator for use in quantstrat as follows. fractalindicator.up <- function(x) { High <- Hi(x); Bars <- nrow(x) afFrUp <- rep(NA, Bars) for(iBar in seq(8,Bars-2)) { if(High[iBar-1]<High[iBar-2] && ...



Only top voted, non community-wiki answers of a minimum length are eligible