modular_trader.framework.risk_management.base#

Classes#

BaseRiskManagement

Base class for risk management.

Module Contents#

class modular_trader.framework.risk_management.base.BaseRiskManagement#

Bases: abc.ABC

Inheritance diagram of modular_trader.framework.risk_management.base.BaseRiskManagement

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:
abstract run(context: modular_trader.context.Context, allocations: modular_trader.allocation.AllocationCollection) modular_trader.allocation.AllocationCollection#
Parameters:
Return type:

modular_trader.allocation.AllocationCollection