Use cases · Buy side
Risk manager: 20 ways to use Ora
Limits, drawdowns, volatility regimes and pre-trade checks, with escalations that write themselves. Each example is a complete, runnable request with the real answers it returned (52 requests, captured 2026-10-31), what they mean and, where it fits, the action it would send.
ora-fin-0.1.1. Another model changes the request JSON and the Playground link; run it there to see its answers.Rule functions and facts used by this player (38)
offset 10sma 8atr 8log 5std 5max 5ref 5sqrt 4abs 3atr_pct 2avg 2percentrank 2swinglow 2crossdown 2rsi 2swinghigh 2min 1tr 1zscore 1days_to_earnings 1last_earnings_gap 1last_earnings_move 1highest 1lowest 1adx 1between 1gap_down 1gap_up 1gravestone_doji 1hanging_man 1harami_bear 1shooting_star 1iif 1willr 1marubozu 1outside_bar 1cut_last 1div_yield_ttm 1
Examples 1–10 of 20 · page 1 of 2
Risk manager · example 1
Pre-trade risk gate on a TSLA buy: block, reduce or allow
Every buy order passes a gate first: block on high drawdown odds with a broken trend, reduce in a wide-range regime, otherwise allow.
- StateTSLA
- Questions5 asked
- Answersreal, captured
- Actions3 rules · dry run
State
{"symbol":"TSLA"} The server fills in the latest completed session.
Questions
below_50d | English → rule | Is the stock more than 5% below its 50-day moving average? |
wide | rule | atr_pct(14) > 3A typical day moves more than 3% |
hv | rule | std(log(C / C[-1]), 20) * sqrt(252) > 0.4Annualized 20-day volatility above 40% |
drop10 | forecast | Will it drop at least 10% at some point in the next month? A 10% drawdown within a month |
big_move | forecast | Will there be a big move in either direction in the next 5 days? A big move either way in 5 days |
Answers
| Question | Answer | Reading |
|---|---|---|
below_50dIs the stock more than 5% below its 50-day moving average compiled to C < sma(C, 50) * 0.95 | 0.0641 | false |
wideA typical day moves more than 3% | 0.848 | true |
hvAnnualized 20-day volatility above 40% | 0.2867 | false |
drop10A 10% drawdown within a month | 0.638 | 64% · likely |
big_moveA big move either way in 5 days | 0.248 | 25% · unlikely |
Actions
Rules on the answers decide what to send.
drop10 >= 0.6 and below_50d >= 0.6→Webhookrisk-gatewide >= 0.6 or hv >= 0.6→Webhookrisk-gateelse→Webhookrisk-gate{
"symbol": "TSLA",
"decision": "reduce_size",
"max_fraction": 0.5,
"p_wide": 0.848,
"p_hv": 0.2867,
"as_of": "2026-10-30"
}What it means
For TSLA on the session of 2026-10-30: True now: A typical day moves more than 3%. Not true: Is the stock more than 5% below its 50-day moving average; Annualized 20-day volatility above 40%. Forecasts: A 10% drawdown within a month 64%; A big move either way in 5 days 25%. Fired: reduce (Webhook → risk-gate).
The order system reads one decision per request; the branches are checked in order, so a block wins over a reduce.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "TSLA"
},
"questions": {
"below_50d": {
"type": "yes_no",
"instructions": "Is the stock more than 5% below its 50-day moving average?"
},
"wide": {
"type": "yes_no",
"ask": "atr_pct(14) > 3"
},
"hv": {
"type": "yes_no",
"ask": "std(log(C / C[-1]), 20) * sqrt(252) > 0.4"
},
"drop10": {
"type": "yes_no",
"instructions": "Will it drop at least 10% at some point in the next month?"
},
"big_move": {
"type": "yes_no",
"instructions": "Will there be a big move in either direction in the next 5 days?"
}
},
"actions": [
{
"id": "block",
"when": "drop10 >= 0.6 and below_50d >= 0.6",
"do": "webhook",
"connection": "risk-gate",
"body": {
"symbol": "{{symbol}}",
"decision": "block",
"reason": "drawdown_odds_and_broken_trend",
"p_drop10": "{{drop10}}",
"p_below_50d": "{{below_50d}}",
"as_of": "{{as_of}}"
}
},
{
"id": "reduce",
"when": "wide >= 0.6 or hv >= 0.6",
"do": "webhook",
"connection": "risk-gate",
"body": {
"symbol": "{{symbol}}",
"decision": "reduce_size",
"max_fraction": 0.5,
"p_wide": "{{wide}}",
"p_hv": "{{hv}}",
"as_of": "{{as_of}}"
}
},
{
"id": "allow",
"when": "else",
"do": "webhook",
"connection": "risk-gate",
"body": {
"symbol": "{{symbol}}",
"decision": "allow",
"as_of": "{{as_of}}"
}
}
],
"dry_run": true
}Response JSON (TSLA, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"below_50d": {
"yes_no": 0.0641,
"rule": "C < sma(C, 50) * 0.95",
"basis": "comparison"
},
"wide": {
"yes_no": 0.848,
"rule": "atr_pct(14) > 3",
"basis": "rule"
},
"hv": {
"yes_no": 0.2867,
"rule": "std(log(C / C[-1]), 20) * sqrt(252) > 0.4",
"basis": "rule"
},
"drop10": {
"yes_no": 0.638
},
"big_move": {
"yes_no": 0.248
}
},
"context": {
"symbol": "TSLA",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "block",
"fired": false,
"status": "skipped"
},
{
"id": "reduce",
"fired": true,
"status": "dry_run",
"do": "webhook",
"connection": "risk-gate",
"preview": {
"body": {
"symbol": "TSLA",
"decision": "reduce_size",
"max_fraction": 0.5,
"p_wide": 0.848,
"p_hv": 0.2867,
"as_of": "2026-10-30"
}
}
},
{
"id": "allow",
"fired": false,
"status": "skipped"
}
]
}Risk manager · example 2
Drawdown limit breach opens a ticket
When a position falls more than 20% from its 52-week high, open a limit-breach ticket for the risk committee.
- State4 symbols
- Questions4 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"PFE"} then INTC, BA, NKE, one request each. The server fills in the latest completed session.
Questions
dd20 | rule | C < 0.8 * max(H, 252)More than 20% off the 52-week high |
bear | English → rule | Is the stock in bear-market territory, more than 20% below its 52-week high? |
still_falling | English → rule | Is the stock down more than 5% over the last month? |
drop10 | forecast | Will it drop at least 10% at some point in the next month? A 10% drawdown within a month |
Answers
| Symbol | dd20rule | bearrule | still_fallingrule | drop10forecast | Fired |
|---|---|---|---|---|---|
PFE | 0.0537 | 0.0537 | 0.0589 | 0.418 | none |
INTC | 0.9463 | 0.9463 | 0.9324 | 0.836 | ticket |
BA | 0.9296 | 0.9296 | 0.8487 | 0.426 | ticket |
NKE | 0.9463 | 0.9463 | 0.0569 | 0.602 | ticket |
true false not known for rules; forecasts are odds. Hover a column for its question.
Actions
Rules on the answers decide what to send. Each symbol runs its own request, so each one can fire.
dd20 >= 0.6→Webhookrisk-tickets{
"type": "limit_breach",
"limit": "drawdown_20pct_from_52w_high",
"symbol": "INTC",
"p_breach": 0.9463,
"p_still_falling": 0.9324,
"p_drop10": 0.836,
"as_of": "2026-10-30"
}{
"type": "limit_breach",
"limit": "drawdown_20pct_from_52w_high",
"symbol": "BA",
"p_breach": 0.9296,
"p_still_falling": 0.8487,
"p_drop10": 0.426,
"as_of": "2026-10-30"
}{
"type": "limit_breach",
"limit": "drawdown_20pct_from_52w_high",
"symbol": "NKE",
"p_breach": 0.9463,
"p_still_falling": 0.0569,
"p_drop10": 0.602,
"as_of": "2026-10-30"
}What it means
Session of 2026-10-30, 4 symbols: More than 20% off the 52-week high: true for INTC, BA, NKE of 4. Is the stock in bear-market territory, more than 20% below its 52-week high: true for INTC, BA, NKE of 4. Is the stock down more than 5% over the last month: true for INTC, BA of 4. Highest odds for “A 10% drawdown within a month”: INTC at 84%. ticket fired for INTC, BA, NKE.
The ticket is raised only on the exact rule; the forecast rides along so the committee sees whether more downside is likely.
Request JSON (PFE; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "PFE"
},
"questions": {
"dd20": {
"type": "yes_no",
"ask": "C < 0.8 * max(H, 252)"
},
"bear": {
"type": "yes_no",
"instructions": "Is the stock in bear-market territory, more than 20% below its 52-week high?"
},
"still_falling": {
"type": "yes_no",
"instructions": "Is the stock down more than 5% over the last month?"
},
"drop10": {
"type": "yes_no",
"instructions": "Will it drop at least 10% at some point in the next month?"
}
},
"actions": [
{
"id": "ticket",
"when": "dd20 >= 0.6",
"do": "webhook",
"connection": "risk-tickets",
"body": {
"type": "limit_breach",
"limit": "drawdown_20pct_from_52w_high",
"symbol": "{{symbol}}",
"p_breach": "{{dd20}}",
"p_still_falling": "{{still_falling}}",
"p_drop10": "{{drop10}}",
"as_of": "{{as_of}}"
}
}
],
"dry_run": true
}Response JSON (PFE, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"dd20": {
"yes_no": 0.0537,
"rule": "C < 0.8 * max(H, 252)",
"basis": "rule"
},
"bear": {
"yes_no": 0.0537,
"rule": "C < 0.8 * max(H, 252)",
"basis": "pattern"
},
"still_falling": {
"yes_no": 0.0589,
"rule": "C / C[-21] - 1 < -0.05",
"basis": "pattern"
},
"drop10": {
"yes_no": 0.418
}
},
"context": {
"symbol": "PFE",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "ticket",
"fired": false,
"status": "skipped"
}
]
}Risk manager · example 3
Volatility regime check on SPY for the firm-wide limit
Decide whether the firm is in a calm or stressed regime by checking realized volatility and range expansion on the index.
- StateSPY
- Questions6 asked
- Answersreal, captured
- Actions2 rules · dry run
State
{"symbol":"SPY"} The server fills in the latest completed session.
Questions
hv_low | English → rule | Is 20-day historical volatility below 20%? |
vol5_up | English → rule | Is 5-day volatility higher than 20-day volatility? |
atr_exp | rule | atr(14) > 1.2 * ref(atr(14), -10)ATR up 20% in two weeks |
range_exp | rule | (max(H, 5) - min(L, 5)) > 1.5 * ref(max(H, 5) - min(L, 5), -5)This week's range is 1.5× last week's |
vol_month | forecast | Will volatility be higher over the next month? Higher volatility next month |
hv30 | forecast | Will annualized volatility over the next 21 sessions exceed 30%? Next-month volatility above 30% |
Answers
| Question | Answer | Reading |
|---|---|---|
hv_lowIs 20-day historical volatility below 20% compiled to std(log(C / C[-1]), 20) * sqrt(20 / 19) * sqrt(252) < 0.2 | 0.9463 | true |
vol5_upIs 5-day volatility higher than 20-day volatility compiled to std(log(C / C[-1]), 5) * sqrt(5 / 4) > std(log(C / C[-1]), 20) * sqrt(20 / 19) | 0.8872 | true |
atr_expATR up 20% in two weeks | 0.2117 | false |
range_expThis week's range is 1.5× last week's | 0.4679 | on the line (false) |
vol_monthHigher volatility next month | 0.69 | 69% · likely |
hv30Next-month volatility above 30% | 0.564 | 56% · close to even |
Actions
Rules on the answers decide what to send.
vol5_up >= 0.6 and atr_exp >= 0.6→Slackrisk-deskelse→Slackrisk-desk{
"text": "SPY (2026-10-30): no volatility expansion (5d vs 20d 89%, ATR 21%). Limits unchanged."
}What it means
For SPY on the session of 2026-10-30: True now: Is 20-day historical volatility below 20%; Is 5-day volatility higher than 20-day volatility. Not true: ATR up 20% in two weeks. On the line: This week's range is 1.5× last week's. Forecasts: Higher volatility next month 69%; Next-month volatility above 30% 56%. Fired: calm (Slack → risk-desk).
The regime message sets the day's gross limits; the forecasts say whether the regime is likely to change over the month.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "SPY"
},
"questions": {
"hv_low": {
"type": "yes_no",
"instructions": "Is 20-day historical volatility below 20%?"
},
"vol5_up": {
"type": "yes_no",
"instructions": "Is 5-day volatility higher than 20-day volatility?"
},
"atr_exp": {
"type": "yes_no",
"ask": "atr(14) > 1.2 * ref(atr(14), -10)"
},
"range_exp": {
"type": "yes_no",
"ask": "(max(H, 5) - min(L, 5)) > 1.5 * ref(max(H, 5) - min(L, 5), -5)"
},
"vol_month": {
"type": "yes_no",
"instructions": "Will volatility be higher over the next month?"
},
"hv30": {
"type": "yes_no",
"instructions": "Will annualized volatility over the next 21 sessions exceed 30%?"
}
},
"actions": [
{
"id": "stressed",
"when": "vol5_up >= 0.6 and atr_exp >= 0.6",
"do": "slack",
"connection": "risk-desk",
"message": "SPY ({{as_of}}): short-term volatility above 20-day and ATR expanding. Higher vol next month {{vol_month|pct}}. Tightening gross limits per policy."
},
{
"id": "calm",
"when": "else",
"do": "slack",
"connection": "risk-desk",
"message": "SPY ({{as_of}}): no volatility expansion (5d vs 20d {{vol5_up|pct}}, ATR {{atr_exp|pct}}). Limits unchanged."
}
],
"dry_run": true
}Response JSON (SPY, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"hv_low": {
"yes_no": 0.9463,
"rule": "std(log(C / C[-1]), 20) * sqrt(20 / 19) * sqrt(252) < 0.2",
"basis": "pattern"
},
"vol5_up": {
"yes_no": 0.8872,
"rule": "std(log(C / C[-1]), 5) * sqrt(5 / 4) > std(log(C / C[-1]), 20) * sqrt(20 / 19)",
"basis": "pattern"
},
"atr_exp": {
"yes_no": 0.2117,
"rule": "atr(14) > 1.2 * ref(atr(14), -10)",
"basis": "rule"
},
"range_exp": {
"yes_no": 0.4679,
"rule": "(max(H, 5) - min(L, 5)) > 1.5 * ref(max(H, 5) - min(L, 5), -5)",
"basis": "rule"
},
"vol_month": {
"yes_no": 0.69
},
"hv30": {
"yes_no": 0.564
}
},
"context": {
"symbol": "SPY",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "stressed",
"fired": false,
"status": "skipped"
},
{
"id": "calm",
"fired": true,
"status": "dry_run",
"do": "slack",
"connection": "risk-desk",
"preview": {
"text": "SPY (2026-10-30): no volatility expansion (5d vs 20d 89%, ATR 21%). Limits unchanged."
}
}
]
}Risk manager · example 4
Return-shock detector across the top positions
Flag any position whose daily return is a two-sigma shock against its own recent history.
- State3 symbols
- Questions3 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"AAPL"} then JPM, XOM, one request each. The server fills in the latest completed session.
Questions
shock | rule | zscore(C / C[-1] - 1, 20) < -2A two-sigma down day |
zret | rule | zscore(C / C[-1] - 1, 60) > 2Daily return more than two sigma above its 60-day mean |
tr_wide | rule | tr() > 2 * ref(atr(14), -1)True range over twice yesterday's ATR |
Answers
| Symbol | shockrule | zretrule | tr_widerule | Fired |
|---|---|---|---|---|
AAPL | 0.253 | 0.0537 | 0.8247 | shock_alert |
JPM | 0.5937 | 0.0537 | 0.1967 | none |
XOM | 0.0537 | 0.1669 | 0.0673 | none |
true false not known for rules; forecasts are odds. Hover a column for its question.
Actions
Rules on the answers decide what to send. Each symbol runs its own request, so each one can fire.
shock >= 0.6 or zret >= 0.6 or tr_wide >= 0.6→Emailrisk-team{
"subject": "Return shock: AAPL (2026-10-30)",
"text": "AAPL moved abnormally: down shock 25%, up shock 5%, true range over 2 ATR 82%. Re-run VaR for books holding it."
}What it means
Session of 2026-10-30, 3 symbols: A two-sigma down day: true for none of 3. Daily return more than two sigma above its 60-day mean: true for none of 3. True range over twice yesterday's ATR: true for AAPL of 3. shock_alert fired for AAPL.
Shocks in either direction change position risk; the email asks for a VaR rerun rather than a trade.
Request JSON (AAPL; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "AAPL"
},
"questions": {
"shock": {
"type": "yes_no",
"ask": "zscore(C / C[-1] - 1, 20) < -2"
},
"zret": {
"type": "yes_no",
"ask": "zscore(C / C[-1] - 1, 60) > 2"
},
"tr_wide": {
"type": "yes_no",
"ask": "tr() > 2 * ref(atr(14), -1)"
}
},
"actions": [
{
"id": "shock_alert",
"when": "shock >= 0.6 or zret >= 0.6 or tr_wide >= 0.6",
"do": "email",
"connection": "risk-team",
"subject": "Return shock: {{symbol}} ({{as_of}})",
"message": "{{symbol}} moved abnormally: down shock {{shock|pct}}, up shock {{zret|pct}}, true range over 2 ATR {{tr_wide|pct}}. Re-run VaR for books holding it."
}
],
"dry_run": true
}Response JSON (AAPL, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"shock": {
"yes_no": 0.253,
"rule": "zscore(C / C[-1] - 1, 20) < -2",
"basis": "rule"
},
"zret": {
"yes_no": 0.0537,
"rule": "zscore(C / C[-1] - 1, 60) > 2",
"basis": "rule"
},
"tr_wide": {
"yes_no": 0.8247,
"rule": "tr() > 2 * ref(atr(14), -1)",
"basis": "rule"
}
},
"context": {
"symbol": "AAPL",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "shock_alert",
"fired": true,
"status": "dry_run",
"do": "email",
"connection": "risk-team",
"preview": {
"subject": "Return shock: AAPL (2026-10-30)",
"text": "AAPL moved abnormally: down shock 25%, up shock 5%, true range over 2 ATR 82%. Re-run VaR for books holding it."
}
}
]
}Risk manager · example 5
Event risk: positions reporting within five days
List positions with a report inside five days and a history of large reactions, so event exposure is sized deliberately.
- State4 symbols
- Questions4 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"NFLX"} then TSLA, AMD, MU, one request each. The server fills in the latest completed session.
Questions
soon | English → rule | Is earnings in the next 5 days? |
big | rule | abs(last_earnings_move) > 5Last earnings move bigger than 5% |
gap_last | English → rule | Did the stock gap down more than 2% after its last earnings? |
big_move5 | forecast | Will there be a big move in either direction in the next 5 days? A big move either way in 5 days |
Answers
| Symbol | soonrule | bigrule | gap_lastrule | big_move5forecast |
|---|---|---|---|---|
NFLX | 0.0537 | 0.9463 | 0.9463 | 0.325 |
TSLA | 0.0537 | 0.0537 | 0.9463 | 0.248 |
AMD | 0.686 | 0.9463 | 0.9463 | 0.28 |
MU | 0.0537 | 0.0537 | 0.0537 | 0.355 |
true false not known for rules; forecasts are odds. Hover a column for its question.
What it means
Session of 2026-10-30, 4 symbols: Is earnings in the next 5 days: true for AMD of 4. Last earnings move bigger than 5%: true for NFLX, AMD of 4. Did the stock gap down more than 2% after its last earnings: true for NFLX, TSLA, AMD of 4. Highest odds for “A big move either way in 5 days”: MU at 36%.
Names with a report close and a large last reaction carry gap risk that stops cannot protect; those are sized before the print.
Request JSON (NFLX; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "NFLX"
},
"questions": {
"soon": {
"type": "yes_no",
"instructions": "Is earnings in the next 5 days?"
},
"big": {
"type": "yes_no",
"ask": "abs(last_earnings_move) > 5"
},
"gap_last": {
"type": "yes_no",
"instructions": "Did the stock gap down more than 2% after its last earnings?"
},
"big_move5": {
"type": "yes_no",
"instructions": "Will there be a big move in either direction in the next 5 days?"
}
}
}Response JSON (NFLX, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"soon": {
"yes_no": 0.0537,
"rule": "days_to_earnings <= 5",
"basis": "pattern"
},
"big": {
"yes_no": 0.9463,
"rule": "abs(last_earnings_move) > 5",
"basis": "rule"
},
"gap_last": {
"yes_no": 0.9463,
"rule": "last_earnings_gap < -2",
"basis": "pattern"
},
"big_move5": {
"yes_no": 0.325
}
},
"context": {
"symbol": "NFLX",
"as_of": "2026-10-30"
}
}Risk manager · example 6
Liquidity check on the small-cap sleeve
Confirm that small-cap and regional bank exposures still trade enough dollar volume to exit in a stress scenario.
- State3 symbols
- Questions4 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"IWM"} then KRE, IJR, one request each. The server fills in the latest completed session.
Questions
liquid | rule | avg(C * V, 20) > 100000000Trades more than $100 million a day |
dry | rule | V < 0.6 * avg(V, 20)Volume under 60% of normal |
vol_rank | rule | percentrank(V, 50) > 90Volume in the top tenth of 50 sessions |
wide | rule | (H - L) > 2 * avg(H - L, 20)Range more than twice the 20-day average range |
Answers
| Symbol | liquidrule | dryrule | vol_rankrule | widerule |
|---|---|---|---|---|
IWM | 0.9463 | 0.0836 | 0.154 | 0.1804 |
KRE | 0.9463 | 0.0659 | 0.3136 | 0.0628 |
IJR | 0.9463 | 0.1339 | 0.1077 | 0.1008 |
true false not known for rules; forecasts are odds. Hover a column for its question.
What it means
Session of 2026-10-30, 3 symbols: Trades more than $100 million a day: true for IWM, KRE, IJR of 3. Volume under 60% of normal: true for none of 3. Volume in the top tenth of 50 sessions: true for none of 3. Range more than twice the 20-day average range: true for none of 3.
Volume drying up in a sleeve that must be sold fast lengthens the exit; a 90th-percentile volume day can be a forced-selling sign.
Request JSON (IWM; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "IWM"
},
"questions": {
"liquid": {
"type": "yes_no",
"ask": "avg(C * V, 20) > 100000000"
},
"dry": {
"type": "yes_no",
"ask": "V < 0.6 * avg(V, 20)"
},
"vol_rank": {
"type": "yes_no",
"ask": "percentrank(V, 50) > 90"
},
"wide": {
"type": "yes_no",
"ask": "(H - L) > 2 * avg(H - L, 20)"
}
}
}Response JSON (IWM, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"liquid": {
"yes_no": 0.9463,
"rule": "avg(C * V, 20) > 100000000",
"basis": "rule"
},
"dry": {
"yes_no": 0.0836,
"rule": "V < 0.6 * avg(V, 20)",
"basis": "rule"
},
"vol_rank": {
"yes_no": 0.154,
"rule": "percentrank(V, 50) > 90",
"basis": "rule"
},
"wide": {
"yes_no": 0.1804,
"rule": "(H - L) > 2 * avg(H - L, 20)",
"basis": "rule"
}
},
"context": {
"symbol": "IWM",
"as_of": "2026-10-30"
}
}Risk manager · example 7
Stop discipline on AMD: is the swing-low stop broken?
Enforce the desk's stop policy: exit when price closes under the last swing low or the chandelier stop.
- StateAMD
- Questions5 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"AMD"} The server fills in the latest completed session.
Questions
below_swing | rule | C < swinglow(5, 1)Closed below the latest swing low |
below_prior_swing | rule | C < swinglow(5, 2)Closed below the swing low before that |
chandelier | rule | C < highest(H, 22) - 3 * atr(22)Chandelier exit: 3 ATR under the 22-day high |
stop_dist | English → rule | Is a stop below the last swing low less than 1.5 ATR away? |
drop5 | forecast | Will it drop at least 5% at some point in the next month? A 5% drawdown within a month |
Answers
| Question | Answer | Reading |
|---|---|---|
below_swingClosed below the latest swing low | 0.4767 | on the line (false) |
below_prior_swingClosed below the swing low before that | 0.1313 | false |
chandelierChandelier exit: 3 ATR under the 22-day high | 0.9137 | true |
stop_distIs a stop below the last swing low less than 1.5 ATR away compiled to (C > swinglow(5, 1)) and (C - swinglow(5, 1) < 1.5 * atr(14)) | 0.5233 | on the line (true) |
drop5A 5% drawdown within a month | 0.763 | 76% · likely |
Actions
Rules on the answers decide what to send.
below_swing >= 0.6 or chandelier >= 0.6→Webhookoms{
"symbol": "AMD",
"decision": "exit_long",
"policy": "swing_low_or_chandelier",
"p_swing": 0.4767,
"p_chandelier": 0.9137,
"as_of": "2026-10-30"
}What it means
For AMD on the session of 2026-10-30: True now: Chandelier exit: 3 ATR under the 22-day high. Not true: Closed below the swing low before that. On the line: Closed below the latest swing low; Is a stop below the last swing low less than 1.5 ATR away. Forecasts: A 5% drawdown within a month 76%. Fired: exit (Webhook → oms).
The exit is an exact rule on the close, which keeps the policy mechanical; the forecast is not part of the trigger.
Request JSON
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "AMD"
},
"questions": {
"below_swing": {
"type": "yes_no",
"ask": "C < swinglow(5, 1)"
},
"below_prior_swing": {
"type": "yes_no",
"ask": "C < swinglow(5, 2)"
},
"chandelier": {
"type": "yes_no",
"ask": "C < highest(H, 22) - 3 * atr(22)"
},
"stop_dist": {
"type": "yes_no",
"instructions": "Is a stop below the last swing low less than 1.5 ATR away?"
},
"drop5": {
"type": "yes_no",
"instructions": "Will it drop at least 5% at some point in the next month?"
}
},
"actions": [
{
"id": "exit",
"when": "below_swing >= 0.6 or chandelier >= 0.6",
"do": "webhook",
"connection": "oms",
"body": {
"symbol": "{{symbol}}",
"decision": "exit_long",
"policy": "swing_low_or_chandelier",
"p_swing": "{{below_swing}}",
"p_chandelier": "{{chandelier}}",
"as_of": "{{as_of}}"
}
}
],
"dry_run": true
}Response JSON (AMD, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"below_swing": {
"yes_no": 0.4767,
"rule": "C < swinglow(5, 1)",
"basis": "rule"
},
"below_prior_swing": {
"yes_no": 0.1313,
"rule": "C < swinglow(5, 2)",
"basis": "rule"
},
"chandelier": {
"yes_no": 0.9137,
"rule": "C < highest(H, 22) - 3 * atr(22)",
"basis": "rule"
},
"stop_dist": {
"yes_no": 0.5233,
"rule": "(C > swinglow(5, 1)) and (C - swinglow(5, 1) < 1.5 * atr(14))",
"basis": "pattern"
},
"drop5": {
"yes_no": 0.763
}
},
"context": {
"symbol": "AMD",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "exit",
"fired": true,
"status": "dry_run",
"do": "webhook",
"connection": "oms",
"preview": {
"body": {
"symbol": "AMD",
"decision": "exit_long",
"policy": "swing_low_or_chandelier",
"p_swing": 0.4767,
"p_chandelier": 0.9137,
"as_of": "2026-10-30"
}
}
}
]
}Risk manager · example 8
Credit risk-off signal from high yield
Watch HYG and JNK for breakdowns that often precede equity stress.
- State2 symbols
- Questions4 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"HYG"} then JNK, one request each. The server fills in the latest completed session.
Questions
below_50 | English → rule | Is the stock below its 200-day moving average? |
breakdown | rule | C < lowest(L, 20)Closed under the 20-day low |
cross_dn | rule | crossdown(sma(C, 20), sma(C, 50))20-day average crossed under the 50-day today |
down_week | forecast | Will the stock be lower in a week? Lower in a week |
Answers
| Symbol | below_50rule | breakdownrule | cross_dnrule | down_weekforecast | Fired |
|---|---|---|---|---|---|
HYG | 0.8091 | 0.0811 | 0.05 | 0.425 | none |
JNK | 0.8478 | 0.0813 | 0.05 | 0.456 | none |
true false not known for rules; forecasts are odds. Hover a column for its question.
Actions
Rules on the answers decide what to send. Each symbol runs its own request, so each one can fire.
breakdown >= 0.6 or cross_dn >= 0.6→Slackrisk-deskWhat it means
Session of 2026-10-30, 2 symbols: Is the stock below its 200-day moving average: true for HYG, JNK of 2. Closed under the 20-day low: true for none of 2. 20-day average crossed under the 50-day today: true for none of 2. Highest odds for “Lower in a week”: JNK at 46%. risk_off fired for none.
A breakdown in high yield is an early warning that the equity book's beta deserves a second look.
Request JSON (HYG; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "HYG"
},
"questions": {
"below_50": {
"type": "yes_no",
"instructions": "Is the stock below its 200-day moving average?"
},
"breakdown": {
"type": "yes_no",
"ask": "C < lowest(L, 20)"
},
"cross_dn": {
"type": "yes_no",
"ask": "crossdown(sma(C, 20), sma(C, 50))"
},
"down_week": {
"type": "yes_no",
"instructions": "Will the stock be lower in a week?"
}
},
"actions": [
{
"id": "risk_off",
"when": "breakdown >= 0.6 or cross_dn >= 0.6",
"do": "slack",
"connection": "risk-desk",
"message": "{{symbol}} ({{as_of}}): high-yield breakdown (20-day low {{breakdown|pct}}, 20/50 cross down {{cross_dn|pct}}). Review equity beta."
}
],
"dry_run": true
}Response JSON (HYG, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"below_50": {
"yes_no": 0.8091,
"rule": "C < sma(C, 200)",
"basis": "comparison"
},
"breakdown": {
"yes_no": 0.0811,
"rule": "C < lowest(L, 20)",
"basis": "rule"
},
"cross_dn": {
"yes_no": 0.05,
"rule": "crossdown(sma(C, 20), sma(C, 50))",
"basis": "rule"
},
"down_week": {
"yes_no": 0.425
}
},
"context": {
"symbol": "HYG",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "risk_off",
"fired": false,
"status": "skipped"
}
]
}Risk manager · example 9
After-close risk digest for the CRO
Every evening, the same risk questions for the largest exposures, with a message only where something is breached.
- ScheduleMon–Fri at 17:00 ET
- State5 symbols
- Questions3 asked
- Answersreal, captured
- Actions1 rule · dry run
State
{"symbol":"SPY"} then QQQ, TLT, GLD, USO, one request each. The server fills in the latest completed session.
Questions
below_200 | English → rule | Is the stock below its 200-day moving average? |
hv | rule | std(log(C / C[-1]), 20) * sqrt(252) > 0.4Annualized 20-day volatility above 40% |
drop5 | forecast | Will it drop at least 5% at some point in the next month? A 5% drawdown within a month |
Answers
| Symbol | below_200rule | hvrule | drop5forecast | Fired |
|---|---|---|---|---|
SPY | 0.0549 | 0.0537 | 0.203 | none |
QQQ | 0.2013 | 0.0537 | 0.443 | none |
TLT | 0.8873 | 0.0537 | 0.164 | breach |
GLD | 0.9463 | 0.0537 | 0.435 | breach |
USO | 0.0537 | 0.1075 | 0.615 | none |
true false not known for rules; forecasts are odds. Hover a column for its question.
Actions
Rules on the answers decide what to send. Each symbol runs its own request, so each one can fire.
below_200 >= 0.6 or hv >= 0.6→Emailcro{
"subject": "Risk digest: TLT (2026-10-30)",
"text": "TLT: below 200-day 89%, 20-day vol above 40% 5%, 5% drawdown odds 16%."
}{
"subject": "Risk digest: GLD (2026-10-30)",
"text": "GLD: below 200-day 95%, 20-day vol above 40% 5%, 5% drawdown odds 44%."
}What it means
Session of 2026-10-30, 5 symbols: Is the stock below its 200-day moving average: true for TLT, GLD of 5. Annualized 20-day volatility above 40%: true for none of 5. Highest odds for “A 5% drawdown within a month”: USO at 62%. breach fired for TLT, GLD.
The CRO reads only the exposures that broke a trend or volatility threshold; silence means all within policy.
As a scheduled workflow (Mon–Fri at 17:00 ET)
Create it under Workflows in the console: it runs these questions for every symbol on the schedule and fires the actions per symbol. The answers above are what one run returned.
{
"name": "After-close risk digest for the CRO",
"symbols": "SPY QQQ TLT GLD USO",
"days": [
1,
2,
3,
4,
5
],
"at_time": "17:00",
"model": "ora-fin-0.1.1",
"questions": {
"below_200": {
"type": "yes_no",
"instructions": "Is the stock below its 200-day moving average?"
},
"hv": {
"type": "yes_no",
"ask": "std(log(C / C[-1]), 20) * sqrt(252) > 0.4"
},
"drop5": {
"type": "yes_no",
"instructions": "Will it drop at least 5% at some point in the next month?"
}
},
"actions": [
{
"id": "breach",
"when": "below_200 >= 0.6 or hv >= 0.6",
"do": "email",
"connection": "cro",
"subject": "Risk digest: {{symbol}} ({{as_of}})",
"message": "{{symbol}}: below 200-day {{below_200|pct}}, 20-day vol above 40% {{hv|pct}}, 5% drawdown odds {{drop5|pct}}."
}
]
}Request JSON (SPY; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "SPY"
},
"questions": {
"below_200": {
"type": "yes_no",
"instructions": "Is the stock below its 200-day moving average?"
},
"hv": {
"type": "yes_no",
"ask": "std(log(C / C[-1]), 20) * sqrt(252) > 0.4"
},
"drop5": {
"type": "yes_no",
"instructions": "Will it drop at least 5% at some point in the next month?"
}
},
"actions": [
{
"id": "breach",
"when": "below_200 >= 0.6 or hv >= 0.6",
"do": "email",
"connection": "cro",
"subject": "Risk digest: {{symbol}} ({{as_of}})",
"message": "{{symbol}}: below 200-day {{below_200|pct}}, 20-day vol above 40% {{hv|pct}}, 5% drawdown odds {{drop5|pct}}."
}
],
"dry_run": true
}Response JSON (SPY, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"below_200": {
"yes_no": 0.0549,
"rule": "C < sma(C, 200)",
"basis": "comparison"
},
"hv": {
"yes_no": 0.0537,
"rule": "std(log(C / C[-1]), 20) * sqrt(252) > 0.4",
"basis": "rule"
},
"drop5": {
"yes_no": 0.203
}
},
"context": {
"symbol": "SPY",
"as_of": "2026-10-30"
},
"actions": [
{
"id": "breach",
"fired": false,
"status": "skipped"
}
]
}Risk manager · example 10
Leveraged ETF exposure: TQQQ and SQQQ volatility drag
Leveraged funds lose value in choppy markets; check volatility and direction before the desk holds them overnight.
- State2 symbols
- Questions4 asked
- Answersreal, captured
- Actionsnone
State
{"symbol":"TQQQ"} then SQQQ, one request each. The server fills in the latest completed session.
Questions
atr | rule | atr_pct(14) > 4ATR over 4% of price |
chop | rule | between(adx(14), 0, 20)ADX under 20 (no trend) |
hv | rule | std(log(C / C[-1]), 20) * sqrt(252) > 0.620-day realized volatility above 60% |
vol_rise | forecast | Will volatility rise over the next 5 days? Volatility rising over 5 days |
Answers
| Symbol | atrrule | choprule | hvrule | vol_riseforecast |
|---|---|---|---|---|
TQQQ | 0.9463 | 0.05 | 0.8054 | 0.427 |
SQQQ | 0.8271 | 0.05 | 0.702 | 0.232 |
true false not known for rules; forecasts are odds. Hover a column for its question.
What it means
Session of 2026-10-30, 2 symbols: ATR over 4% of price: true for TQQQ, SQQQ of 2. ADX under 20 (no trend): true for none of 2. 20-day realized volatility above 60%: true for TQQQ, SQQQ of 2. Highest odds for “Volatility rising over 5 days”: TQQQ at 43%.
High volatility with no trend is the worst case for a leveraged fund; the desk caps overnight holdings when both are true.
Request JSON (TQQQ; the others differ only in the symbol)
{
"model": "ora-fin-0.1.1",
"state": {
"symbol": "TQQQ"
},
"questions": {
"atr": {
"type": "yes_no",
"ask": "atr_pct(14) > 4"
},
"chop": {
"type": "yes_no",
"ask": "between(adx(14), 0, 20)"
},
"hv": {
"type": "yes_no",
"ask": "std(log(C / C[-1]), 20) * sqrt(252) > 0.6"
},
"vol_rise": {
"type": "yes_no",
"instructions": "Will volatility rise over the next 5 days?"
}
}
}Response JSON (TQQQ, real)
{
"model": "ora-fin-0.1.1",
"answers": {
"atr": {
"yes_no": 0.9463,
"rule": "atr_pct(14) > 4",
"basis": "rule"
},
"chop": {
"yes_no": 0.05,
"rule": "between(adx(14), 0, 20)",
"basis": "rule"
},
"hv": {
"yes_no": 0.8054,
"rule": "std(log(C / C[-1]), 20) * sqrt(252) > 0.6",
"basis": "rule"
},
"vol_rise": {
"yes_no": 0.427
}
},
"context": {
"symbol": "TQQQ",
"as_of": "2026-10-30"
}
}Information, not investment advice. Rules answer from the latest completed daily session; forecasts are probabilities. Actions ran as dry runs: nothing was sent. More in Buy side: Financial advisor / RIA, Wealth manager, Family office, Hedge fund PM, Quant researcher, Portfolio manager (long-only), Private equity, VC / growth investor, Fund-of-funds allocator.