EventABC#
- class pams.events.EventABC(event_id, prng, session, simulator, name)[ソース]#
event base class (ABC class).
It defines what the event is. All events should inherit this class.
- abstract hook_registration()[ソース]#
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)[ソース]#
This method is hooked after order cancellations if you set the event hook.
- hooked_after_execution(simulator, execution_log)[ソース]#
This method is hooked after order executions if you set the event hook.
- パラメータ:
simulator (Simulator) -- simulator for reference.
execution_log (ExecutionLog) -- execution log.
- 戻り値の型:
None
- hooked_after_order(simulator, order_log)[ソース]#
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)[ソース]#
This method is hooked after session ends if you set the event hook.
- hooked_after_step_for_market(simulator, market)[ソース]#
This method is hooked at each step after market processing if you set the event hook.
- hooked_before_cancel(simulator, cancel)[ソース]#
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)[ソース]#
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)[ソース]#
This method is hooked before session beginnings if you set the event hook.