trading_agent.doctor.checks.trading_limits_check
¶
Checks that the limits block of TradingRules.md can be read, and reports the main limits.
Typical usage example:
result = TradingLimitsCheck(Path('workspace/shared/TradingRules.md')).run()
TradingLimitsCheck
¶
Bases: DoctorCheck
Checks the risk engine's limits.
Creates the check.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rules_file
|
Path
|
The TradingRules.md file. |
required |
Source code in src/trading_agent/doctor/checks/trading_limits_check.py
run
¶
Reads the limits block.
Returns:
| Type | Description |
|---|---|
CheckResult
|
OK with the main limits, a warning when trading is switched off, or failed when the block cannot be read, in which case the risk engine refuses every new position. |