Strategies are the top-level research artifacts in the Hedge Fund Backend. Each strategy encapsulates a universe of ticker symbols, a target timeframe, references to one or more features and an ML model, and an optional signal logic definition. Strategies progress through a well-defined lifecycle —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/najmulhossainnj/Hedge-fund-backend/llms.txt
Use this file to discover all available pages before exploring further.
draft → backtested → validated → promoted → archived — and can only be promoted to the Portfolio Construction Layer once they carry a validated status and at least one completed backtest. The endpoints below cover full CRUD management as well as the promotion workflow that publishes a StrategyValidated event to the internal event bus.
CRUD Endpoints
Create Strategy
POST /api/v1/strategies
Creates a new strategy in draft status. All fields from StrategyBase are accepted. The name field is required; all others are optional and default to safe empty values.
Request Body
Human-readable strategy name. Maximum 255 characters. Stored with a database index for fast lookup.
Free-text description of the strategy’s hypothesis and methodology.
List of ticker symbols this strategy trades. For example
["AAPL", "MSFT", "NVDA"].Candle resolution. Common values:
1m, 5m, 15m, 1h, 4h, 1d, 1w.Array of Feature UUIDs whose computed columns will be fed into the model at inference time.
UUID of the
MLModel that generates predictions for this strategy. May be attached later.UUID of the
SignalLogic row that converts model predictions into BUY/SELL/HOLD decisions.Arbitrary JSONB configuration forwarded to the feature and signal pipelines at runtime.
Response — 201 Created
Unique identifier of the newly created strategy.
Strategy name as provided.
Optional description.
Ticker universe.
Candle resolution.
Linked feature IDs.
Linked ML model ID.
Linked signal logic ID.
Pipeline configuration blob.
Lifecycle status. Always
"draft" on creation.Optimistic-concurrency version counter. Starts at
1.ISO 8601 timestamp of creation.
ISO 8601 timestamp of the last update.
List Strategies
GET /api/v1/strategies
Returns a paginated array of all strategies ordered by creation time. Use skip and limit for cursor-style pagination.
Query Parameters
Number of records to skip. Used for offset-based pagination.
Maximum number of strategies to return in a single response.
Response — 200 OK
Returns list[StrategyRead]. Each element has the same shape as the Create Strategy response above.
Get Strategy
GET /api/v1/strategies/{strategy_id}
Retrieves a single strategy by its UUID.
Path Parameters
UUID of the strategy to retrieve.
Response
ReturnsStrategyRead on 200 OK. Returns 404 Not Found with {"detail": "Strategy not found"} if no strategy exists for the given ID.
Update Strategy
PATCH /api/v1/strategies/{strategy_id}
Partially updates a strategy. Only the fields included in the request body are modified; omitted fields are left unchanged. This is especially useful for transitioning status between lifecycle stages or attaching a model after initial creation.
Path Parameters
UUID of the strategy to update.
Request Body (StrategyUpdate — all fields optional)
New name. Maximum 255 characters.
Updated description.
Replacement ticker universe.
New candle resolution.
Full replacement list of feature IDs.
Attach or detach the linked ML model.
Attach or detach signal logic.
Replacement pipeline config blob.
Manually set the lifecycle status. Accepted values:
draft, backtested, validated, promoted, archived.Promotion and demotion status changes should normally go through the dedicated
/promote and /demote endpoints, which also handle event publishing and prerequisite validation.Response — 200 OK
Returns the updated StrategyRead object. Returns 404 Not Found if the strategy does not exist.
Delete Strategy
DELETE /api/v1/strategies/{strategy_id}
Permanently deletes a strategy and its database row.
Path Parameters
UUID of the strategy to delete.
Response
204 No Content on success. 404 Not Found if the strategy does not exist.
Promotion Endpoints
The promotion workflow controls the transition of a strategy from the research environment into the live Portfolio Construction Layer. Promotion publishes aStrategyValidated event to the internal event bus. The /status endpoint lets you inspect promotion readiness before attempting a promotion.
Promote Strategy
POST /api/v1/strategies/{strategy_id}/promote
Promotes a validated strategy to the Portfolio Construction Layer. The service checks that the strategy has validated status and at least one completed backtest before publishing the event. Returns 409 Conflict if any promotion requirement is unmet.
Path Parameters
UUID of the strategy to promote.
Request Body
Optional override for the model confidence threshold forwarded in the promotion event payload. When
null, the model’s stored confidence value is used.Response — 200 OK
true when the strategy was successfully promoted and the event was published.Human-readable outcome message from the promotion service.
The exact
StrategyValidated event payload that was dispatched to the event bus.Demote Strategy
POST /api/v1/strategies/{strategy_id}/demote
Rolls back a promoted strategy to validated status. Use this to pull a strategy from the portfolio layer without archiving it, preserving all backtests and history.
Path Parameters
UUID of the strategy to demote.
Request Body
Free-text explanation for the demotion. Recorded in the audit log for compliance purposes.
Response — 200 OK
Returns the updated strategy state from the promotion service after the rollback completes.
Get Strategy Status
GET /api/v1/strategies/{strategy_id}/status
Returns the current lifecycle status of a strategy alongside a promotion readiness checklist. Call this endpoint before attempting a promotion to confirm all requirements are satisfied without risking a 409 error.
Path Parameters
UUID of the strategy to inspect.
Response — 200 OK
UUID of the strategy (serialized as string).
Human-readable strategy name.
Current lifecycle status. One of:
draft, backtested, validated, promoted, archived.true when both has_validated_status and has_completed_backtest are true. This is the single gate check before calling /promote.Detailed breakdown of each promotion prerequisite.
Count of completed backtests linked to this strategy.
Strategy Lifecycle Reference
Thestatus field follows a linear progression, though manual overrides via PATCH are permitted for administrative purposes.
| Status | Description |
|---|---|
draft | Initial state. Strategy is being configured; no backtests have been run. |
backtested | At least one backtest has been executed against this strategy. |
validated | Research team has reviewed backtest results and approved the strategy for promotion consideration. |
promoted | Strategy has been published to the Portfolio Construction Layer and is active. |
archived | Strategy has been retired and removed from active consideration. |