Added the first function and associated helper functions borrowed from quantmod.

Updated the namespace file to export all function names not beginning with a .