Menu Home

Returning to Tides

Fred Viole shared a great “data only” R solution to the forecasting tides problem.


The methodology comes from a finance perspective, and has some great associated notes and articles.

This gives me a chance to comment on the odd relation between prediction and profit in finance.

If there really was a trade-able item with low trade costs and the pattern of the tides: then there would be little point in predicting this security. One would already have a very profitable strategy in some variation of “buy below 2, and sell above 5” (or some variation of that based on slowly moving historic quantiles). For trading strategies we don’t so much want to predict all prices changes, but instead identify trade opportunities. A trading model at its very crudest is perhaps a time series of the symbols: “buy opportunity”, “sell opportunity”, and “no opinion”. And not a system that is required to reliably predict future prices from all time-periods. For example: if we have no net-position or holdings we can tolerate “don’t know” from a prediction algorithm.

However, I really like the “demonstrate solving a presumably easy problem” (such as tides or sunspots) before tackling a hostile one (such as equity prices).

Categories: Tutorials

Tagged as:


Data Scientist and trainer at Win Vector LLC. One of the authors of Practical Data Science with R.