modular_trader.framework.risk_management.fixed#

Classes#

FixedStopLossRiskManagement

Fixed stop loss.

Module Contents#

class modular_trader.framework.risk_management.fixed.FixedStopLossRiskManagement#

Bases: modular_trader.framework.risk_management.base.BaseRiskManagement

Inheritance diagram of modular_trader.framework.risk_management.fixed.FixedStopLossRiskManagement

Fixed stop loss.

Liquidate positions if unrealized loss percent >= percent_loss.

run(context: modular_trader.context.Context, allocations: modular_trader.allocation.AllocationCollection) modular_trader.allocation.AllocationCollection#

Liquidate positions if unrealized loss percent >= percent_loss.

Args:

context: The context to get the current positions from. allocations: The allocations to modify.

Returns:

The modified allocations.

Parameters:
Return type:

modular_trader.allocation.AllocationCollection

percent_loss: float = None#