Skip to content

signal_factory

mainsequence.virtualfundbuilder.resource_factory.signal_factory

SignalWeightsFactory

Bases: BaseFactory

get_signal_weights_strategies() staticmethod

Scans the given directory for Python files, imports the classes, and returns all classes that are subclasses of WeightsBase.

get_signal_weights_strategy(signal_weights_name) staticmethod

Creates an instance of the appropriate SignalWeights class based on the provided name.

WeightsBase

Bases: BaseResource

__init__(signal_assets_configuration, *args, **kwargs)

Base Class for all signal weights

Attributes: assets_configuration (AssetsConfiguration): Configuration details for signal assets.

interpolate_index(new_index)

Get interpolated weights for a time index. Weights are only valid for a certain time, therefore forward fill is limited.

register_signal_class(name=None, register_in_agent=True)

Decorator to register a model class in the factory. If name is not provided, the class's name is used as the key.