How the shelf life period of drug products(formulation products ) will be decided?

Dear all
how the shelf life period of drug products(formulation products ) will be decided?in what way the shelf life period of API and other ingredient decides the shelf life of formulation product.
Pl clarify
thanks

refer WHO guideline on stability testing.