powered by
This function calculates the average up and down returns from a series of returns.
pt.udrtn(r)
:a vector of periodic returns
# NOT RUN { r <- runif(100,-1,1) # generate random number to simulate returns pt.udrtn(r) # }
Run the code above in your browser using DataLab