EventABC#
- class pams.events.EventABC(event_id, prng, session, simulator, name)[source]#
event base class (ABC class).
It defines what the event is. All events should inherit this class.
See also
- abstract hook_registration()[source]#
Define when this event should be hooked by simulator. This method is automatically hooked by simulator at the beginning of simulation. You must implement this.
- hooked_after_cancel(simulator, cancel_log)[source]#
This method is hooked after order cancellations if you set the event hook.
- hooked_after_execution(simulator, execution_log)[source]#
This method is hooked after order executions if you set the event hook.
- Parameters:
simulator (Simulator) – simulator for reference.
execution_log (ExecutionLog) – execution log.
- Return type:
None
- hooked_after_order(simulator, order_log)[source]#
This method is hooked after order placements if you set the event hook. Please be careful that the order haven’t yet been executed if it could be executed immediately.
- hooked_after_session(simulator, session)[source]#
This method is hooked after session ends if you set the event hook.
- hooked_after_step_for_market(simulator, market)[source]#
This method is hooked at each step after market processing if you set the event hook.
- hooked_before_cancel(simulator, cancel)[source]#
This method is hooked before order cancellations if you set the event hook. Please be careful that the cancel order haven’t yet been executed.
- hooked_before_order(simulator, order)[source]#
This method is hooked before order placements if you set the event hook. Please be careful that the order haven’t yet been accepted by markets and it could be leakage of order information.
- hooked_before_session(simulator, session)[source]#
This method is hooked before session beginnings if you set the event hook.