Fix history for long histories

So there was an issue where if the history went back 10 years but the stock only went back 5 years the nodataforstock error would be raised in the first year of getting the histories. 

I don't really like it, but it works this way (moved the error catching into the block for each year and only if it meets the criteria of really being a nodataforstock error will it raise)