agent0.core.hyperdrive.policies.smart_long
Agent policy for leveraged long positions
Classes
Agent that opens longs to push the fixed-rate towards the variable-rate. |
Module Contents
- class agent0.core.hyperdrive.policies.smart_long.SmartLong(policy_config: Config)
Bases:
agent0.core.hyperdrive.policies.hyperdrive_policy.HyperdriveBasePolicyAgent that opens longs to push the fixed-rate towards the variable-rate.
- classmethod description() str
Describe the policy in a user friendly manner that allows newcomers to decide whether to use it.
- Returns:
A description of the policy.
- Return type:
str
- class Config
Bases:
agent0.core.hyperdrive.policies.hyperdrive_policy.HyperdriveBasePolicy.ConfigCustom config arguments for this policy.
- trade_chance: fixedpointmath.FixedPoint
The percent chance to open a trade.
- risk_threshold: fixedpointmath.FixedPoint
The upper threshold of the fixed rate minus the variable rate to open a long.
- trade_chance
- risk_threshold
- action(interface: agent0.ethpy.hyperdrive.HyperdriveReadInterface, wallet: agent0.core.hyperdrive.HyperdriveWallet) tuple[list[agent0.core.base.Trade[agent0.core.hyperdrive.HyperdriveMarketAction]], bool]
Implement a Long Louie user strategy
- Parameters:
interface (HyperdriveReadInterface) – Interface for the market on which this agent will be executing trades (MarketActions).
wallet (HyperdriveWallet) – The agent’s wallet.
- Returns:
A tuple where the first element is a list of actions, and the second element defines if the agent is done trading.
- Return type:
tuple[list[MarketAction], bool]