Should I stay or should I go? An agent-based setup for a trading and monetary union