Learn R Programming

YRmisc (version 0.1.6)

pt.udrtn: Average up and down returns

Description

This function calculates the average up and down returns from a series of returns.

Usage

pt.udrtn(r)

Arguments

r

:a vector of periodic returns

Examples

Run this code
# 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