alpheast.handlers.simulated_execution_handler module

class alpheast.handlers.simulated_execution_handler.SimulatedExecutionHandler(event_queue, transaction_cost_percent=Decimal('0.001'), slippage_percent=Decimal('0.0005'))[source]

Bases: ExecutionHandler

A concrete execution handler that simulates order execution. It simulates slippage for market orders and considers high/low for limit orders.

on_market_event(event)[source]

Updates the internal cache of the latest market prices based on incoming MarketEvents.

on_order_event(event)[source]

Processes an OrderEvent and, upon successfuly simulation, generates a FillEvent and puts it onto the event queue.

reset()[source]

Resets current open orders

push_failed_fill_event(order)[source]