public void printMarketInformation(){
        if (Main.DEBUGGING) {
            System.out.println("Trading cycle: " + marketCycle);
            System.out.println("______________________");
            System.out.println("Current market prices:");
        }
        String marketcsvline = "";
        String entitiescsvline = "";
        for (Commodity commodity : commodities){
            if(Main.DEBUGGING) 
            	System.out.println(commodity.name + ": " + commodity.marketprice);
            marketcsvline = marketcsvline + commodity.marketprice + ",";
            entitiescsvline = entitiescsvline + commodity.consumption + ",";
        }
        double budgetvar = budgetVariance();
        entitiescsvline = entitiescsvline + budgetvar;

        if(Main.DEBUGGING)
        	System.out.println("Current budgets:");
		for (Agent agent : agents) {
			if(Main.DEBUGGING)
				System.out.println("Agent: " + agent.name + " with Budget: " + GraphingData.roundToDecimals(agent.budget,2));
			if (agent.name.contains("Citizen"))
				budgetSumProducers += agent.budget;
			else if (agent.name.contains("culat")) {
                budgetSumSpeculators += agent.budget;
            } else {
                budgetSumMinMaxers += agent.budget;
            }

		}

        try {
            marketBufferedWriter.write(marketcsvline.substring(0, marketcsvline.length() - 1));
            commoditiesBufferedWriter.write(entitiescsvline);
            marketBufferedWriter.newLine();
            marketBufferedWriter.flush();
            commoditiesBufferedWriter.newLine();
            commoditiesBufferedWriter.flush();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }