def generate_history_url

				url = 'http://ichart.finance.yahoo.com/table.csv?s=%s&a=%s&b=%s&c=%s&d=%s&e=%s&f=%s&g=%s&ignore=.csv' % [
					@symbol,
					@start_date.to_date.month - 1,
					@start_date.to_date.day,
					@start_date.to_date.year,
					@end_date.to_date.month - 1,
					@end_date.to_date.day,
					@end_date.to_date.year,
					TYPE_CODES_ARRAY[@type]
				]

				return url
			end
def generate_history_url

				url = 'http://ichart.finance.yahoo.com/table.csv?s=%s&a=%s&b=%s&c=%s&d=%s&e=%s&f=%s&g=%s&ignore=.csv' % [
					@symbol,
					@start_date.to_date.month - 1,
					@start_date.to_date.day,
					@start_date.to_date.year,
					@end_date.to_date.month - 1,
					@end_date.to_date.day,
					@end_date.to_date.year,
					TYPE_CODES_ARRAY[@type]
				]

				return url
			end
History URL generator

 Generating URL for various types of requests within stocks.

 Using Yahoo Finance
 http://ichart.finance.yahoo.com/table.csv?s=%s&a=%s&b=%s&c=%s&d=%s&e=%s&f=%s&g=%s&ignore=.csv

 s = stock symbol

 Period start date
 a = start month
 b = start day
 c = start year

 Period end date
 d = end month
 e = end day
 f = end year

 g = type
 Type values allowed: 'd' for daily (the default), 'w' for weekly, 'm' for monthly and 'v' for dividends.