Insider Transfer Strategy: A Solution to Timing Difficulties

Insider Transfer Strategy
Photo by Robert Bye on Unsplash

Highlight

  • Article Difficulty: ★★☆☆☆
  • This article will introduce the approach of importing information obtained from TEJToolAPI into Pipeline and use it in a strategy framework.
  • By identifying entry points through the timing of insider share transfers, we form an insider transfer strategy and backtest its performance using TQuant Lab.

Preface

In the dynamic landscape of today’s stock market, the activities of major investors often trigger significant price fluctuations. Among the various factors influencing these changes, the transfer of shares by directors and supervisors stands out. These insiders, armed with a profound understanding of the company’s operations, can wield substantial influence over its stock price. Consequently, when news of their share transfers surfaces, investors are quick to follow suit, aiming to capitalize on the resulting market swings.

As per the Taiwan Stock Exchange, the first quarter of 2024 witnessed a surge in market enthusiasm, with 4,879,506 individual investors engaging in transactions valued at less than NT$100 million, which is the highest in seven years. This trend, coupled with the stock market’s continuous ascent to new highs, underscores the importance of timing in market entry and the need to avoid purchasing at peak prices. To illustrate this, we will integrate the concept of insider share transfers with TQuant Lab, a powerful tool for backtesting strategies. This will allow us to thoroughly examine the performance of the Insider Transfer Strategy, shedding light on its potential benefits.

Insider Transfer Strategy

In this article, MSCI constituent stocks are used as the stock pool, and we select from the following insider transfer methods: general trading, block trading, and general trading combined with block trading. The insider transfer strategy is built and backtested using the following rules:

  • If an insider transfer occurs, buy or add NT$15,000 worth of shares. ( Note: The initial capital for this strategy is NT$1,000,000. )
  • If the RSI > 95, indicating a strong overbought sentiment in the market, sell half of the position.

Coding Environment and Module Requirements

This article is written using Windows 11 and Jupyter Lab as the editor.

Selecting Stock Pool and Trading Data Import

We first obtain MSCI constituent stocks by get_universe function and TEJToolAPI.

Insider Transfer Strategy
Selecting MSCI constituent stocks from TEJ Tool API

With the backtest period set from May 2, 2019, to May 1, 2024, we then import the price and volume data of the 89 MSCI constituent stocks and the TAIEX-Total Return Index (IR0001) as the performance benchmark.

Obtain the Insider Transfer Data

Here, we use the TEJToolAPI to obtain the daily data of each stock’s transfer start date, transfer end date, and transfer method. Furthermore, we added a transfer column to indicate whether there was an insider transfer of general trading, block trading, or general trading combined with block trading on that day.

Insider Transfer Strategy
The Insider Transfer Data from TEJ Tool API

Adding Transfer Information to Pipeline

CustomDataset allows us to import database content into Pipeline, facilitating subsequent backtesting. In this implementation, we use it to import the daily transfer information recorded in the transfer column into Pipeline. Part of the code is as follows:

from zipline.pipeline.data.dataset import Column, DataSet
from zipline.pipeline.domain import TW_EQUITIES

class CustomDataset(DataSet):
    
    Transfer_Method_English = Column(object)
    transfer = Column(bool)

    domain = TW_EQUITIES

Construct the Insider Transfer Strategy

From the pipeline and zipline functions provided in TQuant Lab, we can:

  1. Calculate the RSI value using the built-in factors from pipeline.
  2. Add the transfer methods and daily transfer data into pipeline.
  3. Add liquidity slippage and transaction fees, and set the return of the TAIEX-Total Return Index as the benchmark.
  4. Set the restriction to only long positions that can be constructed in the strategy.
  5. Set the Insider Transfer Strategy and record the transaction details.
Insider Transfer Strategy
Pipeline Results to be Used in Our Strategy

Start Building Portfolios That Outperform the Market!

Execute the Trading Strategy

We use run_algorithm() function to execute the configured Insider Transfer Strategy with the trading period from 2019-05-02 to 2024-05-01 and with the initial capital of 1,000,000 NTD. The output, or results, will represent the daily performance and detailed transaction records.

Insider Transfer Strategy
Trading Details

Performance Evaluation Using Pyfolio

Insider Transfer Strategy
Backtesting Performance Compared to Benchmark

The table above shows that the insider transfer strategy achieved an annualized return of 19.348%. Additionally, the Sharpe and Sortino ratios are 1.22 and 1.75, respectively, as well as an alpha value of 0.06. This indicates that the insider transfer strategy can generate excess returns under the unit of risk taken and has a certain degree of capital protection capability during downside risks. Observing the chart, we can find that the strategy’s performance was slightly below the market index before April 2021. After that, it officially surpassed the market index performance. The reason is that initially, the strategy was still in the building phase, so its performance could have been better than the market. However, once the positions were established and combined with the RSI indicator for exits during overbought periods, it effectively avoided bear market risks and achieved performance that exceeded the market index.

Insider Transfer Strategy
Exposure Chart of Long and Short Positions

The exposure chart of long and short positions helps us understand the use of capital in long and short positions. From the above chart, we can see that the insider transfer strategy was building positions in the early phase. By the end of 2021, it sold part of the holdings with the help of the RSI indicator, avoiding the bear market trend in 2022 to a certain extent.

Conclusion

This strategy is inspired by directors’ and supervisors’ stock transfers, aiming to explore whether buying stocks when these insiders report transfers can effectively time the market in a consistently rising market. By combining the timing of insider transfers with the RSI indicator, the strategy slightly outperformed the market in backtesting. However, it’s important to note that this example uses MSCI large-cap stocks, and results may differ with mid- or small-cap stocks. Additionally, investment amounts should be based on current stock trends and individual risk tolerance for more stable returns.

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 TQuant Lab. With our high-quality databases, you can construct a trading strategy that suits your needs.

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

Extended Reading

The characteristics of the Taiwan stock market differ from those of other European and American markets, and the dynamics of retail investors are worth noting. 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!

Back
Procesing