Skip to content
All library documents

Using Rental Code Metadata to Set Strategy Usage Limits

Article FMZ digest · Author: 发明者量化-小小梦

Summary

The document explains how a strategy lessor can attach a short metadata string to a rental registration code and have the strategy interpret it as a usage tier. Its example assigns different maximum spot holdings to codes with different tier labels, while an unset value selects a default limit. The strategy checks the account’s current and frozen holdings and skips its trading logic when the configured cap is exceeded.

The article also describes creating a code with metadata and changing that metadata later through the platform’s sales records, with the renter restarting the strategy to apply the revised setting. It notes that restrictions must fit the strategy: futures strategies, for example, would need to inspect position data and should still allow risk-reducing actions such as closing positions. The example is a platform implementation illustration rather than a general trading method, and its sample limits and behavior may need adaptation to each strategy.

Key ideas

  • Registration-code metadata can carry a usage tier into a rented strategy.
  • A strategy can map each tier to a position or asset limit and enforce it at runtime.
  • The example checks total spot holdings, including frozen assets, before allowing trading logic to continue.
  • Metadata can be updated after code issuance, with the renter restarting the strategy to apply it.
  • Restrictions should match the instrument and preserve necessary position-closing behavior.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.