    def run(self, as_of: date, **kwargs) -> pd.DataFrame:
        """
        Main entry point for running calibration

        Args:
            as_of: The as of date for the calibration
            **kwargs: key-word arguments - `start_date` and `end_date` are the only ones implemented

        Returns:
            pd.DataFrame of the summary
        """
        contracts_with_fee = self.get_calibration_input(as_of, **kwargs)

        df = format_pricing_calibration(
            pd.DataFrame(contracts_with_fee),
            # remove_outliers=not self.config.mock_results,
            remove_outliers=True,
        )

        df_calibration, adj_calibration = self.run_calibration(
            df, cap_level=self.calibration_cap, floor_level=self.calibration_floor
        )
        print(adj_calibration)

        if adj_calibration is None:
            LOGGER.warning(
                f"Missing adjustment factor calibration for {self.config.calibration_id} - skipping upload to S3"
            )
        else:
            if self.config.mock_results:
                # Needed to pass pydantic model validation for CalibrationDate
                adj_calibration["AdjustmentFactor"] = adj_calibration[
                    "AdjustmentFactor"
                ].apply(lambda x: min(x, 1.5))

            self.handle_calibration_results(df_calibration, adj_calibration, as_of)

            calibration_data = CalibrationData(
                id=self.config.calibration_id,
                adjustment_factors=adj_factor_to_json(adj_calibration),
                calibration_date=as_of.strftime(DATE_FORMAT),
                uploaded_time=datetime.utcnow(),
            )
            print(calibration_data)
            # self.write_calibration_to_mongo(calibration_data)

        return df_calibration

Refactor this function