InterestDistributionEntry#
API documentation for tradeexecutor.state.interest_distribution.InterestDistributionEntry Python class in Trading Strategy framework.
- class InterestDistributionEntry[source]#
- Bases: - object- Map interest distribution across different trading positions. - A helper class to help us to distribute accrued interest across different related trading positions. - The lifetime of an instance is one sync_interests() run. - __init__(side, position, tracker, weight=None, price=None)#
- Parameters:
- side (LoanSide) – 
- position (TradingPosition) – 
- tracker (AssetWithTrackedValue) – 
- weight (Decimal) – 
- price (float) – 
 
- Return type:
- None 
 
 - Methods - __init__(side, position, tracker[, weight, ...])- from_dict(kvs, *[, infer_missing])- from_json(s, *[, parse_float, parse_int, ...])- Get debug dump of this instance. - schema(*[, infer_missing, only, exclude, ...])- to_dict([encode_json])- to_json(*[, skipkeys, ensure_ascii, ...])- Attributes - Which side we are on - The trading position containing this asset - Can be either loan.collateral or loan.borrower - All weight are normalised to 0...1 based on loan token amount. - The updated price for the tracked asset - Amount of tracked asset in tokens - Amount of tracked asset in tokens - position: TradingPosition#
- The trading position containing this asset 
 - tracker: AssetWithTrackedValue#
- Can be either loan.collateral or loan.borrower - This is a pass-by-reference copy from Loan instance 
 - price: float#
- The updated price for the tracked asset - To update US dollar based prices of interests, we need to know any change in the asset prices. 
 - property asset: AssetIdentifier#
- Amount of tracked asset in tokens 
 - __init__(side, position, tracker, weight=None, price=None)#
- Parameters:
- side (LoanSide) – 
- position (TradingPosition) – 
- tracker (AssetWithTrackedValue) – 
- weight (Decimal) – 
- price (float) – 
 
- Return type:
- None