getHistoricalReturnStats: Get Historical Returns and Inflation Statistics

View source: R/histReturn_functions.R

getHistoricalReturnStatsR Documentation

Get Historical Returns and Inflation Statistics

Description

Get Historical Returns and Inflation Statistics

Usage

getHistoricalReturnStats(
  stockWt,
  minDate = min(sbi$Month),
  maxDate = max(sbi$Month)
)

Arguments

stockWt

Numeric vector containing weightings to stocks. Weight to bonds will be 1 - stockWt. Enter as decimal so 60% is 0.60. seq(0, 1, 0.1) would produce the statistics for portfolios with weights to stocks of 0% to 100% in 10% increments.

minDate

Earliest historical date to use. Default is earliest in set.

maxDate

Latest historical date to use. Default is most recent in set.

Value

A list

A list with four items. portfolio is a data frame with a row for each stockWt and columns: StockWt, GeomReturn, ArithReturn, and StdDev. The second item is the inflation rate. These in decimal, not percent. The minDate and maxDate are returned.

Examples

## Not run: getHistoricalReturnStats(seq(0, 1, 0.1))

rexmacey/aasim documentation built on Oct. 29, 2024, 9:30 a.m.