caching and quarterly support for macrotrends interface
Originally I was trying to add support for quarterly statements when I realized there was a url parameter for the frequency. Passing the frequency was difficult because of the fact that the code is architected with properties and attributes. So I had to rework the code to accomodate the parameter using different function signatures, and preserved the original signature to work with Annual statements as it always did. In the process of testing the code, I saw the API being called multiple times; each time the attribute was operated on. So I noticed that the Finviz was using a cache, and I enhanced Macrotrends Interface to use same cache approach. Lastly, I noticed that the cash flow statement was returning multiple identical columns, so I added a bit of code (just on Cash Flow Statement) to remove duplicate columns.
After testing the initial changes I made, I noticed that when I made the calls to the url with freq=Q, annual statements were still coming down. After some testing (and luck), I managed to learn that by stubbing TBD into the url mnemonic was causing only annual statements to work. The mnemonics apparently are NOT the SEC company names, so I had to change the code to get the mnemonic (a cache file is checked first before going upstream to get it) before making the call to get the statements so they would fetch properly for both annual and quarterly. So - the mnemonic was added to the Ticker object, caches were added for the statements and the mnemonics, and the code to fetch the statements was changed to fetch from a javascript var rather than trying to pull a table.