
Table of Contents
This strategy is based on tracking the flow of so-called “smart money” in the market, referring to the positions of the three major institutional investors in Taiwan: foreign investors, investment trusts, and proprietary traders. The strategy assumes that when these three institutions hold a strong and consistent view of the market direction, following their lead has a higher probability of success.
The strategy focuses exclusively on Taiwan Stock Index Futures (TX), using daily high, low, and close prices (for ATR volatility calculation), along with the net open interest (OI) data of the three institutional investor types to generate trading signals.Since the volatility filter requires historical data to warm up, with the longest window being vol_window (252 days), the backtest period is set from January 1, 2016, to October 1, 2025, to ensure reliable signal generation and strategy validity.
Net Open Interest of Institutional Investors:
This is the core signal of the strategy, representing the collective market view of the institutional investors.
ATR(Average True Range):
Position Sizing
net_oi > 0; go short if net_oi < 0.round(net_oi / 1000).Exit Conditions
The strategy exits all positions if any of the following is true:
This use of different thresholds for entry and exit is known as Hysteresis, intended to reduce whipsaws near threshold levels and improve trading stability.
On the day before a futures contract expires, Zipline automatically closes any open positions in the expiring contract. The strategy will then establish new positions in the front-month contract of the next expiry, ensuring continuity in trading.
(Note: If early roll-over is required, a custom roll_futures function must be implemented.)






We welcome all investors to refer to this strategy. We will continue to share how to construct various indicators using the TEJ database, and backtest their performance.
If you are interested in strategy backtesting, we invite you to explore the solutions offered by TQuant Lab, where high-quality data helps you build strategies tailored to your needs.
Disclaimer:
This analysis is for informational purposes only and does not constitute any form of financial product recommendation or investment advice.
[TQuant Lab Backtesting System] — Solving Your Quantitative Finance Challenges
TEJ Knowledge Finance Academy officially presents — “TQuantLab: Introduction to Quantitative Investing”.
This course integrates TEJ’s empirical data with practical quantitative methods, guiding you from the fundamentals to the core concepts of quantitative investment. Whether you are a finance professional, an investment researcher, or someone looking to enhance your analytical thinking, this course helps you build systemized research and evaluation skills—fast and effectively!
TQuantLab — Your gateway to effective quantitative investing.