Seriously, I would avoid trying to manage a running sum in a query.
Try to work with an opening balance, a closing balance, and the transaction total (ie - the difference)
Data in a RDB doesn't work in a way that easily processes a running balance, and it's easier to do what the database IS good at.
eg -why do you think the running balance is critical?