O'Reilly logo

Mastering Python for Finance by James Ma Weiming

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a trend-following forex trading platform

Suppose from the forex tick data collected, we resample the time series at regular intervals. The average of prices over a reasonably short time period and long time period are calculated. The beta of the price series is taken as the ratio of the short-term average prices to the long-term average prices. In price series, where there is no trend, the ratio is 1—short-term prices are equal to the long-term prices. When prices are on an uptrend, the short-term prices are higher than the long-term average price levels and the beta is more than 1. Conversely, when prices are on a downtrend, the beta is less than 1.

In this section, we will discuss the implementation of a trend-following trading system ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required