F-score Strategy: Identifying Undervalued Quality Stocks

F-score strategy
Photo by engin akyurt on Unsplash

Highlight

  • Article Difficulty:★★☆☆☆
  • Introduce the nine selection criteria of the F-score strategy.
  • Use Pipeline to filter stocks that meet the nine indicators of the F-score strategy and generate buy signals.
  • Backtest the quarterly rebalancing performance of the F-score strategy.

Preface

In today’s stock market, investors face the challenge of choosing from many stocks, with many hoping to find undervalued stocks with solid fundamentals. However, market volatility and information asymmetry often make this goal difficult to achieve. In this context, the Piotroski F-score, also known as the Piotroski score or F-score, has become an important tool for investors.

Conceived by the esteemed former University of Chicago professor Joseph Piotroski, the F-score strategy is a comprehensive evaluation of nine financial report conditions. This strategy serves as a reliable guide for investors, providing a holistic view of a company’s financial health. It encompasses aspects of profitability, safety, and growth, offering a multidimensional analytical framework that enables investors to assess a company’s potential value more comprehensively. To delve into the performance of the F-score in the Taiwan stock market, this article construct the F-score strategy, thereby equipping investors with a deeper understanding of the investment benefits that the F-score can potentially unlock.

F-score Strategy

According to the paper by Professor Joseph Piotroski, to identify undervalued stocks with relatively stable profitability, safety, and growth, the F-score strategy is constructed through the following two steps to generate trading signals:

  1. Identify the top 20% of stocks in the market based on their Book-to-Market Ratio (BM Ratio).
    p.s. A higher BM Ratio indicates that the stock is more undervalued, as its trading price is lower than its asset value.
  2. Calculate the score based on the 9 fundamental criteria of the F-score. Each criterion met earns 1 point. We will buy stocks that score 8 or 9 and rebalance the portfolio quarterly.

The 9 fundamental criteria of the F-score strategy are as follows:

  • Profitability
    1. Return on Assets (ROA) > 0
    2. Current year ROA > previous year ROA
    3. Operating cash flow > 0
    4. Operating cash flow > net income after tax
  • Safety
    1. Long-term debt for the current year < previous year
    2. Current ratio for the current year > previous year
    3. No new shares issued in the previous year
  • Growth
    1. Gross margin for the current year > previous year
    2. Asset turnover ratio for the current year > previous year

Next, let’s generate the trading signals required for the F-score strategy.

Select Stock Pool and Trading Data Import

First, we obtain undervalued stocks through the following two steps:

  1. Obtain the stock symbols of all listed and OTC common stocks on May 6, 2019 by using TEJ market Databank
  2. Use TEJ Quantitative Investment Database to get the Price-Book Ratio ( PB ratio ) of the above stocks to calculate the BM Ratio, thereby obtaining the top 20% of stocks by BM Ratio.
    p.s. PB Ratio and BM Ratio are reciprocals.

With the backtest period set from May 6, 2019, to December 31, 2023, we then import the price and volume data of the above 340 undervalued stocks and the TAIEX-Total Return Index (IR0001) as the performance benchmark.

F-score strategy
The top 20% of stocks by BM Ratio

Obtain Financial Data for the F-score Strategy

To calculate the financial criteria needed for the F-score, we use TEJ Quantitative Investment Database to fetch the following 9 financial data points:

  1. ROA: Return_on_Total_Assets_A_percent
  2. Operating cash flow: Cash_Flow_from_Operating_Activities
  3. Net income: Net_Income_Attributable_to_Parent
  4. Long-term debt: Total_Noncurrent_Liabilities
  5. Current ratio: Current_Ratio
  6. New shares issued (in thousands): Cash_Capital_Increase_Thousand_Shares
  7. Gross margin rate: Gross_Margin_Rate_percent
  8. Asset turnover: Total_Assets_Turnover

Obtain All-encompassing Quantitative Data Above Through TEJ!

Import Financial Data into Trading Environment

The CustomDataset class can import content from a database into Pipeline, facilitating subsequent backtesting. In this example, we use it to import the financial data we get from TEJ Quantitative Investment Database to calculate the F-score into Pipeline. Besides, before calculating the F-score, we use the CustomFactor function to define the following two factors:

  1. Calculate the YOY change of financial data.
  2. Convert the data passing the F-score criteria to 1 and those failing to 0, for calculating the F-score.

Create Quantitative Analysis Function

The Pipeline() function provides users with the ability to quickly process quantitative indicators and price-volume data of multiple stocks. In this case, we use it to handle:

  • Import stock price and financial data.
  • Calculate year-over-year ( YOY ) changes in financial data and annual average cash capital increase ( to determine if new shares were issued ).
  • Compute the F-score and generate trading signals in the “longs” column: True for F-score ≥ 8, False otherwise.
