agent0.core.hyperdrive.policies.lpandarb_test
Test the ability of bots to hit a target rate.
Attributes
Functions
Create interactive hyperdrive. |
|
|
Create Arbitrage Andy interactive hyperdrive agent used to arbitrage the fixed rate to the variable rate. |
Create Arbitrage Andy interactive hyperdrive agent used to arbitrage the fixed rate to the variable rate. |
|
|
Create manual interactive hyperdrive agent used to manually move markets. |
|
Open a long to hit the target rate. |
|
Open a short to hit the target rate. |
|
Close a long to hit the target rate. |
|
Already at target, do nothing. |
|
Reduce a long position. |
|
Reduce a short position. |
|
Test that the agent doesn't overextend itself. |
|
Test that the agent doesn't overextend itself. |
|
Don't touch the matured long. |
|
Don't touch the matured short. |
Module Contents
- agent0.core.hyperdrive.policies.lpandarb_test.TRADE_AMOUNTS = [0.003, 10000000.0]
- agent0.core.hyperdrive.policies.lpandarb_test.PRECISION
- agent0.core.hyperdrive.policies.lpandarb_test.YEAR_IN_SECONDS = 31536000
- agent0.core.hyperdrive.policies.lpandarb_test.interactive_hyperdrive(fast_chain_fixture: agent0.core.hyperdrive.interactive.LocalChain) agent0.core.hyperdrive.interactive.LocalHyperdrive
Create interactive hyperdrive.
- Parameters:
fast_chain_fixture (LocalChain) – Local chain fixture.
- Returns:
Interactive hyperdrive.
- Return type:
InteractiveHyperdrive
- agent0.core.hyperdrive.policies.lpandarb_test.arbitrage_andy(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive) agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent
Create Arbitrage Andy interactive hyperdrive agent used to arbitrage the fixed rate to the variable rate.
- Parameters:
interactive_hyperdrive (InteractiveHyperdrive) – Interactive hyperdrive.
- Returns:
Arbitrage Andy interactive hyperdrive agent.
- Return type:
InteractiveHyperdriveAgent
- agent0.core.hyperdrive.policies.lpandarb_test.create_arbitrage_andy(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive) agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent
Create Arbitrage Andy interactive hyperdrive agent used to arbitrage the fixed rate to the variable rate.
- Parameters:
interactive_hyperdrive (InteractiveHyperdrive) – Interactive hyperdrive.
- Returns:
Arbitrage Andy interactive hyperdrive agent.
- Return type:
InteractiveHyperdriveAgent
- agent0.core.hyperdrive.policies.lpandarb_test.manual_agent(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive) agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent
Create manual interactive hyperdrive agent used to manually move markets.
- Parameters:
interactive_hyperdrive (InteractiveHyperdrive) – Interactive hyperdrive.
- Returns:
Manual interactive hyperdrive agent.
- Return type:
InteractiveHyperdriveAgent
- agent0.core.hyperdrive.policies.lpandarb_test.test_open_long(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive, trade_amount: float, arbitrage_andy: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent, manual_agent: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent)
Open a long to hit the target rate.
- agent0.core.hyperdrive.policies.lpandarb_test.test_open_short(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive, trade_amount: float, arbitrage_andy: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent, manual_agent: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent)
Open a short to hit the target rate.
- agent0.core.hyperdrive.policies.lpandarb_test.test_close_long(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive, trade_amount: float, arbitrage_andy: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent, manual_agent: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent)
Close a long to hit the target rate.
- agent0.core.hyperdrive.policies.lpandarb_test.test_already_at_target(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive, arbitrage_andy: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent)
Already at target, do nothing.
- agent0.core.hyperdrive.policies.lpandarb_test.test_reduce_long(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive, arbitrage_andy: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent)
Reduce a long position.
- agent0.core.hyperdrive.policies.lpandarb_test.test_reduce_short(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive, arbitrage_andy: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent)
Reduce a short position.
- agent0.core.hyperdrive.policies.lpandarb_test.test_safe_long_trading(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive, manual_agent: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent)
Test that the agent doesn’t overextend itself.
- agent0.core.hyperdrive.policies.lpandarb_test.test_safe_short_trading(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive, manual_agent: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent)
Test that the agent doesn’t overextend itself.
- agent0.core.hyperdrive.policies.lpandarb_test.test_matured_long(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive, arbitrage_andy: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent)
Don’t touch the matured long.
- agent0.core.hyperdrive.policies.lpandarb_test.test_matured_short(interactive_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive, arbitrage_andy: agent0.core.hyperdrive.interactive.local_hyperdrive_agent.LocalHyperdriveAgent)
Don’t touch the matured short.