The following code blocks are based on the time series momentum strategy, tsmom, as illustrated in the 2011, moskowitz, ooi and pedersen paper.
Time series with momentum indicates the value tends to keep going up or down (relative to trend) depending on the immediate past. Series with mean-reversion indicates it will go up (or down) if it has gone down (or up) in the immediate past. This can be found by examining the coefficients of the arima model. This provides more insight into the process and builds intuition.
the facebook prophet package was released in 2017 for python and r, and data scientists around the world rejoiced. Prophet is designed for analyzing time series with daily observations that display patterns on different time scales.
creating a time series model in python allows you to capture more of the complexity of the data and includes all of the data elements that might be important. It also makes it possible to make adjustments to different measurements, tuning the model to make it potentially more accurate.
Build a time series momentum strategy for oanda by following this guide httpswww. The jupyter notebooks in this repository demonstrate the v1 and v20 api differences.
Time series momentum is related to, but different from the phenomenon known as momentum in the finance literature, which is primarily cross-sectional in nature. The momentum literature focuses on the relative performance of securities in the cross section, finding that securities that recently outperformed their peers over the past 3 to 12 months continue to do so on average over the next month. Rather than focus on the relative returns of securities in the cross section, this time.