public void UpdateProfitRecord(String date, String market, String code, double amount, double profit, boolean is_out) {
		String key = date + " " + market + " " + code;
		
		if (!profit_record.containsKey(key)) {
			ProfitRecord pr = new ProfitRecord();
			pr.base = amount;
			if (is_out) {
				pr.result = profit;
			}
			else {
				pr.max = profit;
			}
			profit_record.put(key, pr);
		}
		else {
			ProfitRecord pr = profit_record.get(key);
			if (is_out) {
				pr.result = profit;
				profit_record.put(key, pr);
			}
			else {
				if (profit > pr.max) {
					pr.max = profit;
					profit_record.put(key, pr);
				}
			}
		}
	}