ArbitrageAgent#

class pams.agents.ArbitrageAgent(agent_id, prng, simulator, name, logger=None)[source]#

Arbitrage Agent class.

This class inherits from the HighFrequencyAgent class. Arbitrage agent mainly aimed to take arbitrage chance between spot markets and its index market.

Note

Currently, index markets must have the same weight for each constitutional stock.

setup(settings, accessible_markets_ids, *args, **kwargs)[source]#

agent setup. Usually be called from simulator/runner automatically.

Parameters:
  • settings (Dict[str, Any]) – agent configuration. Usually, automatically set from json config of simulator. This must include the parameters “orderVolume”, “orderThresholdPrice”. This can include the parameter “orderTimeLength”.

  • accessible_markets_ids (List[int]) – list of market IDs.

Return type:

None

Returns:

None

submit_orders(markets)[source]#

submit orders to take arbitrage chance. :rtype: List[Union[Order, Cancel]]