I've implemented extrapolation of trend based on Fourier analysis, and - as you can see below - depending on the range of data used for calculations, S&P500 will raise or fall:
Fig 1. Fourier extrapolation of S&P500 based on 100 daily quotations
Fig. 2 Fourier extrapolation of S&P500 based on 400 daily quotations
In both cases, Quinn-Fernandes algorithm for frequency estimation was used and 20 harmonics matched.
I adapted MQL5 (MetaStock) code of Extrapolator indicator written by qpwr. Thanks a lot!
(the code is not yet optimized for R)