Personal tools
You are here: Home Community Help Center How-tos Write a Parameter File

Write a Parameter File

Parameters are kept separate from the model, its structure and the results.

Purpose

In order to run our first model we need a parameter script file in the same folder as our model class file.

Prerequisities

Source code of PillarOne modelling.

Step by step

1:  model = SparrowModel
2:  periodCount = 2
3:  allPeriods = 0..<periodCount

4:  mean = 10d
5:  stDev = 0.5
6:  lambda = 2.3

7:  components {
8:      frequencyGenerator {
9:          parmDistribution[0] = RandomDistributionFactory.getDistribution(
                FrequencyDistributionType.POISSON, ["lambda": lambda])
10:         parmDistribution[1] = RandomDistributionFactory.getDistribution(
                ClaimSizeDistributionType.PARETO, ["alpha": 1d, "beta": 2d])
11:         parmBase[0..<periodCount] = FrequencyBase.ABSOLUTE
12:     }
13:     claimsGenerator {
14:         parmDistribution[allPeriods] = RandomDistributionFactory.getDistribution(
                ClaimSizeDistributionType.NORMAL, ["mean": mean, "stDev": stDev])
15:         parmBase[allPeriods] = Exposure.ABSOLUTE
16:     }
27: }

(package and import statements are not displayed)

 

  1. First we have to define the model our parametrization belongs to (line 1)
  2. Furthermore we have to fix the number of periods (line 2)
  3. For convenience, we define some variables (Line 3 to 6). Here you see an advantage of programmatically defining  parameters. PillarOne allows other methods to set parameter values, but only this way of setting parameters can make full use of ranges and iterators.
  4. The following lines define the parameters for every component. The block has to start with components. Then every component needing parameters have to be listed and values have to be assigned to the parm properties of every component.
    • It is possible to define different parameters for each period or using the same for all period.  The frequency generator will use a Poisson distribution for period 0 and a Pareto distribution for period 1. But the claims generator will us a normal distribution for all periods.

 

Further information

  • Parameters can be edited in the user interface.
  • Parameterization files can also be imported into a database.
    An advantage of script based parametrization is the possibility to easily define common values and iterate over structures.
  • PillarOne models can load their parameters directly from a database.
    In the future, mapping of custom data structures is planed.
Document Actions

Multidimensional Parameters

Posted by Jörg Dittrich at 11.12.2008 16:13
Distributions like picewiselinear, piecewiselinearempirical or discreteempirical need multidimensional parameters. How can I specify those parameters and how can I change them within the GUI?