{"action":"opened","issue":{"url":"https://api.github.com/repos/gc-cmsc495/PythonBacktester/issues/1","labels_url":"https://api.github.com/repos/gc-cmsc495/PythonBacktester/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/gc-cmsc495/PythonBacktester/issues/1/comments","events_url":"https://api.github.com/repos/gc-cmsc495/PythonBacktester/issues/1/events","html_url":"https://github.com/gc-cmsc495/PythonBacktester/issues/1","id":94495337,"number":1,"title":"DataManager should not be a Quote Object","user":{"login":"gc-cmsc495","id":12885796,"avatar_url":"https://avatars.githubusercontent.com/u/12885796?v=3","gravatar_id":"","url":"https://api.github.com/users/gc-cmsc495","html_url":"https://github.com/gc-cmsc495","followers_url":"https://api.github.com/users/gc-cmsc495/followers","following_url":"https://api.github.com/users/gc-cmsc495/following{/other_user}","gists_url":"https://api.github.com/users/gc-cmsc495/gists{/gist_id}","starred_url":"https://api.github.com/users/gc-cmsc495/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gc-cmsc495/subscriptions","organizations_url":"https://api.github.com/users/gc-cmsc495/orgs","repos_url":"https://api.github.com/users/gc-cmsc495/repos","events_url":"https://api.github.com/users/gc-cmsc495/events{/privacy}","received_events_url":"https://api.github.com/users/gc-cmsc495/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-11T18:04:11Z","updated_at":"2015-07-11T18:04:11Z","closed_at":null,"body":"The DataManager manages to the quotes.  In its init, it should only determine the date ranges.  Therefore you want a signature like:\r\n\r\ndef __init__(self,start_date,end_date,max_indicator_length,max_markout_length,calendar_file_name):\r\n\r\nThen the DataManager will load from file the calendar. If the calendar file doesn't exist, then fetch all dates for GE from Yahoo and save the list of dates to calendar_file_name.\r\n\r\nNext verify that start_date and end_date are valid, start_date < end_date, and that they exist in the calendar, and then find their locations in the calendar.\r\n\r\nNext, use max_indicator_length to go back in time from start date to determine earliest date needed so that indicators have values of start_date.  For example, if the start_date is 20140711 and max_indicator_length is 10.  You lookup the start_date 20140711 and find it's array index is 215 (I'm making this up).  Then the earliest date must but calendar_dates[215 - 10] which equals 20140626.\r\n\r\nDo the same with max_markout_length, but go forward in time.\r\n\r\nThrow an exception or exit or something if start_date - max_indicator_length or end_date + max_markout_length is out of bounds.\r\n\r\nCreate a hash that has key=symbol and value=Quote\r\n\r\nCreate a method called get(symbol, field, date,periods)\r\n\r\nIn get(), first check the hash to see if you have already fetched the quotes, if not, fetch them then save to the hash.  (Note that a single ticker may take up to 500k-1Mb of RAM).\r\n\r\nReturn a list of the fields for the days requested."}}