Fund Style Library Governance: Using a Rules Engine to Prevent Style Drift
This article explains how to turn fund style constraints into executable compliance rules. It covers translating the "dual 80%" requirements into real-time metrics, externalizing thresholds as configuration, automating checks across the contract, style library, and custodian review layers, managing the full style library lifecycle as a state machine, and building a time-bound remediation and regulatory reporting workflow. It also includes sample Python checks, a remediation roadmap, and common pitfalls to avoid.
1. Background: Why Style Drift Keeps Happening
A thematic fund promises to invest only in a specific direction. In practice, managers may shift positions into unrelated areas due to market rotation, performance pressure, or changing research views. Traditional monitoring relies mainly on holdings disclosed in quarterly reports, which is low-frequency and heavily delayed. By the time a deviation is detected, it has often already become a fact.
The substance of the new regulation is to turn “style” from a contractual statement into a set of identifiable, quantifiable, and continuously verifiable engineering constraints. For technical teams, this means adding a compliance rule set that must be executed in real time.
2. Translating the “Dual 80%” into Executable Rules
The new regulation requires the fund contract to define investment style, investment scope, and style library inclusion criteria in an identifiable and quantifiable way. It sets two hard constraints:
- Among non-cash assets, assets invested in the specified direction must account for at least 80%;
- Among non-cash assets, securities from the style library must continuously account for at least 80%.
These constraints can be abstracted into two real-time metrics:
direction_ratio = market value of non-cash assets in the specified direction / total market value of non-cash assetslibrary_ratio = market value of non-cash assets in style library securities / total market value of non-cash assetscompliance condition: direction_ratio >= 0.80 AND library_ratio >= 0.80
In engineering, avoid hardcoding thresholds in business code. Externalize them as configuration to support differentiated threshold management across products and contracts:
fund_policy:fund_code: "DEMO001"min_direction_ratio: 0.80min_library_ratio: 0.80breach_window_days: 10qdii_breach_window_workdays: 30
3. Three Checkpoints: Contract, Style Library, Custodian Review
The regulation breaks the investment boundary into three checkpoints, each with an automatable validation point.
The first is the contract layer. Investment style, scope, and inclusion criteria must be quantifiable. A contract cannot simply say “focus on a certain direction”; it must provide security identification rules, such as industry classification, business revenue share, or factor thresholds that can be computed.
The second is the style library layer. Creation, updates, approval, and record-keeping require a complete process: the research side builds the library per the contract and updates it periodically, fund managers can propose changes, the investment decision committee reviews them, and compliance and risk control审核 each security one by one. Active updates are in principle limited to no more than 12 per calendar year; passive updates and removals-only adjustments are not subject to this limit.
The third is the custodian review layer. Within 10 trading days after the product is established, the style library must be sent to the custodian. The custodian completes review within 5 trading days and issues a written notice of any discrepancies. The manager must adjust or provide a written explanation within 10 trading days. If the library is not sent on time, holdings fail to comply with the contract for 10 consecutive trading days, update counts are violated, or adjustments are not made on time after a notice, the custodian should report to the regulator.
4. Architecture Changes Driven by Higher Monitoring Frequency
Raising monitoring frequency from quarterly to every 10 trading days essentially changes “after-the-fact disclosure” into “near-real-time interception.” This requires three data pipeline capabilities:
- Daily synchronization of holdings and valuation data, ensuring metrics are computed on the latest available data;
- A rules engine that supports combined checks of thresholds, window periods, and exemption conditions;
- Separation of monitoring alerts and audit logs, ensuring timely notification and traceability.
An illustrative daily check logic:
def check_fund_style(positions, library_set, policy):non_cash = [p for p in positions if p.asset_type != "CASH"]total = sum(p.market_value for p in non_cash)if total == 0:return {"direction_ratio": 1.0, "library_ratio": 1.0}direction = sum(p.market_value for p in non_cash if p.in_direction)in_lib = sum(p.market_value for p in non_cash if p.code in library_set)result = {"direction_ratio": direction / total,"library_ratio": in_lib / total,}result["breach"] = (result["direction_ratio"] < policy.min_direction_ratioor result["library_ratio"] < policy.min_library_ratio)return result
Window-period checks require maintaining a consecutive deviation counter to avoid false alarms from single-day fluctuations:
def update_breach_state(state, breach, policy):state["consecutive"] = state["consecutive"] + 1 if breach else 0state["reported"] = state["consecutive"] >= policy.breach_window_daysreturn state
5. Full Lifecycle Management of the Style Library
The style library is not a static list but a controlled collection with a lifecycle. Model it as a state machine:
Candidate -> Pending Review -> In Library -> Frozen -> Removed
Key control points include:
- Structured inclusion criteria: convert qualitative contract descriptions into computable fields, such as industry code sets, minimum business revenue share, and liquidity constraints;
- Separation of duties: isolate the roles of proposer, compliance reviewer, and investment committee to avoid a single-person closed loop;
- Change traceability: record the operator, time, basis, and approval ticket number for every addition, removal, and freeze;
- Update counting: count active updates per calendar year, and count passive updates and removals-only separately to prevent bypassing limits.
6. Automating the Custodian Review and Regulatory Reporting Loop
Custodian review should be designed as an asynchronous but time-bound workflow:
Send style library (T+10) -> Custodian review (T+5) -> Written notice -> Manager adjustment or explanation (T+10) -> Archive
In implementation, use a message queue to decouple sending and review, a workflow engine to manage deadlines, and a logging service to retain all notices and explanations. For products whose consecutive deviations reach the window period, automatically generate a reporting draft with metric curves, a list of deviating securities, and actions already taken, reducing manual preparation effort.
7. Remediation Roadmap and Implementation Advice
Existing products whose contracts do not clearly define investment style and inclusion criteria must complete remediation within the transition period. Proceed in four steps:
- Inventory: review contract wording gaps by product and flag products needing supplementary agreements;
- Modeling: convert investment direction and inclusion criteria into rule configuration and a tagging system;
- Integration testing: run end-to-end drills with the custodian review process to validate deadlines and the notice chain;
- Normalization: bring metrics, alerts, and reporting into a daily operations dashboard and establish a weekly review mechanism.
8. Common Pitfalls
- Changing the contract but not the system: rules cannot be enforced and still rely on manual judgment;
- Hardcoded thresholds: difficult to manage differences across products, and changes require a release;
- Only handling removals without addition review: style library quality becomes uncontrollable and rework at the review stage is high;
- Sharing one storage for alerts and audit: high-frequency alerts drown audit clues and make traceability difficult.
9. Conclusion
Engineering style constraints is not about pursuing complex models. It is about turning contract language into computable metrics, turning approval processes into traceable state machines, and turning custodian review into a time-bound closed loop. Achieving these three points significantly narrows the space for style drift and shifts compliance cost from “after-the-fact explanation” to “prevention.”
