An upper bound for self-complementary balanced codes is presented in this paper. We give a characterization for self-complementary balanced codes meeting this upper bound. We show that the existence of certain quasi-symmetric designs implies the existence of such optimal self-complementary balanced codes.