Learn R Programming

PMmisc (version 0.1.2)

cv.pctcng: Calculating rate of return of a vector

Description

Calculating the percentage change of a time series vector for further analysis, including calculating beta of companies, plotting to see the trend of the stock for technical analysis.

Usage

cv.pctcng(x,n)

Arguments

x

:a numeric vector

n

: number of lag periods

Examples

Run this code
# NOT RUN {
cv.pctcng(mtcars[,1],1)
# }

Run the code above in your browser using DataLab