aboutsummaryrefslogtreecommitdiffstats
path: root/python/collateral
diff options
context:
space:
mode:
Diffstat (limited to 'python/collateral')
-rw-r--r--python/collateral/baml_isda.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/collateral/baml_isda.py b/python/collateral/baml_isda.py
index cfdb0317..c5d03c12 100644
--- a/python/collateral/baml_isda.py
+++ b/python/collateral/baml_isda.py
@@ -158,6 +158,8 @@ def collateral(d, dawn_trades, *, fund="Serenitas", **kwargs):
except StopIteration:
raise ValueError(f"no collateral data for date {report_date}")
df = pd.read_excel(fname, skiprows=6, skipfooter=6)
+ if df.empty:
+ raise ValueError("empty collateral file")
df = df.drop(0, axis=0)
try:
collateral = float(df.Notional)