def apply_settlement(self):
    env = Environment.get_instance()
    data_proxy = env.data_proxy
    trading_date = env.trading_dt.date()
    settle_price = data_proxy.get_settle_price(self.order_book_id, trading_date)
    self._buy_old_holding_list = [(settle_price, self.buy_quantity)]
    self._sell_old_holding_list = [(settle_price, self.sell_quantity)]
    self._buy_today_holding_list = []
    self._sell_today_holding_list = []
    self._buy_transaction_cost = 0.0
    self._sell_transaction_cost = 0.0
    self._buy_realized_pnl = 0.0
    self._sell_realized_pnl = 0.0
def apply_settlement(self):
    env = Environment.get_instance()
    data_proxy = env.data_proxy
    trading_date = env.trading_dt.date()
    settle_price = data_proxy.get_settle_price(self.order_book_id, trading_date)
    self._buy_old_holding_list = [(settle_price, self.buy_quantity)]
    self._sell_old_holding_list = [(settle_price, self.sell_quantity)]
    self._buy_today_holding_list = []
    self._sell_today_holding_list = []
    self._buy_transaction_cost = 0.0
    self._sell_transaction_cost = 0.0
    self._buy_realized_pnl = 0.0
    self._sell_realized_pnl = 0.0