ve-methods: 'ValuationEngine'-class constructor

VER Documentation

ValuationEngine-class constructor

Description

Create an instance of an implementation of class ValuationEngine (e.g. DiscountingEngine, etc). This constructor is in fact a short cut to the constructors of the implemented classes such as DcEngine for DiscountingEngine. Note that it is not possible to instanciate class ValuationEngine itself but only the implementing classes extending ValuationEngine.

Usage

VE(object)

## S4 method for signature 'character'
VE(object)

DcEngine(rf, ...)

## S4 method for signature 'missing'
DcEngine(rf, ...)

## S4 method for signature 'RiskFactorConnector'
DcEngine(rf, ...)

CapmEngine(...)

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

XfxDcEngine(...)

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

Arguments

object

If an object of class jobjRef, then this parameter is expected to be a reference to a Java valuation engine 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 to be instantiated.

Value

An object of a class extending ValuationEngine

See Also

VEM, DcEng

Examples

# example 1: create a new 'DiscountingEngine' object
dc = VE("DiscountingEngine")

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


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