factor_agent.config.AcceptanceConfig#

class AcceptanceConfig(model, seeds=(0, 1, 2), val_size=0.2, top_k=100, contribution='none', factor_root=None, package='factor_agent.accepted', export_start=None, export_end=None)[source]#

Bases: object

How Acceptance validates, opens the hold-out and exports.

model is the acceptance model, a template (factor_agent._acceptance_model): the component config of a quantlab BaseModel or ModelEnsemble, whose own factors are the baseline (empty: the reference set). Every baseline feature, and each accepted factor’s scored values, is read as the campaign’s scoring reads.

Raises:
ValueError

If there is no seed, model is a SeedEnsemble, or contribution is not one of CONTRIBUTIONS.

TypeError

If model is not a model’s component config.

Methods#

AcceptanceConfig.from_dict

Read the acceptance section.

Attributes#

AcceptanceConfig.contribution = 'none'#

Each accepted factor’s contribution in validation: none, drop_one, add_one or both; never on the hold-out.

AcceptanceConfig.export_end = None#

Last date of an exported store; None: the hold-out’s end, else the validation’s.

AcceptanceConfig.export_start = None#

First date of an exported store; None: the training segment’s start.

AcceptanceConfig.factor_root = None#

Where exported stores go, <factor_root>/<name>/; an export needs it.

AcceptanceConfig.package = 'factor_agent.accepted'#

The package the exported FactorKunQuant subclasses are written into, one module each.

AcceptanceConfig.seeds = (0, 1, 2)#

The seeds every model is trained with; each replaces every member’s random_seed.

AcceptanceConfig.top_k = 100#

Members held by the plain TopK book.

AcceptanceConfig.val_size = 0.2#

Share of the training window each model validates (early-stops) on, at its end.

AcceptanceConfig.model#

The acceptance model’s template; required, so no campaign is accepted against a default model.