Example #1
0
    def define_parameters(self) -> tp.Dict[str, _api.ModelParameter]:

        return _api.declare_parameters(

            _api.P("boolean_param", _api.BasicType.BOOLEAN,
                   label="A boolean param",
                   default_value=False),

            _api.P("integer_param", _api.BasicType.INTEGER,
                   label="An integer param",
                   default_value=False),

            _api.P("float_param", _api.BasicType.FLOAT,
                   label="A float param",
                   default_value=False),

            _api.P("decimal_param", _api.BasicType.DECIMAL,
                   label="A decimal param",
                   default_value=False),

            _api.P("string_param", _api.BasicType.STRING,
                   label="A string param",
                   default_value=False),

            _api.P("date_param", _api.BasicType.DATE,
                   label="A date param",
                   default_value=False),

            _api.P("datetime_param", _api.BasicType.DATETIME,
                   label="A datetime param",
                   default_value=False))
Example #2
0
    def define_parameters(self) -> tp.Dict[str, trac.ModelParameter]:

        return trac.declare_parameters(
            trac.P("param_2",
                   trac.DATE,
                   "A data parameter",
                   default_value=dt.date(2000, 1, 1)),
            trac.P("param_3", trac.FLOAT, "A float parameter"))
Example #3
0
    def define_parameters(self) -> tp.Dict[str, trac.ModelParameter]:

        return trac.declare_parameters(
            trac.P("eur_usd_rate",
                   trac.BasicType.FLOAT,
                   label="EUR/USD spot rate for reporting"),
            trac.
            P("default_weighting",
              trac.BasicType.FLOAT,
              label=
              "Weighting factor applied to the profit/loss of a defaulted loan"
              ),
            trac.P("filter_defaults",
                   trac.BasicType.BOOLEAN,
                   label="Exclude defaulted loans from the calculation",
                   default_value=False))
Example #4
0
    def define_parameters(self) -> tp.Dict[str, meta.ModelParameter]:

        return api.declare_parameters(
            api.P("param1", api.INTEGER, label="A first parameter"),
            api.P("param2", api.STRING, label="A second parameter"))
Example #5
0
    def define_parameters(self) -> tp.Dict[str, trac.ModelParameter]:

        return trac.declare_parameters(
            trac.P("use_spark", trac.BasicType.BOOLEAN, default_value=False, label="Use Spark for round trip testing"))
Example #6
0
    def define_parameters(self) -> tp.Dict[str, trac.ModelParameter]:

        return trac.declare_parameters(
            trac.P("param_1", trac.INTEGER, "First parameter"),
            trac.P("param_2", trac.DATE, "Second parameter", default_value=dt.date(2001, 1, 1)))
Example #7
0
    def define_parameters(self) -> tp.Dict[str, trac.ModelParameter]:

        return trac.declare_parameters(
            trac.P("param1", trac.BasicType.INTEGER,
                   label="A first parameter"))
Example #8
0
    def define_parameters(self) -> tp.Dict[str, trac.ModelParameter]:

        return trac.declare_parameters(
            trac.P(
                "meaning_of_life", trac.BasicType.INTEGER,
                label="The answer to the ultimate question of life, the universe and everything"))