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
  • 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 examples
  4. /Portfolio rebalance with risk limits
IntermediateLast verified Sep 30, 2026

Portfolio rebalance with risk limits

Understand a Portfolio pattern that filters an asset universe, calculates target weights, applies constraints, and rebalances.

Advanced Portfolio · Step 2 of 2

On this page
  1. Start with the working Blueprint
  2. Calculate the Blueprint's target before adding complexity
  3. Goal
  4. Suggested structure
  5. Handle outcomes
  6. Verify

This example shows a composition pattern. It does not define a recommended universe, ranking model, or allocation.

Start with the working Blueprint

For a first Portfolio graph, open Blueprints, select EUR/USD + BTC/USD Equal Weight, inspect its requirements and choose Use Blueprint. The form inherits Portfolio mode. Creating the independent copy uses one strategy slot.

Inspect its four nodes: Schedule Trigger runs weekly on Monday at the configured market-open anchor; Universe contains EURUSD and BTCUSD; Weight Calculator uses equal weights and a 100% allocation budget; Rebalancer receives those target weights. Check the strategy timezone and market-hours settings before interpreting the schedule.

Control goes from Schedule Trigger Fired to Rebalancer. Data goes from Universe to Weight Calculator, then Weights to Rebalancer Target Weights. The two data nodes do not need control connections. Save, exit and reopen to verify the graph. Run a Backtest only after reviewing its dates, costs and plan allowance.

The structure below is an advanced extension pattern, not a ready-to-submit template. Ranking, scoring and constraints require their own compatible inputs, parameters and plan access. Do not expect a Quant Hub node to appear merely because you can view a standalone metric.

Calculate the Blueprint's target before adding complexity

With two eligible assets, equal_weight and a full allocation budget, Weight Calculator produces a target of 50% for each asset. The Inspector presents the budget as 100%; the graph contract stores the equivalent fraction 1. If you change the UI budget to 80%, the corresponding fraction is 0.8, so equal allocation across two assets is 40% each and the remaining 20% is not allocated by this calculation. Check the resulting output rather than reading 0.8 as 0.8%.

For arithmetic only, suppose portfolio value is 10,000 units of account currency and current weights are 70% and 30%. The 50/50 target represents 5,000 in each asset versus 7,000 and 3,000 currently: a nominal shift of 2,000 away from the first asset and toward the second. Rebalancer must still evaluate prices, minimum sizes, tolerance, costs and constraints. These numbers are not an observed execution or a promise that exactly two orders will occur. If the portfolio is already within tolerance, a no change outcome can be correct.

Add one rule at a time. For instance, a maximum weight per asset of 40% conflicts with a two-asset full-budget 50/50 target. Do not assume a guard automatically converts 50/50 to another allocation; inspect its role and the Rebalancer's constraint outcome. A third eligible asset or different budget may be needed, but the actual choice depends on the intended strategy and supported data.

Try it here

Explore two strategy modes

Understand a Portfolio pattern that filters an asset universe, calculates target weights, applies constraints, and rebalances.

Exercise steps
  1. Inspect the schedule, universe and target weights in the Portfolio example.
  2. Set the allocation budget to 80%; inspect the configuration without submitting a rebalance.
Schedule TriggerUniverseWeight CalculatorRebalancer
Graph preview — a diagram of the example

Goal

On a schedule, create an eligible universe, rank or score its assets, calculate target weights, enforce portfolio and leverage limits, then produce a rebalance result.

Suggested structure

  1. Schedule Trigger starts the graph and provides period information.
  2. Universe defines the candidate symbols.
  3. Screen Filter removes candidates that fail supported rules.
  4. Ranking selects assets from connected scores, or Composite Score combines several rankings first.
  5. Weight Calculator converts the selected universe into target weights.
  6. Portfolio Constraint supplies constraints as data by default; its guard role is used for explicit control outcomes.
  7. Leverage Constraint checks or adjusts weights when available.
  8. Rebalancer compares target weights with the current portfolio and produces a result.

Use the respective Field nodes to extract scalar details from period, leverage, or rebalance outputs.

Handle outcomes

Connect completed, constraint-violation, empty-universe, and no-change outcomes intentionally. A no-change outcome can be a valid result and should not automatically be treated as an error.

Verify

Confirm that all weights and constraints use compatible data. Resolve validation, save, and review Backtest assumptions before submission.

Related documentation

  • Build Portfolio strategiesDesign a scheduled or safety-driven graph that selects assets, calculates weights, applies limits, and rebalances.
  • Portfolio ConstraintChecks candidate weights against configured portfolio limits.
  • RebalancerTurns valid target weights into a Portfolio rebalance result.
PreviousBuild Portfolio strategies

On this page

1 / 6
  1. Start with the working Blueprint
  2. Calculate the Blueprint's target before adding complexity
  3. Goal
  4. Suggested structure
  5. Handle outcomes
  6. Verify

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

Responsible useGlossary