F-score strategy
Pipeline Results to be Used in Our Strategy

Backtest the F-score Strategy

Utilize TEJ’s simplified version of the Zipline backtesting engine, TargetPercentPipeAlgo, which allows all backtesting parameters to be set in a single line, requiring only the strategy pipeline input for execution.

Parameters adjusted for this strategy:

  • Backtest period ( start_session, end_session ): May 30, 2020, to December 31, 2023.
  • Initial capital ( capital_base ): 10 million NTD.
  • Trading days ( rebalancing days ): 15th of March, June, September, and December.
  • Maximum leverage: 90%.
  • Strategy pipeline: Evaluates the “longs” column from the Pipeline to determine trading on rebalancing days.
  • Slippage model: VolumeShareSlippage.
  • Commission model: Custom_TW_Commission.

Performance Evaluation Using Pyfolio

F-score strategy
Backtesting Performance Compared to Benchmark

Based on the table above, the F-score strategy outperformed the market. It achieved an annualized return of 27.83%, with an annualized volatility of approximately 19.1%. Furthermore, the Sharpe ratio stands at 1.38, and the alpha value is 0.11, indicating that the F-score strategy generates respectable excess returns for investors under relatively controlled risk. Examining the beta value of 0.79, it suggests that the performance of the F-score strategy is moderately correlated with the market trend, indicating that the 9 stock selection criteria of the F-score strategy indeed help mitigate some systematic risks for investors. In the performance comparison chart, it can be observed that the F-score strategy experienced a smaller decline compared to the market in 2022, and after recovering from the bear market, it outperformed the market, underscoring the strategy’s strong profitability.

F-score strategy
Annual Returns Chart

In the annual returns chart, aside from a significant downturn in 2022, the strategy achieved annualized returns exceeding 30% in the other three years.

F-score strategy
Long / Short Position Exposure Chart

Furthermore, from the long/short position exposure chart, we can see that setting the maximum leverage to 90% in TargetPercentPipeAlgo keeps the exposure stable around 0.9. This ensures that the F-score strategy retains some flexibility and is less affected by large fluctuations.

Conclusion

This strategy takes Joseph Piotroski’s ( 2002 ) paper as its foundation, aiming to explore whether the F-score strategy can provide stable profits for investors in the Taiwan stock market. In constructing the strategy, we identify undervalued stocks using the book-to-market ratio and calculate the F-score and generate trading signals. Finally, we apply the simplified backtesting engine, TargetPercentPipeAlgo, to conduct strategy backtesting.

The quarterly rebalancing feature of the F-score strategy allows investors to promptly update their portfolios after each quarter’s new financial data release. Performance analysis using Pyfolio further confirms the F-score strategy’s superior profitability compared to the broader market. This demonstrates that even after over 20 years since its introduction, the strategy retains robust capabilities in evaluating company profitability, safety, and growth potential. Moreover, it shows applicability within the context of the Taiwan stock market.

Please note that the strategy and target discussed in this article are for reference only and do not constitute any recommendation for specific commodities or investments. In the future, we will also introduce using the TEJ database to construct various indicators and backtest their performance. Therefore, we welcome readers interested in various trading strategies to consider purchasing relevant solutions from Quantitative Finance Solution. With our high-quality databases, you can construct a trading strategy that suits your needs.

“Taiwan stock market data, TEJ collect it all.”

The characteristics of the Taiwan stock market differ from those of other European and American markets. Especially in the first quarter of 2024, with the Taiwan Stock Exchange reaching a new high of 20,000 points due to the rise in TSMC’s stock price, global institutional investors are paying more attention to the performance of the Taiwan stock market. 

Taiwan Economical Journal (TEJ), a financial database established in Taiwan for over 30 years, serves local financial institutions and academic institutions, and has long-term cooperation with internationally renowned data providers, providing high-quality financial data for five financial markets in Asia. 

  • Complete Coverage: Includes all listed companies on stock markets in Taiwan, China, Hong Kong, Japan, Korea, etc. 
  • Comprehensive Analysis of Enterprises: Operational aspects, financial aspects, securities market performance, ESG sustainability, etc. 
  • High-Quality Database: TEJ data is cleaned, checked, enhanced, and integrated to ensure it meets the information needs of financial and market analysis. 

With TEJ’s assistance, you can access relevant information about major stock markets in Asia, such as securities market, financials data, enterprise operations, board of directors, sustainability data, etc., providing investors with timely and high-quality content. Additionally, TEJ offers advisory services to help solve problems in theoretical practice and financial management!

Extended Reading

Back
Procesing