Threshold models have been widely applied in economics. However it is restrictive to assume that the threshold values are stable or time-invariant. This paper proposes a threshold model with a time-varying threshold, where the time-varying threshold is approximated by Fourier transformation. A least-square based procedure is proposed to estimate the model parameters, and two statistics are constructed to test for the threshold effect and threshold constancy. The convergence rate and asymptotic distribution of the time-varying threshold estimators are also established, and Monte-Carlo experiments are conducted to examine the finite properties of the estimation procedure and test statistics. We also provide the evidence in support of that the estimated slopes in sub-samples are biased when the threshold is time-varying but being treated as a constant.