View source: R/histReturn_functions.R
calcChronologicalHist | R Documentation |
Generates sequential returns and inflation rates using the sbi table. It will start with the startIdx element of sbiSub and generate n annual returns using consecutive months.
calcChronologicalHist(startIdx, n, sbiSub, stockWt)
startIdx |
Starting index |
n |
Number of years to generate returns and inflation. |
sbiSub |
A subset of the sbi table limited by sim$minDate and sim$maxDate. |
stockWt |
Weighting to stocks. Bonds will be 1 - StockWt. Enter 60% as 0.60. |
data frame with n rows and two columns; return and inflation. These have 1 added to them so 4% will return as 1.04.
## Not run: calcChronologicalHist(1, 10, sbiSub, 0.6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.