YieldDecision#
API documentation for tradeexecutor.strategy.pandas_trader.yield_manager.YieldDecision Python class in Trading Strategy framework.
- class YieldDecision[source]#
- Bases: - object- YieldDecision(rule: tradeexecutor.strategy.pandas_trader.yield_manager.YieldWeightingRule, weight: float, amount_usd: float, existing_amount_usd: float | None, existing_position_id: int | None = None, size_risk: tradeexecutor.state.size_risk.SizeRisk | None = None) - __init__(rule, weight, amount_usd, existing_amount_usd, existing_position_id=None, size_risk=None)#
- Parameters:
- rule (YieldWeightingRule) – 
- weight (float) – 
- amount_usd (float) – 
- existing_amount_usd (float | None) – 
- existing_position_id (int | None) – 
- size_risk (tradeexecutor.state.size_risk.SizeRisk | None) – 
 
- Return type:
- None 
 
 - Methods - __init__(rule, weight, amount_usd, ...[, ...])- from_dict(kvs, *[, infer_missing])- from_json(s, *[, parse_float, parse_int, ...])- schema(*[, infer_missing, only, exclude, ...])- to_dict([encode_json])- to_json(*[, skipkeys, ensure_ascii, ...])- Attributes - Applied rule we used - What is the weight we set for this - What is the weight in USD - How much we had in this position prior the calculation - What is the current position id if we have one - Pool participation size risk calculated - pair- rule: YieldWeightingRule#
- Applied rule we used 
 - size_risk: tradeexecutor.state.size_risk.SizeRisk | None#
- Pool participation size risk calculated 
 - __init__(rule, weight, amount_usd, existing_amount_usd, existing_position_id=None, size_risk=None)#
- Parameters:
- rule (YieldWeightingRule) – 
- weight (float) – 
- amount_usd (float) – 
- existing_amount_usd (float | None) – 
- existing_position_id (int | None) – 
- size_risk (tradeexecutor.state.size_risk.SizeRisk | None) – 
 
- Return type:
- None