 	}
 }
 
+enum CooprActionType:String
+{
+	case SPLIT = "SPLIT"
+	case DIVIDEND = "DIVIDEND"
+}
+
+struct CoorpAction:Printable
+{
+	let date:NSDate
+	let type:CooprActionType
+	let value:Double
+	
+	var description:String
+		{
+			let vstr = String(format:"%.6f", value)
+			return "\(Int(date.timeIntervalSince1970))-\(vstr)-\(type.rawValue)"
+	}
+}
+
+func createActionMap(list:[CoorpAction]?, #formatter:NSDateFormatter)->[String:CoorpAction]
+{
+	var map:[String:CoorpAction] = [:]
+	if list == nil
+	{
+		return map
+	}
+	
+	for i in 0..<list!.count
+	{
+		let key = formatter.stringFromDate(list![i].date)
+		map[key] = list![i]
+	}
+	
+	return map
+}
+
 func parseQuote(rawlist:[String])
 {
 	var ready = false

	}
}

if !all
{
	fetchQuote(getQuoteRequest(ticket, interval: interval, numOfDays: numOfDays, exchange:exchange))

	static let VOLUME = "VOLUME"
}

struct StockExchange
{
	struct ExchangeInfo
	{
		let name:String
		let abbr:String
	}
	
	static let NASDAQ = ExchangeInfo(name: "NASDAQ", abbr: "NASQ")
	static let NYSE = ExchangeInfo(name: "NYSE", abbr: "NYSE")
	static let HKG = ExchangeInfo(name: "HKG", abbr: "HK")
	static let SHA = ExchangeInfo(name: "SHA", abbr: "SS")
	static let SHE = ExchangeInfo(name: "SHE", abbr: "SZ")
}

func formatQuote(text:String)->String
{
	let value = NSString(string: text).doubleValue
