diff options
Diffstat (limited to 'python/pnl_explain.py')
| -rw-r--r-- | python/pnl_explain.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python/pnl_explain.py b/python/pnl_explain.py index f5013514..6dec160c 100644 --- a/python/pnl_explain.py +++ b/python/pnl_explain.py @@ -1,7 +1,7 @@ import datetime import pandas as pd -from serenitas.analytics.config import Config +from serenitas.analytics.config import C from serenitas.analytics.dates import bus_day, prev_business_day, next_business_day from serenitas.analytics.utils import get_fx from serenitas.analytics.api import FxForward @@ -37,7 +37,7 @@ def get_index_pv( accrued = 0.0 for t in portf.trades: _, amount = t._fee_leg.cashflows[0] - if not Config.local: + if not C.local: amount *= get_fx(prev_day, t.currency) accrued -= amount * t.notional * t.factor * t.fixed_rate * 1e-4 else: @@ -55,7 +55,7 @@ def get_index_pv( conn.reset() raise e for (fee, curr) in c: - if not Config.local: + if not C.local: fee *= get_fx(prev_day, curr) nav += fee upfronts.append(nav) @@ -441,8 +441,8 @@ if __name__ == "__main__": from serenitas.utils.db import dbconn from itertools import chain - Config.local = False - Config.include_todays_cashflows = True + C.local = False + C.include_todays_cashflows = True dawndb = dbconn("dawndb") parser = argparse.ArgumentParser() |
