modular_trader.framework.risk_management.fixed#
Classes#
Fixed stop loss. |
Module Contents#
- class modular_trader.framework.risk_management.fixed.FixedStopLossRiskManagement#
Bases:
modular_trader.framework.risk_management.base.BaseRiskManagement
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:
context (modular_trader.context.Context)
allocations (modular_trader.allocation.AllocationCollection)
- Return type:
- percent_loss: float = None#