Tighten benchmark mutation leakage test

This commit is contained in:
2026-04-07 16:34:35 +08:00
parent 26937f035e
commit 507565c556

View File

@@ -348,6 +348,11 @@ class LocalFactorConstructionTests(unittest.TestCase):
changed.loc[:comparison_end, "MKT"], changed.loc[:comparison_end, "MKT"],
check_names=False, check_names=False,
) )
proxy_columns = ["SMB_PROXY", "HML_PROXY", "RMW_PROXY", "CMA_PROXY"]
pd.testing.assert_frame_equal(
original.loc[:, proxy_columns],
changed.loc[:, proxy_columns],
)
self.assertGreater( self.assertGreater(
(original.loc[future_start:, "MKT"] - changed.loc[future_start:, "MKT"]).abs().sum(), (original.loc[future_start:, "MKT"] - changed.loc[future_start:, "MKT"]).abs().sum(),
0.0, 0.0,