Description Usage Arguments Examples
View source: R/ScenarioConstructor.R
This is a standard generic function used to construct the class Scenario. The Scenario class is applied to the either a Rates object or a TermStructure object
1 2 3 4 5 6 7 |
Name |
A character string indicating the unique name which identifies the scenario |
Type |
A character string indicating the type of scenario "aggressive", "moderate" |
ShiftType |
A character string indicating the type interest rate shift "Parallel", "Twist", "etc" |
Shiftbps |
A numeric vector indicating the shift applied to each point on the curve |
Formula |
A function to apply the shift to each pont on the curve |
1 2 3 4 5 6 7 8 9 | ## Not run:
MakeScenario(Name = "Flat50",
Type = "Immediate",
ShiftType = "Twist",
Shiftbps = -75,
Formula = function(rates.data, Shiftbps){
as.character(as.numeric(rates.data[1,2:length(rates.data)]) +
Shiftbps/yield.basis)})
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.