decorators module¶
Class and function decorators.
attach_returns_acc_methods function¶
attach_returns_acc_methods(
config
)
Class decorator to add returns accessor methods.
config should contain target method names (keys) and dictionaries (values) with the following keys:
source_name: Name of the source method. Defaults to the target name.docstring: Method docstring. Defaults to "Seevectorbt.returns.accessors.ReturnsAccessor.{source_name}.".
The class should be a subclass of Portfolio.