We study for the first time the effect of the geometry of quantum wire networks on their nonlinear optical properties and show that for some geometries, the first hyperpolarizability is largely enhanced and the second hyperpolarizability is always negative or zero. We use a one-electron model with tight transverse confinement. In the limit of infinite transverse confinement, the transverse wavefunctions drop out of the hyperpolarizabilities, but their residual effects are essential to include in the sum rules. The effects of geometry are manifested in the projections of the transition moments of each wire segment onto the 2-D lab frame. Numerical optimization of the geometry of a loop leads to hyperpolarizabilities that rival the best chromophores. We suggest that a combination of geometry and quantum-confinement effects can lead to systems with ultralarge nonlinear response.