Skip to main content
Three read tools check a change, a mix of percentages or a share count against your rules. None of them writes anything.
read
Checks proposed changes, as shares added or removed, against a scenario’s bands and size ranges (a short against the class’s short size range), using prices you supply for every holding and every traded symbol. With Allow shorts on, a SELL can take a holding below zero and shares_after is negative for a short.The result:
  • Lists each rule outside its range before or after the change (newly, further or still outside, or back inside), the symbols no rule looked at, and when your positions were last updated.
  • Opens with a summary of those counts.
  • Sets within_rules true only when no rule is outside its range after the change, one was judged and cash stays at 0 or more; false is not confirmed and blocks nothing.
  • Also returns exposure_after, how much of the portfolio gains if prices rise once the change is applied, with options at their premium. That is a reading beside the rules, not part of the status.
Options and shorts:
  • A held option with a mark needs no price from you, and a trade in an expired option is refused in words, because it counts 0.
  • A SELL of a symbol you don’t hold, with Allow shorts off, says there is nothing to sell.
Writes nothing and decides nothing. A result inside every range does not say a change is advisable. Allocait cannot approve, stop or place an order.Key arguments:
  • portfolio_id
  • trades (1 to 50, each with symbol, side and either shares or notional)
  • prices
  • optional scenario_id (defaults to the active scenario)
A trade takes only symbol, side, shares or notional and asset_class; a price on a trade is refused, because prices go in prices.
read
Checks a mix you give as percentages instead of shares (a short is negative, a long can pass 100) against a scenario’s bands and size ranges (a short against the class’s short size range, by its size without the minus sign). Writes nothing. Recording a short still needs Allow shorts on and never an option holding. Each percentage must be between -1000000 and 1000000, and a CASH entry can’t be negative because cash is never held below zero. A symbol at 0 is an exit, and a class left with nothing in it counts as 0% against its band. A symbol you don’t hold counts in no class until you name its class in asset_classes, and the result’s hint names any you left out. Violations carry band_min_pct and band_max_pct. Key arguments: portfolio_id, allocations, optional scenario_id (defaults to the active scenario), optional asset_classes.
read
The share count that sits inside the size range you set for one holding, and what that does to cash. Writes nothing.
  • direction is long (the default) or short. For a short, pass the short size range of the asset class as size_min_pct and size_max_pct, a negative current_shares for a short you hold, and a positive manual_shares.
  • For a short, the share count, value and percent come back negative, and the status compares the absolute size with the range.
  • When basis_points takes the count outside the size range, the count stays and compliance_status says BELOW_MIN or ABOVE_MAX.
  • Percentages are 0 to 100, and portfolio_value is the total_value from a priced snapshot.
  • The result opens with a summary: shares now, shares at target, the signed change, and where the target sits against the size range. Without cash, can_afford and cash_after_trade are left out.
  • MINIMUM needs size_min_pct, MAXIMUM needs size_max_pct and BALANCED needs both; without its bound the call is refused.
Key arguments:
  • current_shares, price, portfolio_value
  • optional size_min_pct, size_max_pct, sizing_mode, manual_shares, cash, direction
  • optional basis_points (either sign, added to the target of every mode; with no sizing_mode and no manual_shares the target is the current size, so it moves the holding; a positive adjustment makes a short larger; ignored when manual_shares is given)

Next steps

Check result

Every field a check returns and how to read it.

Check a change

Who can call it, what to send and how to handle a failed call.

Size a position

Work out a share count that fits a size range.