'This is called by the backtester or live trading architecture
to form the initial orders from the SignalEvent.
These orders are sized by the PositionSizer object and then
sent to the RiskManager to verify, modify or eliminate.
Once received from the RiskManager they are converted into
full OrderEvent objects and sent back to the events queue.'

def on_signal(self, signal_event):

    initial_order = self._create_order_from_signal(signal_event)
    sized_order = self.position_sizer.size_order(self.portfolio, initial_order)
    order_events = self.risk_manager.refine_orders(self.portfolio, sized_order)
    self._place_orders_onto_queue(order_events)
