method to generate the market valuation function for a given portfolio and all positions (including participation if any).
# S3 method for portfolio
generateFunction(object, market.risk, ...)
S3 object of class portfolio.
S3 object of class marketRisk.
additional arguments.
a function, the market valuation function with the following parameter:
x
: a matrix of simulation with named columns corresponding
exactly to the name of base-risk factors in a marketRisk
keeping the
same order or an unnamed vector of simulations keeping the same
ordering of risk factors as in the covariance matrix
defined in marketRisk
. Please note that if the portfolio contains
a participation
, then an additional column (in the case of matrix input) named
participation
or an additional entry (in the case of vector input) should
be provided in the last position.