This all depends on your axis rolls and locations. If your octahedral is pointing up then the local Y is up and down instead the world Z. The work around is a parent bone for your torso to move up and down.
Hierarchy is similar to a root bone but for your chest, spine, and hips. Meaning that the hips and spine connects to that parent bone. I severely recommend a rigging tutorial for blender so you can grasp a little of what happens, why it does, and how to better yourself with rigging.
This parent bone is usually called the torso in the Rigify rig once the rig is generated. Another name for this parent is called a control bone. Its a very helpful bone when using the graph editor. Your local/world locations on your hips maybe okay but once you try polishing your animation then it will become difficult. Why? The hips usually are rotated to accommodate the natural spine curve to a spinal column. So locations are set Z, X, and Y once you move it forward and backward a few times. To polish this would take way too much time because to move forward locally you need to polish “both” Z and Y at the same time. The parent bone, torso, allows you to polish much more effectively in the graph editor. This type of parent bone is also extremely helpful with feet as well.
This is coming from my experience with game rigging animation and short production rigging animation.