aboutsummaryrefslogtreecommitdiffstats
path: root/python/pnl_explain.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/pnl_explain.py')
-rw-r--r--python/pnl_explain.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/pnl_explain.py b/python/pnl_explain.py
index 0be46854..25af238e 100644
--- a/python/pnl_explain.py
+++ b/python/pnl_explain.py
@@ -4,7 +4,7 @@ import pandas as pd
from db import dbengine
from dates import bus_day, imm_dates, yearfrac
-def get_daycount(identifier, engine = dbengine("dawndb")):
+def get_daycount(identifier, engine=dbengine("dawndb")):
""" retrieve daycount and paydelay for a given identifier"""
conn = engine.raw_connection()
with conn.cursor() as c:
@@ -19,7 +19,7 @@ def get_daycount(identifier, engine = dbengine("dawndb")):
return a, b
def pnl_explain(identifier, start_date = None, end_date = None,
- engine = dbengine("dawndb")):
+ engine=dbengine("dawndb")):
""" if start_date is None, pnl since inception"""
trades = pd.read_sql_query("SELECT * FROM bonds where identifier=%s", engine,
params=(identifier,), parse_dates=['trade_date', 'settle_date'])