Learn R Programming

timeSeries (version 4041.111)

wealth: Conversion of an index to wealth

Description

Converts an index series to a wealth series normalizing the starting value to one.

Usage

index2wealth(x)

Value

returns a time series object of the same class as the input argument x normalizing the starting value to one.

Arguments

x

an object of class 'timeSeries'.

See Also

returns, cumulated, drawdowns, splits, spreads, midquotes,

Examples

Run this code
## Load MSFT Open Prices  - 
   INDEX <- MSFT[1:20, 1]
   INDEX
   
## Compute Wealth Normalized to 100 - 
   100 * index2wealth(INDEX)

Run the code above in your browser using DataLab