Explain the use of time series forecasting

Explain the use of time series forecasting in relation to market analysis and give an example to illustrate your answer.