diff --git a/sysdata/csv/csv_spread_costs.py b/sysdata/csv/csv_spread_costs.py index a2b4a3c46b..047de14b8c 100644 --- a/sysdata/csv/csv_spread_costs.py +++ b/sysdata/csv/csv_spread_costs.py @@ -72,7 +72,7 @@ def get_commissions_as_series(self) -> pd.Series: try: spread_cost_data.index = spread_cost_data[INSTRUMENT_COLUMN_NAME] - spread_cost_series = spread_cost_data[] + spread_cost_series = spread_cost_data[SPREAD_COST_COLUMN_NAME] except BaseException: raise Exception("Badly configured file %s" % (self._config_file)) diff --git a/sysproduction/data/broker.py b/sysproduction/data/broker.py index 937120122a..0b56c17de8 100644 --- a/sysproduction/data/broker.py +++ b/sysproduction/data/broker.py @@ -102,13 +102,6 @@ def broker_futures_contract_commission(self) -> brokerFuturesContractCommissionD def diag_controls(self) -> diagControlProcess: return self._diag_controls - def get_commission_for_contract_in_base(self, contract: futuresContract) -> float: - currency_data = dataCurrency(self.data) - ccy_value = self.broker_futures_contract_commission.get_commission_for_contract(contract) - base_value = currency_data.currency_value_in_base(ccy_value) - - return base_value - ## Methods def get_commission_for_contract(self, contract: futuresContract) -> currencyValue: diff --git a/sysproduction/reporting/data/commissions.py b/sysproduction/reporting/data/commissions.py index 6792a1e314..2cf8995992 100644 --- a/sysproduction/reporting/data/commissions.py +++ b/sysproduction/reporting/data/commissions.py @@ -11,7 +11,7 @@ def df_of_configure_and_broker_block_cost_with_ratio_sorted(data: dataBlob) -> pd.DataFrame: df = df_of_configure_and_broker_block_cost(data) - ratio = df[BROKER_COLUMN] / df[CONFIGURED_COLUMN] + diff = df[BROKER_COLUMN] - df[CONFIGURED_COLUMN] df[RATIO_COLUMN] = ratio df.sort_values(by=RATIO_COLUMN)