diff options
Diffstat (limited to 'python/cds_curve.py')
| -rw-r--r-- | python/cds_curve.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python/cds_curve.py b/python/cds_curve.py index 69ae8623..2b321e59 100644 --- a/python/cds_curve.py +++ b/python/cds_curve.py @@ -57,12 +57,12 @@ if __name__ == "__main__": if args.latest: with conn.cursor() as c: - c.execute("SELECT min(date) FROM index_quotes WHERE index=%s AND series=%s " - "AND tenor in ('3yr', '5yr', '7yr', '10yr') AND " - "duration2 is NULL", (index, series)) + c.execute("SELECT max(date) FROM index_quotes_pre " + "RIGHT JOIN index_risk2 USING (id) " + "WHERE index=%s AND series=%s " + "AND tenor in ('3yr', '5yr', '7yr', '10yr')", + (index, series)) start_date, = c.fetchone() - if start_date is None: - sys.exit(0) else: start_date = None |
