def get_liquidity_report_data(data: dataBlob): all_liquidity_df = get_liquidity_data_df(data) all_liquidity_df = annonate_df_index_with_positions_held( data, all_liquidity_df) liquidity_report_data = dict(all_liquidity_df=all_liquidity_df) return liquidity_report_data
def table_of_last_price_updates(self): price = get_last_price_updates_as_df(self.data) price = annonate_df_index_with_positions_held(self.data, price) price_table = table("Status of adjusted price / FX price collection", price) return price_table
def table_of_sr_costs(self): SR_costs = self.SR_costs() SR_costs = SR_costs.round(5) SR_costs = annonate_df_index_with_positions_held(data=self.data, pd_df=SR_costs) formatted_table = table("SR costs (using stored slippage)", SR_costs) return formatted_table
def table_of_slippage_comparison(self): combined_df_costs = self.combined_df_costs() combined_df_costs = combined_df_costs.round(6) combined_df_costs = annonate_df_index_with_positions_held( self.data, pd_df=combined_df_costs) combined_df_costs_as_formatted_table = table("Check of slippage", combined_df_costs) return combined_df_costs_as_formatted_table
def get_table_of_SR_costs_as_formatted_table(data): table_of_SR_costs = get_table_of_SR_costs(data) table_of_SR_costs = table_of_SR_costs.round(5) table_of_SR_costs = annonate_df_index_with_positions_held( data=data, pd_df=table_of_SR_costs) formatted_table = table( "SR costs (using stored slippage): more than 0.01 means panic", table_of_SR_costs, ) return formatted_table
def get_costs_report_data(data: dataBlob, start_date: datetime.datetime, end_date: datetime.datetime) -> dict: combined_df_costs = get_combined_df_of_costs(data, start_date=start_date, end_date=end_date) combined_df_costs = combined_df_costs.round(6) combined_df_costs = annonate_df_index_with_positions_held( data=data, pd_df=combined_df_costs) table_of_SR_costs = get_table_of_SR_costs(data) table_of_SR_costs = table_of_SR_costs.round(5) table_of_SR_costs = annonate_df_index_with_positions_held( data=data, pd_df=table_of_SR_costs) costs_report_data = dict(combined_df_costs=combined_df_costs, start_date=start_date, end_date=end_date, table_of_SR_costs=table_of_SR_costs) return costs_report_data
def get_combined_df_of_costs_as_table(data: dataBlob, start_date: datetime.datetime, end_date: datetime.datetime): combined_df_costs = get_combined_df_of_costs(data, start_date=start_date, end_date=end_date) combined_df_costs = combined_df_costs.round(6) combined_df_costs = annonate_df_index_with_positions_held( data=data, pd_df=combined_df_costs) combined_df_costs_as_formatted_table = table("Check of slippage", combined_df_costs) return combined_df_costs_as_formatted_table
def get_liquidity_report_data(data: dataBlob) -> pd.DataFrame: all_liquidity_df = get_liquidity_data_df(data) all_liquidity_df = annonate_df_index_with_positions_held( data, all_liquidity_df) return all_liquidity_df