Skip to content

Valuation

Conducts valuation of a given policy, providing summary statistic & plots on the total discounted value of all cashflows received by each pathway.

value_policy(policy, cashflows, seed)

   Parameters:

     policy : Policy object

       Policy object generated from create_policy function (see Creating Policy Object)

     cashflows : Matrix

       Matrix of cashflows generated from simulate_cf function (see Simulating Cashflows)

     seed : numeric

       Random seed used for random sampling

   Returns:

     PolStats object

   Usage:

> ap <- create_policy_AP(400000, 60000)
> cf <- simulate_cf(policy = ap, n = 1000)
> v <- value_policy(ap, cf)
========= Policy Details =========
Type        : Account Based Policy
Sample Size : 1000
----------------------------------
Balance     : 4e+05
Expense     : 60000

======= Summary Statistics =======
Mean        : $ 475,062.33
Std Dev     : $ 90,802.31
----------------------------------
Minimum     : $ 292,583.25
Maximum     : $ 1,035,790.55
----------------------------------
P_0.25      : $ 414,751.54
P_0.50      : $ 459,701.37
P_0.75      : $ 520,606.57
P_0.95      : $ 649,646.49
P_0.99      : $ 748,371.56
----------------------------------
Skewness    : 1.19
Kurtosis    : 5.62
==================================

PolStats

   Attributes:

     paths : Vector

       Valuation of individual cashflows by path

     stats : List

       Summary statistics of discounted cashflow

     conv : Plot

       Convergence plot of simulation using random sampling

     dist : Plot

       Distribution plot of present value by path

     scat : Plot

       Scatter plot of present value by path