Return warnings and errors for the specified Cost-of-Capital-Calculator Specificaton revision in parameter values.


spec_revision (dict) – dictionary suitable for use with the Specification.update_specification method.


dicionary containing any warning or error messages

Return type:

rtn_dict (dict)

class ccc.parameters.Specification(test=False, year=2024, call_tc=False, baseline_policy=None, iit_reform=None, data='cps', gfactors=None, weights=None, records_start_year=2011)[source]#

Specification class, contains model parameters. Inherits ParamTools Parameters abstract base class.

static _read_json_revision(obj)[source]#

Return a revision dictionary, which is suitable for use with the update_specification method, that is derived from the specified JSON object, which can be None or a string containing a local filename, a URL beginning with ‘http’ pointing to a JSON file hosted online, or a valid JSON text.

ccc_initialize(call_tc=False, gfactors=None, weights=None, records_start_year=2011)[source]#

ParametersBase reads JSON file and sets attributes to self Next call self.compute_default_params for further initialization

  • test (bool) – whether to run in test mode

  • year (int) – start year for simulation

  • call_tc (bool) – whether to use Tax-Calculator to estimate marginal tax rates

  • baseline_policy (dict) – individual income tax baseline policy parameters, reform dict makes changes relative to this baseline

  • iit_reform (dict) – individual income tax reform parameters

  • data (str) – data source for Tax-Calculator

  • gfactors (dict) – growth factors for Tax-Calculator

  • weights (str) – weights for Tax-Calculator




Does cheap calculations to return parameter values


Return Specification object same as self except it contains default values of all the parameters.


Specification instance with

the default parameter values

Return type:

dps (CCC Specification object)

update_specification(revision, raise_errors=True)[source]#

Updates parameter specification with values in revision dictionary.

  • revision (dict) – dictionary or JSON string with one or more PARAM: YEAR-VALUE-DICTIONARY pairs

  • raise_errors (boolean) –

    if True (the default), raises ValueError when

    parameter_errors exists;

    if False, does not raise ValueError when

    parameter_errors exists and leaves error handling to caller of the update_specification method.




ValueError – if raise_errors is True AND _validate_parameter_names_types generates errors OR _validate_parameter_values generates errors.


Given a revision dictionary, typical usage of the
Specification class is as follows::
>>> spec = Specification()
>>> spec.update_specification(revision)
An example of a multi-parameter revision dictionary is as follows::
>>> revison = {
    'CIT_rate': {2021: [0.25]},
    'BonusDeprec_3yr': {2021: 0.60},
class ccc.parameters.DepreciationParams(initial_state: dict | None = None, index_rates: dict | None = None, sort_values: bool = True, **ops)[source]#

Depreciation parameters class, contains model depreciation parameters. Inherits ParamTools Parameters abstract base class.