trader/core/portfolio/portfolio_handler.py
async def on_fill(self, fill_event):
        """
        This is called by the backtester or live trading architecture
        to take a FillEvent and update the Portfolio object with new
        or modified Positions.

        Upon receipt of a FillEvent, the PortfolioHandler converts
        the event into a transaction that gets stored in the Portfolio
        object. This ensures that the broker and the local portfolio
        are "in sync".
        """
        timestamp = fill_event.timestamp
        action = fill_event.action
        ticker = fill_event.ticker
        quantity = fill_event.quantity
        price = fill_event.price
        commission = fill_event.commission
        # Create or sell the position from the fill info
        self.portfolio.process_position(
            timestamp, action, ticker, quantity, price, commission
        )

        This is called by the backtester or live trading architecture
        to take a FillEvent and update the Portfolio object with new
        or modified Positions.

        Upon receipt of a FillEvent, the PortfolioHandler converts
        the event into a transaction that gets stored in the Portfolio
        object. This ensures that the broker and the local portfolio
        are "in sync".
        
This is called by the backtester or live trading architecture
to take a FillEvent and update the Portfolio object with new
or modified Positions.

Upon receipt of a FillEvent, the PortfolioHandler converts
the event into a transaction that gets stored in the Portfolio
object. This ensures that the broker and the local portfolio
are "in sync".
This is called by the backtester or live trading architecture to take a FillEvent and update the Portfolio object with new or modified Positions . Upon receipt of a FillEvent the PortfolioHandler converts the event into a transaction that gets stored in the Portfolio object . This ensures that the broker and the local portfolio are " in sync " .
async def on_fill(self, fill_event):
        timestamp = fill_event.timestamp
        action = fill_event.action
        ticker = fill_event.ticker
        quantity = fill_event.quantity
        price = fill_event.price
        commission = fill_event.commission
        self.portfolio.process_position(
            timestamp, action, ticker, quantity, price, commission
        )
async def on_fill ( self , fill_event ) : timestamp = fill_event . timestamp action = fill_event . action ticker = fill_event . ticker quantity = fill_event . quantity price = fill_event . price commission = fill_event . commission self . portfolio . process_position ( timestamp , action , ticker , quantity , price , commission )
This is called by the backtester or live trading architecture
to take a FillEvent and update the Portfolio object with new
or modified Positions.
This is called by the backtester or live trading architecture to take a FillEvent and update the Portfolio object with new or modified Positions .
"""
        This is called by the backtester or live trading architecture
        to take a FillEvent and update the Portfolio object with new
        or modified Positions.

        Upon receipt of a FillEvent, the PortfolioHandler converts
        the event into a transaction that gets stored in the Portfolio
        object. This ensures that the broker and the local portfolio
        are "in sync".
        """ # Create or sell the position from the fill info
self
fill_event