The implementation of ideal ballooning stability within an optimization cod
e is used to determine stable, moderate-beta compact stellarator configurat
ions. Due to the large computational requirements of existing ballooning co
des, such calculations within the optimization process were previously impr
actical. The recently developed COBRA code can efficiently compute ideal ba
llooning growth rates on various magnetic surfaces, using the VMEC code to
supply equilibrium data. The optimization code has been used to minimize th
ese growth rates, giving rise to new stellarator configurations at low aspe
ct ratios with good ballooning stability properties, which also maintain pr
eviously determined desirable physics properties. This particular implement
ation is robust due to the enhanced convergence features included in COBRA,
while incurring only a small overhead on the total computational time.