CalculateReturns {PerformanceAnalytics} | R Documentation

## calculate simple or compound returns from prices

### Description

calculate simple or compound returns from prices

### Usage

    CalculateReturns(prices, method=c("compound","simple"))

### Arguments

`prices` | data object containing ordered price observations
`method` | calculate "simple" or "compound" returns, default compound

### Value

vector or matrix of simple or compound returns

### Author(s)

Peter Carl

### References

### See Also

`Return.cumulative`

### Examples

    require(tseries)
    prices = get.hist.quote("^gspc", start = "1999-01-01", end = "2007-01-01", quote = "Close", compression = "m")
    returns = CalculateReturns(prices, method="simple")
    colnames(returns)="SP500"

[Package PerformanceAnalytics version 0.9.5 Index]