Agent Interface
StockMarketABM.AgentsBase defines the common interface (AbstractAgent, activate!, and update!) that every trading agent must implement. The scheduler invokes activate! each tick and optionally feeds back the resulting market events via update!.
StockMarketABM.AgentsBase.AbstractAgent — TypeAbstractAgentSupertype for all trading agents participating in the simulation. Concrete agents must implement activate! and may override update! to react to market events.
StockMarketABM.AgentsBase.ActivationDecision — TypeActivationDecisionStructured response from activate!. action holds the order or cancel request (or nothing to stay idle). next_activation can be set to an absolute timestamp to override the default scheduling; when left as nothing the simulation reuses the agent's configured interval.
StockMarketABM.AgentsBase.activate! — Methodactivate!(agent, market, now) -> ActivationDecisionCalled by the scheduler for every agent at discrete time now. The agent may observe market, update its internal state, and optionally return an order submission (OrderRequest), a cancellation (CancelRequest), or nothing to stay idle. The returned [ActivationDecision] can optionally specify the next activation timestamp; otherwise the scheduler falls back to the agent's default interval.
Legacy implementations that return an OrderRequest, CancelRequest, or nothing continue to work and are implicitly wrapped in an ActivationDecision with no custom scheduling.
StockMarketABM.AgentsBase.update! — Methodupdate!(agent, events)Hook invoked after the engine processes an agent's request. The default implementation ignores the events; agents that track outstanding orders can override it to keep their state in sync.