investfly.models.strategy.StrategyConfig
Declarative strategy entry, exit, sizing, guard, and lifecycle contracts.
These models are the public configuration vocabulary shared by SDK clients, custom strategies, live execution, and backtests. Validation and serialization helpers are implementation details and are intentionally omitted from generated API documentation unless explicitly documented.
How a condition treats transitions at its threshold.
Action taken when a new entry conflicts with an existing position.
Policy for resolving simultaneous or conflicting entry signals.
Behavior when an entry targets a security already represented in the portfolio.
Action applied to an existing target position.
Policy for entries that resolve to an existing target instrument.
One entry condition paired with execution settings.
Instrument selection, sizing, and order settings for opening a position.
Collection of entry rules and their conflict policy.
One exit condition and the position-closing behavior it activates.
Collection of exit rules evaluated for open positions.
Measurement used to define a profit target.
One profit threshold and the percentage of a position to close.
Ordered profit-taking tiers for progressively closing a position.
Measurement used to locate a fixed protective stop.
Threshold value for a fixed stop rule.
Protective stop fixed at a price or distance from entry.
Measurement used for a trailing-stop distance.
Average True Range settings used by volatility-based distances.
Distance maintained by a trailing protective stop.
Protective stop that follows favorable price movement.
Reference point used by a session-time trigger.
Trigger at a time relative to market-session open or close.
Execution policy for runtime-managed protective orders.
Available fixed and trailing stop specifications.
Fixed or trailing protective stop definition.
Condition that becomes true after a profit tier is reached.
Profit targets, stops, adjustments, and maximum holding period for a position.
Replacement protective stop activated by a later trigger.
Events that can activate a protection adjustment.
Event condition that activates a protection adjustment.
High-level behavior performed by a scheduled workflow.
Typed intent executed by a scheduled strategy job.
Selection and execution settings for a scheduled portfolio rotation.
Target portfolio weight for one security.
Target basket, weights, and tolerance for scheduled rebalancing.
How recurring contributions are expressed.
Cash or percentage budget contributed by a recurring entry.
One target and allocation in a recurring multi-asset entry.
Targets and contribution settings for recurring multi-asset entries.
Contribution and execution settings for a recurring single-asset entry.
A validated schedule paired with a workflow intent and guard policy.
Supported interpretations of a market-regime condition.
Time horizon used to evaluate market regime.
Kinds of pre-execution strategy guards.
How a time guard interprets its configured window.
Execution scopes in which a strategy guard may be evaluated.
Identifier, scope, and behavior shared by all strategy guards.
Base contract for a pre-execution strategy guard.
Guard that allows execution only in a configured market regime.
Guard that allows or blocks execution within a configured time window.
Guard that enforces a portfolio margin threshold.
Market-regime guard tailored to continuously traded crypto markets.
Result of evaluating one strategy guard.
Ordered strategy guards and their combination behavior.
Selection criteria for currently open portfolio positions.
Quantity and order settings for closing selected positions.
Source from which a security selection obtains candidates.
Candidate universe and filter used to select securities.
Expression used to score a security for ranking.
Security selection with scoring, ordering, and result limits.
Method used to distribute capital among selected securities.
Allocation mode and optional explicit target weights.
Units used to express an entry position size.
Requested position size and its measurement mode.
Maximum exposure allowed for one position.
Unit used to measure a price move for scaling rules.
Reference price used to measure a scaling move.
How a scale-in order derives its quantity.
Required favorable or adverse move before a scaling action.
Sizing and execution settings for one scale-in action.
Scale-in rule activated by repeated entry signals.
Scale-in rule for positions moving favorably.
Safety limits for averaging into a losing position.
Scale-in rule for positions moving adversely.
Combined repeat-signal, winner, and loser scale-in behavior.
Runtime-managed exits and scaling behavior for open positions.
Portfolio exposure limits for grouped option positions.
Portfolio-wide position count, exposure, and buying-power limits.
Time-in-force choices for strategy orders.
Order types available to declarative strategy execution.
Unit used to offset a generated limit price.
Adjustment applied when deriving a strategy limit price.
Order type, duration, and limit-price behavior for strategy execution.
Policy used to roll a futures position before expiration.
Expiration and roll behavior for futures positions.
Asset-specific lifecycle behavior for runtime-managed positions.
Complete declarative trading-strategy configuration.
Combines the security universe, entry and exit rules, scheduled jobs, position management, asset lifecycle, and portfolio limits evaluated by Investfly in live trading and backtests.