modular_trader.framework.risk_management.base#
Classes#
Base class for risk management. |
Module Contents#
- class modular_trader.framework.risk_management.base.BaseRiskManagement#
Bases:
abc.ABC
Base class for risk management.
This class defines the interface for all risk management strategies.
The __call__ method is called by the framework to apply the risk management strategy to the given allocations.
The run method is called by __call__ and should be implemented by subclasses to perform the actual risk management logic.
- __call__(context: modular_trader.context.Context, allocations: modular_trader.allocation.AllocationCollection)#
- Parameters:
context (modular_trader.context.Context)
allocations (modular_trader.allocation.AllocationCollection)
- abstract run(context: modular_trader.context.Context, allocations: modular_trader.allocation.AllocationCollection) modular_trader.allocation.AllocationCollection #
- Parameters:
context (modular_trader.context.Context)
allocations (modular_trader.allocation.AllocationCollection)
- Return type: