Hi,
I have attached a spreadsheet which i normally use to clean and audit some price data. The steps are as follows:
1) download data (date, open, high, low, close) into excel. each worksheet corresponds to a different security
2) Phase 1 clean - takes out all data that is rendered "#N/A N/A" and replaces it with the best previous usable data value
3) Using a simple Z-score test looking backwards and forwards to get rid of any bad data points (e.g. 40,42,43,75,42 --> would lead to taking out 75 and replacing with 43; same would occur with small numbers like 15,16,15.5,2,15.8,15.9 ---> would lead to 2 be replaced by 15.5
4) final cleaned data is re-constructed with date.
These elements are placed are viewable on attached excel sheet.
I would like assistance in creating a loop which will do all of the above on each worksheet tab (ws) from 0 to N.
I am having troubles creating the loop - so any direction or assistance would be greatly appreciated.
Many thanks!!
Bookmarks