Ethan's Volatility Predictor - first push

Why do you have database config constants in this function? Put them in a single place. In fact, the only part of your program that needs these is the database connection so right a single function that connects to the database and put all this info there.