def pnl_search(self, asset_manager_id, pnl_type, business_date,<EOL>**kwargs):
self.logger.info('<STR_LIT>' %(asset_manager_id, business_date))<EOL>url = '<STR_LIT>' % (self.endpoint, asset_manager_id)<EOL>search_params = {'<STR_LIT>': pnl_type,<EOL>'<STR_LIT>': business_date.isoformat()}<EOL>for param_key, param_val in kwargs.items():<EOL><INDENT>if not param_val:<EOL><INDENT>continue<EOL><DEDENT>search_params[param_key] = '<STR_LIT:U+002C>'.join(param_val) if isinstance(param_val, list) else param_val<EOL><DEDENT>response = self.session.get(url, params=search_params)<EOL>if response.ok:<EOL><INDENT>json_body = response.json()<EOL>results = json_body.get('<STR_LIT>')<EOL>next_hash_key = json_body.get('<STR_LIT>')<EOL>next_range_key = json_body.get('<STR_LIT>')<EOL>pnls = [json_to_pnl(pnl_json) for pnl_json in results]<EOL>self.logger.info('<STR_LIT>', len(pnls))<EOL>return next_hash_key, next_range_key, pnls<EOL><DEDENT>else:<EOL><INDENT>self.logger.error(response.text)<EOL>response.raise_for_status()<EOL><DEDENT>
Search pnl records.

Args:
    asset_manager_id (int): id of asset manager owning the pnl records
    pnl_type (str): either "Position" or "Transaction
    business_date (date): date of the pnl records to return
    book_ids (list): book id filter on pnl records
    asset_ids (list): asset id filter on pnl records
    transaction_ids (list): transactino id filter on pnl records
    next_hash_key (str): continuation hash key for paging the results
    next_range_key (str): continuation range key for paging the results
    page_size (int): the number of results to return