With the ups and downs mortgage rates have had in the past few months, now is a good time to take a look at some factors behind how your mortgage rate is decided.