vem-methods: 'ValuationEngineModel'-class constructor

VEMR Documentation

ValuationEngineModel-class constructor

Description

Create an instance of an implementation of class ValuationEngineModel (e.g. DiscountingEngineModel, etc).

Usage

VEM(object)

DcModel(...)

CapmModel(...)

## S4 method for signature 'ANY'
CapmModel(...)

XfxDcModel(...)

## S4 method for signature 'ANY'
XfxDcModel(...)

Arguments

object

If an object of class jobjRef, then this parameter is expected to be a reference to a Java discounting engine model and a new R-object of the same class is created where the Java reference is attached as the classes' jref-field. If a character, then object is expected to be the R-class name of the valuation engine for which a valuation engine model is to be instantiated.

Details

This constructor is in fact a short cut to the constructors of the implemented classes such as DcModel for DiscountingEngineModel. Note that it is not possible to instanciate class DiscountingEngineModel itself but only the implementing classes extending class DiscountingEngineModel.

Value

An object of a class extending DiscountingEngineModel

See Also

ValuationEngineModel,DiscountingEngine

Examples

# example 1: create a new 'DiscountingEngine' object
dcm = VEM("DiscountingEngine")

# example 2: attach the reference to a Java 'DiscountingEngineModel'
#            object to a new R-'DiscountingEngineModel' object. Note,
#            the new object will refer to the same Java model.
dcm = VEM("DiscountingEngine")
set(dcm, what=list(
                   RiskFactorObjectLink="YC_CHF",
                   dc.spread=0.05))
# same.dcm = VEM(dcm$jref)   # This command doesn't work.

# example 3: create a new 'DiscountingEngineModel' object using the
#            Engine-specific model constructor method
dcm = DcModel()


wbreymann/FEMS documentation built on Dec. 8, 2022, 9:43 a.m.