honestly, I wish the ConnectionContext and TransactionExecutor classes were in use here.  With those classes the connection semantics (opening, closing, sharing, commit, rollback) are all handled automatically and your code doesn't have to consider any of these issues.  

your code would look like this with no try block, no making a connection, no closing the connection, etc:
```self.TransactionExecutor(tcbs.twoPeriodTopCrasherComparison, params)```