Title

Quantitative Momentum Strategy for Picking Top FTSE Stocks

Author

    Shadab Hussain
    Developer Advocate

Last Updated: Jan 2026

With tens of thousands of stocks to choose from, how do we go about selecting a few worth buying? Stock news, uncertainty and emotions add to the bitterness of this process. Whatever some experts suggest, it is impossible to go through all balance sheets to identify companies with low net debt and improving net profit margins.

This article uses a simple quantitative momentum strategy using Python and Refinitiv's DataScope Select (DSS) API to filter and select the best Intraday stocks. Given the breadth of the reference and pricing data available via DataScope Select, the APIs are ideal to build desktop applications which need a data source to populate data fields and graphs.

The DataScope Select APIs offer programmatic access to Refinitiv content in a more flexible way than the browser- and FTP-based data access solutions. They can be used to create an infinite number of client applications written in any desired programming language, for example, C#, C++, Visual Basic, Java, Objective-C and Swift. It supports the management of instrument and entity lists, report templates and schedules for the purpose of requesting extractions. It also supports higher level calls that can make data extractions directly, without requiring the creation of instrument lists, report templates or schedules on the DSS server.

Prerequisites

To run the example in this article we will need:

What is Quantitative Momentum Strategy?

In Physics, the term Momentum is used to define an object’s quantity and direction of motion. Similarly in financial markets, the momentum of an asset is the direction and speed of price change of the asset in the market. It is considered a primary stock factor (a.k.a anomaly, or smart-beta factor) affecting stock returns and has been outperforming the stock indices all over the world.

Quantitative Momentum is an investment strategy which selects stocks for investment whose price increased the most during a period. It is the process of identifying stocks with a great uptrend.

Let's see how this strategy can be implemented in Python using DSS API.

Importing required Packages

 

Here, Pandas package is used to deal with data, the NumPy package is used to work with arrays, the Requests package is used to pull data using DSS API, the Math package is used for mathematical functions, the SciPy package is used for complex functions, and few other packages are also used for support.

After importing all the required packages into our python environment, let's define a function to authenticate connection with DSS API.

 

At this step, we will take DSS username and password as input from user.

This authentication token will be valid for 24hrs from the time of generation.

Extracting List of all FTSE 100 Stock’s

Next, we are going to extract the list of all FTSE 100 stock’s using 0#.FTSE ChainRic from DSS API. For this let's define a function to expand this ChainRic.

In the above code, we have used DSS API to extract the RICs and it's status of the stocks available in the FTSE 100 by sending request to DSS's RestAPI using request package. This function will post the request to HistoricalChainResolution and will return the data in dataframe format.

 

We first extracted the RICs and Status of the stocks in the FTSE 100 using the ExpandChain function and stored it into the ftse_ric dataframe. Then we defined a variable ‘ftse_list’ to store the extracted data into a NumPy array.

To learn more about "How to expand Chain RIC using the Tick History REST API in Python", visit here.

Pulling Intraday data of all the stocks in the FTSE using DataScope Select API

We have seen list of all the FTSE 100 stock’s RICs, now let’s pull some intraday data using DSS API.

For this let's define a function to extract data first for the given ChainRic, i.e., #0.FTSE.

In the above function as well, we have used DSS API to extract the data for all the RICs of FTSE 100 by sending request to DSS's RestAPI using request package. We first setup the request header and post the request to ExtractRaw to fetch data.

The fetched data will be written to a csv file using gzip compression, which will be loaded to a dataframe and returned.

In case, if there will be any exception it will be raised, for example if the request's returned status is not Accepted or Ok.

Here, we have defined retryInterval variable for re-requesting the status after it's value (in second) to check if post request is already completed.

Here, we can see the Status and progress of the ExtractRaw function. Once the data is fetched completely, few metadata for each of the RICs is also displayed such as #RIC, Domain, Start, End, Status, and Count. We can also view all the data values fetched using the last url printed at the end.

If you don’t know how to pull stock data using DSS API, I suggest to read article on it here.

Data Pre-Processing

At this step, we will pre-process the data to get it ready in the desired format.

1. First format the date-time column and select the columns which we need further for our strategy.

2. Transpose the dataframe so that RICs name become the column names, set the date-time column as index, and Close values in there corresponding columns.

Since, now the data is ready in the desired format, now we will save the extracted intraday data of all FTSE 100 stocks. We also dropped column with all null values. It is an optional step but a good practice to save time, so first saving the extracted intraday data in the name of ‘ftse100’ using the ‘to_csv’ function provided by the Pandas package.

Calculating Percentage Change and Momentum

Next we are the going to calculate change in percentage and momentum of all the stocks

First, we created an empty list named dc to store the percentage change of each stock. Using for loop, we are iterating over the RICs of all the stocks in the FTSE 100 and appended the calculated percentage change using the ‘pct_change’ function provided by the Pandas package into the ‘dc’ list. Then we created a dataframe named ftse100_momentum to store the symbol of the stock, percentage change, and the momentum which we calculated after this.

To calculate the momentum, we first created a column named ‘momentum’ in the ‘ftse100_momentum’ dataframe and filled it with null values. Then we passed on a for-loop to fill the null values with the actual momentum values.

Finding Stocks with Greater Momentum

First, we will create a dataframe named ‘top_picks’ which stores the top 10 stocks having greater momentum than the rest.
In order to sort and find the top 10 stocks, we used the ‘nlargest’ function provided by the Pandas package.

Backtesting the strategy

In this step, we are going to backtest Quantitative Momentum Strategy by investing money in the top 10 stocks with the highest momentum, and let’s see what results we get.

First, we will define two variables:

  1. One to store the total investment value
  2. And other to store the investment value per stock

Next, we will use a for loop to find the day’s close price of all the top 10 stocks and append those values into the ‘day_close’ variable. In further lines of code, we will create a dataframe named ‘backtest_df’ which will be comprised of the calculated number of stocks to buy in each of them, the returns we got by investing in those top 10 stocks, and finally the return percentage of our investment.

We have got some decent returns above!!

 

Conclusion

In this article, we learned about Quantitative Momentum Strategy and it's implementation in Python using DSS API to pick tradable stocks. We defined a function to authenticate with DSS Rest API and get a token, and further expanded FTSE ChainRic to get the list of all stocks of FTSE 100. We can consider stocks listed on other exchanges to experiment around as well. We defined another function to pull intraday data for FTSE ChainRic using DSS Rest API. By performing research given the amount of data being pulled, we can learn different ways of data extraction using DSS API along with extensive data processing. Further we can try tuning this strategy accordingly by using several other metrics.

Request Free Trial

Help & Support

Already a customer?

Office locations

Contact LSEG near you