Skip to documentation
Screebits Docs
Flow Editor
Open Screebits
  • Screebits
  • Flow Editor documentation
  • Blueprints
  • Your first steps in Screebits
  • Workspace, strategies and account
  • Get started with the Flow Editor
  • Build an RSI Momentum Alert
  • Flow Editor concepts
  • How a strategy starts and continues
  • Control and data connections
  • Nodes, parameters, outcomes, and ports
  • Plans and feature availability
  • Saves, versions, and checkpoints
  • Tactical and Portfolio strategies
  • Validation and readiness
  • Flow Editor mode guides
  • Build Portfolio strategies
  • Build Tactical strategies
  • Flow Editor guides
  • Add a Quant Hub metric
  • Configure a node
  • Configure Settings and visual preferences
  • Connect nodes
  • Create a strategy
  • Create checkpoints and restore versions
  • Reset a Flow safely
  • Debug and replay a Backtest
  • Fix validation issues
  • Use keyboard shortcuts
  • Manage variables
  • Run a Backtest
  • Save and resolve conflicts
  • Work on tablet and mobile
  • Use Quick add
  • Use the Inspector
  • Add, move, duplicate, and remove nodes
  • Flow Editor examples
  • Portfolio rebalance with risk limits
  • Tactical order and position monitoring
  • Use Backtest Center
  • Read a Backtest result
  • Compare and export Backtests
  • Explore Quant Hub
  • Metric parameters, charts and overlays
  • Flow Editor node reference
  • Portfolio Constraint
  • Flow Editor troubleshooting
  • Troubleshoot activation and validation
  • Troubleshoot Backtests and replay
  • Troubleshoot compact layouts
  • Troubleshoot connections and data types
  • Troubleshoot plans and locked features
  • Troubleshoot Quant Hub in the Flow Editor
  • Troubleshoot save, offline, and conflicts
  • Backtests and responsible use
  • Flow Editor glossary
  1. Screebits
  2. /Flow Editor documentation
  3. /Flow Editor node reference
  4. /Portfolio Constraint
IntermediateLast verified Sep 30, 2026

Portfolio Constraint

Checks candidate weights against configured portfolio limits.

On this page
  1. When to use
  2. Example
  3. Test a concentration limit
  4. Common problems
  5. Next steps

Checks candidate weights against configured portfolio limits.

When to use

Use it before Rebalancer when target weights must meet concentration or other supported portfolio rules.

Example

With the default constraintProvider role, connect candidate Weights to this node and its Constraints data output to Rebalancer; there is no control path through this node. Choose the guard role when you need explicit Passed and Violated control branches.

Try it here

Explore Portfolio Constraint

Checks candidate weights against configured portfolio limits.

Exercise steps
  1. Compare the constraint-provider and validation roles.
  2. Inspect how control ports and the Constraints output change.
Schedule TriggerWeight CalculatorUniversePortfolio Constraint
Graph preview — a diagram of the example

Test a concentration limit

Suppose Weight Calculator produces two equal targets of 0.5 each. Set Max weight per asset to 0.4: each target exceeds that cap. In the default constraintProvider role, connect candidate Weights to the node and then Constraints to Rebalancer so the rebalance stage can evaluate the proposed targets. The provider has no Passed or Violated control outcome. An unset optional limit is not automatically a 40% rule; set each constraint you intend to enforce.

Choose guard only when the graph needs explicit control branches before proceeding. Feed the candidate Weights to the guard, send Passed onward, and give Violated a safe separate path. If the intended budget is 80% with two equal targets, each is 0.4, satisfying a max-0.4 concentration cap in this simplified example. Other active limits and available risk data can still affect the result. Review Portfolio rebalancing for the surrounding graph.

When a volatility or drawdown limit activates Covariance source, its Custom choice is reserved and disabled. Use an available source and confirm the required historical data before interpreting those limits.

Common problems

Only the guard role exposes control outcomes. Check Role before connecting the node, and verify that the constraints concern the intended universe.

Next steps

Review the generated Parameters, Outcomes, and Data Ports on this page, then open the related guides for the complete workflow.

Node facts

These facts come from the current Flow Editor node catalog.

Node type
Portfolio Constraint
Activation role
No activation role
Category
Portfolio
Availability
Portfolio only
Modes
Portfolio
Required plan
None
Behavior
Transforms a value
Control inputs
1
Output data types
portfolio Constraints

Parameters

NameInput typeRequirementDefaultOptions and constraints
roleSelection listRequiredconstraintProviderOptions: constraint Provider, guard
Max weight per assetNumberOptionalNot setMinimum: 0; Maximum: 1
Max sector exposureNumberOptionalNot setMinimum: 0; Maximum: 1
Minimum positionsNumberOptionalNot setMinimum: 1; Whole numbers only
Maximum positionsNumberOptionalNot setMinimum: 1; Whole numbers only
Max volatilityNumberOptionalNot setMinimum: 0; Maximum: 1
Max drawdownNumberOptionalNot setMinimum: 0; Maximum: 1
Covariance sourceSelection listOptional when shownhistorical_120dOptions: 60-day history, 120-day history, 252-day history; Shown when Max volatility > 0 or Max drawdown > 0

Primary parameters

  • role
  • Max weight per asset
  • Max volatility
  • Max drawdown

Outcomes

  • PassedShown when role is guard
  • ViolatedShown when role is guard

Data inputs

  • Weightsweight Vector · Required

Data outputs

  • Constraintsportfolio Constraints

Related documentation

  • Weight CalculatorCalculates target weights for a connected asset universe.
  • Leverage ConstraintChecks or adjusts target weights against configured leverage limits.
  • Portfolio rebalance with risk limitsUnderstand a Portfolio pattern that filters an asset universe, calculates target weights, applies constraints, and rebalances.

On this page

1 / 5
  1. When to use
  2. Example
  3. Test a concentration limit
  4. Common problems
  5. Next steps

Practical guidance for strategies, historical simulations and metric research in Screebits.

Responsible useGlossary