Disclaimer
Not Investment Advice
Information provided is for general education and risk awareness only. It is not financial, investment, tax, legal, or trading advice, nor a recommendation to buy, sell, or hold any instruments.
Legitimate Thailand Planning Only
This assistant supports lawful Thailand travel, relocation, vacation, and retreat planning, including itinerary ideas, logistics, cultural preparation, accommodation research, wellness options, and compliant, transparent decision support for legitimate travelers only.
No Illegal Evasion or Escape Assistance
This service will not assist with hiding, evading authorities, circumventing immigration, court orders, debts, sanctions, or legal obligations, unlawful flight, false documents, concealment, or any illegal escape under any circumstances.
Short Straddle Trading-Risk Governance Scope
Short Straddle Trading-Risk Governance content follows the uploaded framework, emphasizing Delta, Gamma, Vega, margin, liquidity, stress loss, anti-martingale behavior, limits, escalation, monitoring, documentation, approvals, and governance controls for oversight discipline.
Demo: Memory Trading Decision-Making Quality
Trader: Record this in my trade journal: Instrument: QQQ options Action: skipped trade Reason: bid-ask spread was too wide Result: no trade taken Lesson: avoid forcing entries
Trader: Let's do my end-of-day review. P&L was flat. I followed my rules. Main mistake: I kept watching a poor setup for too long. Improvement: define a time limit for monitoring low-quality setups.
Demo: Summary Execute Note for Trader
This note replaces Demo Output Summary and should be used after Step 1 to Step 9 of the trader morning routine. It is for educational risk-management use only, not investment advice or a trade recommendation.
From March to June 2026, the macro setup is not a clean low-volatility environment. May CPI rose 4.2% year over year, the highest annual inflation reading in three years, while core CPI was 2.9% year over year. Energy prices were a major contributor, with energy up 3.9% for the month and 23.5% over 12 months. This matters for short-option selling because inflation shocks can reprice rates, volatility, index skew, and margin requirements quickly.
The May labor market was still firm, with reported nonfarm payrolls up 172,000, unemployment at 4.3%, and average hourly earnings up 3.4% year over year. A resilient labor market gives the Fed less pressure to ease quickly, which keeps rate-volatility and equity-volatility risk relevant for short premium strategies.
The next FOMC decision window is mid-June 2026, and market commentary indicates the Fed is expected to stay cautious because inflation remains above target. The same source reports the 2-year Treasury near 4.13% and the 10-year Treasury near 4.55%, showing that rates remain high enough to matter for discount rates, equity multiples, and option volatility risk.
Volatility is elevated enough to demand caution, but not extreme enough to justify ignoring tail risk. FRED shows the CBOE VIX at 22.22 on June 10, 2026, and the CBOE S&P 500 3-Month Volatility Index at 22.89 on the same date. This means near-term and 3-month implied volatility are both active risk inputs for any Short Straddle or Short Strangle review.
A separate market-data source showed VIX at 18.84 intraday on June 11, 2026, with a 3-month change of minus 30.96% and a 52-week range of 13.38 to 35.30. This suggests volatility has compressed from prior stress levels but remains capable of sharp jumps, which is exactly the type of setup where short-option traders can become overconfident.
Table of Contents
Part 1: Short Straddle Trading-Risk Governance Architecture This part introduces Short Straddle Trading-Risk Governance using Amazon Bedrock AgentCore Memory. It explains how persistent memory supports disciplined monitoring of Delta, Gamma, Vega, margin, liquidity, stress loss, and anti-martingale behavior. The goal is workflow control, not market prediction, trade recommendation, or premium-seeking without hard risk limits across daily sessions.
Part 2: Cross-Session Persistence This part explains cross-session persistence. The assistant remembers prior warnings, unresolved actions, dashboard preferences, and repeated recovery-trading patterns. It prevents each morning from becoming a blank slate after Delta drift, Vega shock, margin pressure, liquidity deterioration, or emotional premium-repair behavior, strengthening continuity, supervision, and daily Short Straddle risk review routines.
Part 3: Memory Extraction Pipeline This part describes memory extraction. The assistant identifies facts, preferences, summaries, exposure details, monitoring habits, risk limits, and follow-up items from conversations. Stored context can include Short Straddle exposure, Net Delta, Cash Delta, Gamma Cash, Vega, DTE, IV change, skew, margin usage, bid-ask spread, and stress-loss thresholds that are securely tracked each day.
Part 4: Episodic Memory Strategy This part covers episodic memory. The assistant captures situations, user intent, tools used, reasoning path, outcomes, and lessons from trading routines. Reflections across episodes reveal patterns such as ignored hard limits, martingale behavior, Short Gamma concentration, Short Vega expansion, liquidity stress, and governance weakness requiring stronger future risk language controls.
Part 5: Trader Morning Market Monitor This part defines the trader morning market monitor. The routine loads recent context, summary memory, warnings, unresolved actions, and preferences. It then reviews overnight markets, position snapshot, Delta, Gamma, Vega, IV, margin, liquidity, and stress scenarios, producing concise plaintext output focused on Short Straddle Trading-Risk Governance before trade discussion begins.
Part 6: Short Straddle Risk Gates This part details Short Straddle risk gates. Delta gates review Net Delta, Cash Delta, budget usage, and hedge status. Gamma gates review DTE, ATM proximity, gap risk, and event risk. Vega, margin, liquidity, and stress-loss gates determine whether to monitor, hedge, reduce, buy wings, convert, close, or activate a kill switch immediately.
Part 7: Anti-Martingale Governance This part explains anti-martingale governance. The assistant detects whether risk is added for valid process reasons or to avoid realizing a loss. It warns against doubling down, selling premium to repair losses, increasing Short Gamma after breaches, increasing Short Vega during stress, or hiding old losses with new premium today.
Part 8: Agent Behavior Boundaries This part defines behavior boundaries. The assistant uses plaintext, concise wording, professional tone, and known preferences. It avoids investment recommendations, price targets, buy signals, sell signals, and certainty-based forecasts. Thailand-related requests are limited to lawful travel, relocation, vacation, or retreat planning, excluding evasion, hiding, illegal escape, or legal circumvention requests.
Part 1: Short Straddle Trading-Risk Governance Architecture
This part introduces Short Straddle Trading-Risk Governance using Amazon Bedrock AgentCore Memory. It explains how persistent memory supports disciplined monitoring of Delta, Gamma, Vega, margin, liquidity, stress loss, and anti-martingale behavior. The goal is workflow control, not market prediction, trade recommendation, or premium-seeking without hard risk limits across daily sessions.
Goal
Build a governed Amazon Bedrock AgentCore Memory assistant for FSI trading-risk workflows, centered on Short Straddle Trading-Risk Governance.
Prompt
Build Short Straddle Trading-Risk Governance with Amazon Bedrock AgentCore Memory.
Result
The design uses episodic persistence, semantic recall, summary memory, preference memory, and risk-pattern memory to preserve Delta, Gamma, Vega, margin, liquidity, stress-loss, anti-martingale, and routine-monitoring context across sessions.
Tips
- Treat the assistant as a governance workflow, not as a trade signal engine.
- Preserve prior warnings so each trading morning has context.
- Separate risk review from trade recommendation.
- Make hard limits visible before any setup discussion.
- Keep outputs auditable and process-focused.
Part 2: Cross-Session Persistence
This part explains cross-session persistence. The assistant remembers prior warnings, unresolved actions, dashboard preferences, and repeated recovery-trading patterns. It prevents each morning from becoming a blank slate after Delta drift, Vega shock, margin pressure, liquidity deterioration, or emotional premium-repair behavior, strengthening continuity, supervision, and daily Short Straddle risk review routines.
Goal
Prevent each trading morning from becoming a blank slate after prior Delta drift, Vega shock, margin stress, liquidity deterioration, or dangerous repair behavior.
Prompt
Remember prior warnings, unresolved actions, dashboard preferences, and repeated recovery-trading patterns across sessions.
Result
Cross-session persistence means the agent can remember important facts, preferences, summaries, and repeated behavior patterns across multiple sessions. In this trading-risk workflow, it helps the agent preserve context about Short Straddle exposure, Delta/Gamma/Vega risk, margin usage, liquidity stress, anti-martingale warnings, and lawful recovery planning. The uploaded PDF emphasizes that Short Straddle risk must be controlled through Delta, Gamma, Vega, stress loss, margin, liquidity, and governance limits rather than premium income alone.
Extraction
- Automatic identification and storage of important facts
- Automatic identification of user preferences
- Automatic recognition of repeated risk patterns
- Automatic summarization of long conversations
- Automatic storage of trader routines, monitoring rules, and follow-up context
Processing Pipeline
- Information Extraction: Important data such as facts, preferences, summaries, trading exposure, risk limits, and monitoring habits are extracted from conversations.
- Storage: Extracted information is organized into namespaces such as user profile, trading preferences, risk controls, market monitoring, volatility strategy, summary memory, and travel preferences.
- Semantic Indexing: Stored information is vectorized so the agent can retrieve relevant facts through similarity search, even when the user asks follow-up questions using different wording.
Memory Strategy: Semantic Memory Strategy
Description: Semantic memory extracts factual information from conversations and stores it in vector-indexed memory for similarity search.
Benefit: It helps the agent retrieve factual trading details, technical explanations, product information, and prior risk discussions even when the user does not repeat the same keywords.
Use Case: Useful for product information, technical details, volatility terms, Short Straddle facts, Delta/Vega/Gamma explanations, margin rules, volatility surface notes, and factual trading-risk data.
Memory Strategy: Summary Memory Strategy
Description: Summary memory creates and maintains compressed summaries of long conversations, including key decisions, risk warnings, preferences, unresolved questions, and previous context.
Benefit: It reduces token load, improves performance, and preserves continuity across long interactions without injecting every raw message into the prompt.
Use Case: Useful for follow-up conversations, long trading journeys, prior risk warnings, margin escalation history, Delta/Gamma/Vega breach discussions, Thailand recovery planning, and continuity across large conversation histories.
Memory Strategy: User Preference Memory Strategy
Description: User preference memory tracks user-specific preferences, communication style, trading dashboard preferences, travel preferences, contact rules, and routine preferences.
Benefit: It personalizes future responses and prevents the agent from repeatedly asking for known information.
Use Case: Useful for communication preferences, preferred risk dashboard format, preferred markets, preferred trading metrics, Thailand city preferences, dietary preferences, and contact preferences.
Part 3: Memory Extraction Pipeline
This part describes memory extraction. The assistant identifies facts, preferences, summaries, exposure details, monitoring habits, risk limits, and follow-up items from conversations. Stored context can include Short Straddle exposure, Net Delta, Cash Delta, Gamma Cash, Vega, DTE, IV change, skew, margin usage, bid-ask spread, and stress-loss thresholds that are securely tracked each day.
Goal
Identify facts, preferences, summaries, exposure details, monitoring habits, risk limits, and follow-up items from conversations.
Prompt
Store Short Straddle exposure, Net Delta, Cash Delta, Gamma Cash, Vega, DTE, IV change, skew, margin usage, bid-ask spread, and stress-loss thresholds.
Result
Stored context can include Short Straddle exposure, Net Delta, Cash Delta, Gamma Cash, Vega, DTE, IV change, skew, margin usage, bid-ask spread, and stress-loss thresholds that are securely tracked each day.
Example: Risk Pattern Semantic Memory Strategy
Description: Risk pattern memory captures recurring high-risk behaviors such as averaging down, selling more premium after losses, ignoring Delta breaches, holding naked Short Gamma near expiry, or increasing Short Vega during stress.
Benefit: It allows the agent to detect dangerous behavioral patterns early and escalate toward risk-reduction language.
Use Case: Useful for short-volatility risk monitoring, anti-martingale enforcement, kill-switch reminders, margin pressure tracking, liquidity warnings, and governance alerts. The PDF identifies martingale-style doubling down, weak hard limits, Short Gamma exposure, Short Vega exposure, margin pressure, and governance failure as key catastrophic short-volatility failure patterns.
Example: Market Monitoring Summary Memory Strategy
Description: Market monitoring memory stores the user’s daily market checklist, watched instruments, volatility indicators, macro events, margin thresholds, and preferred dashboard structure.
Benefit: It makes daily market-monitoring sessions faster, more consistent, and better aligned with previously defined risk controls.
Use Case: Useful for trader morning routines, Delta/Gamma/Vega dashboards, IV surface review, stress-test workflows, liquidity checks, pre-open market reviews, and daily risk-control reminders.
Example: User Preference Memory Strategy
Description: User preference memory captures the user’s preferred communication style, dashboard layout, monitoring frequency, trading-risk focus, market interests, and travel or lifestyle preferences. Instead of storing only facts, it stores how the user wants the agent to respond and what preferences should shape future interactions.
Example User Prompt
Every morning, give me a short plaintext market monitor before the open.
Focus on Short Straddle risk, Net Delta, Cash Delta, Gamma Cash, Vega exposure, IV change, margin usage, bid-ask spread, and stress loss.
Use bold only for section titles. Keep the tone professional and direct.
If I ask about Thailand, focus on lawful travel, relocation, or vacation planning.
Do not repeat long explanations unless I ask for details.
Communication preference: plaintext format.
Formatting preference: use bold only for titles.
Tone preference: professional and direct.
Length preference: short and concise unless details are requested.
Routine preference: daily morning market monitor before the open.
Trading focus preference: Short Straddle risk monitoring.
Risk metric preference: Net Delta, Cash Delta, Gamma Cash, Vega exposure, IV change, margin usage, bid-ask spread, and stress loss.
Risk escalation preference: warn clearly when Delta, Gamma, Vega, margin, liquidity, or stress-loss risks appear.
Travel preference: Thailand topics should focus only on lawful travel, relocation, vacation, or retreat planning.
Explanation preference: avoid repeating long explanations unless requested.
Agent Behavior Prompt
When the user starts a new session, initialize responses in plaintext.
Use bold only for section titles.
Keep answers concise, professional, and direct.
For trading-risk topics, prioritize Short Straddle, Delta, Gamma, Vega, margin, liquidity, and stress-loss monitoring.
For market-monitoring requests, produce a pre-open checklist rather than a long article.
For Thailand-related requests, provide only lawful travel, relocation, vacation, or retreat planning.
Avoid re-asking known preferences unless the current task requires updated information.
Part 4: Episodic Memory Strategy
This part covers episodic memory. The assistant captures situations, user intent, tools used, reasoning path, outcomes, and lessons from trading routines. Reflections across episodes reveal patterns such as ignored hard limits, martingale behavior, Short Gamma concentration, Short Vega expansion, liquidity stress, and governance weakness requiring stronger future risk language controls.
Goal
Capture situations, user intent, tools used, reasoning path, outcomes, and lessons from trading routines.
Prompt
Use episodic memory so the assistant can remember past trading days, understand cause-and-effect, and learn from prior outcomes.
Result
Episodic memory is an AI agent design that helps models remember specific past experiences, understand cause-and-effect, and learn from previous results. It sits between static facts and short chat history, allowing agents to improve over time.
Unlike RAG, which mainly retrieves information by semantic similarity, episodic memory remembers the full experience. It works in three steps:
- Extraction: Captures the situation, user intent, tools used, reasoning steps, and outcomes during a task.
- Consolidation: After the task ends, compresses the interaction into one structured, chronological episode.
- Reflection: Reviews multiple episodes to find lessons learned, successful strategies, failure patterns, and repeatable workflows.
Benefit
Episodic memory helps agents learn from past workflows, failures, and successes. The agent can remember not only what happened, but also why it happened, what tools were used, what decisions were made, and what result followed.
This helps agents:
- Avoid repeating mistakes
- Reuse successful strategies
- Choose better tools
- Adapt after failures
- Build repeatable workflows
Example: An agent may remember that using a specific tool with a specific parameter solved a previous error, or that a certain workflow failed and should be avoided next time.
Use Case
Use episodic memory when the agent needs to remember a sequence of events, compare a current task with past episodes, and apply lessons learned.
Common use cases include:
- Multi-step planning agents
- Coding and debugging assistants
- Complex research agents
- Repetitive workflow automation
- Tool-using agents
- Incident response agents
- Learning assistants that remember past practice sessions
- Trading-risk monitoring agents that learn from prior breach patterns
- Operational playbooks where past outcomes should guide future decisions
Skip episodic memory for:
- Simple conversational Q&A
- Basic factual lookups
- Casual chats
- Tasks that do not need full task history or learning from previous outcomes
Part 5: Trader Morning Market Monitor
This part defines the trader morning market monitor. The routine loads recent context, summary memory, warnings, unresolved actions, and preferences. It then reviews overnight markets, position snapshot, Delta, Gamma, Vega, IV, margin, liquidity, and stress scenarios, producing concise plaintext output focused on Short Straddle Trading-Risk Governance before trade discussion begins.
Goal
Define a repeatable pre-open routine that loads context before reviewing any Short Straddle or Short Strangle setup.
Prompt
Every morning, I want to review my Short Straddle risk before the market opens. Track Net Delta, Cash Delta, Gamma Cash, Vega exposure, DTE, IV change, skew, margin usage, bid-ask spread, and stress loss. If Delta, Vega, Gamma, margin, or liquidity breaches occur, remind me not to average down or sell more options to recover losses.
Result
Semantic Strategy extracts:
- User monitors Short Straddle risk every morning
- User tracks Net Delta, Cash Delta, Gamma Cash, Vega exposure, DTE, IV change, skew, margin usage, bid-ask spread, and stress loss
- User wants breach reminders for Delta, Vega, Gamma, margin, and liquidity
- User does not want to average down or sell more options to recover losses
User Preference Strategy captures:
- Trading routine preference: morning pre-market risk review
- Dashboard preference: Delta, Gamma, Vega, DTE, IV, skew, margin, liquidity, and stress-loss monitor
- Risk communication preference: warn clearly when hard limits are breached
- Behavioral guardrail preference: no averaging down, no premium-repair trades, no martingale behavior
- Decision style preference: prioritize survival, risk reduction, and defined-risk conversion
Summary Strategy creates:
- User wants a daily pre-market volatility-risk monitoring routine focused on Short Straddle exposure
- The routine should review Delta, Cash Delta, Gamma Cash, Vega, DTE, IV, skew, margin usage, liquidity, and stress loss
- If risk limits breach, the agent should remind the user not to average down, sell more premium, or increase Short Gamma/Short Vega exposure
Risk Pattern Memory Strategy captures:
- Potential high-risk pattern: user trades Short Straddle structures
- Required guardrails: monitor Short Gamma, Short Vega, margin expansion, liquidity deterioration, and stress loss
- Forbidden repair behavior: selling more options to recover losses
- Escalation rule: if Greek, margin, or liquidity limits breach, recommend risk reduction, closing, or defined-risk conversion
Trader Morning Routine for the Market Monitor
Step 1: Pre-Market Session Start
Start the trader morning market-monitoring session.
Load:
- Last K conversation turns
- Summary memory from previous sessions
- Prior warnings
- Prior limit breaches
- Unresolved risk actions
- Current monitoring preferences
Purpose: Prevent the trader from treating today as a blank slate if yesterday already showed Delta drift, Vega shock, margin stress, liquidity deterioration, or dangerous repair behavior.
Step 2: Overnight Market Review
Check:
- Index futures
- Equity index moves
- Rates
- FX
- Commodities
- Volatility indices
- Macro headlines
- Earnings calendar
- Central bank events
- Geopolitical shocks
Purpose: Identify gap risk before the options market opens.
Step 3: Position Snapshot
Review:
- Underlying
- Strategy type
- Short Straddle or Short Strangle exposure
- Expiry
- DTE
- Strike location
- Current spot
- Break-even range
- Position size
Purpose: Confirm whether the position is still within the intended strategy profile.
Step 4: Delta Monitor
Check:
- Net Delta
- Cash Delta
- Delta as percentage of risk budget
- Delta change from prior close
- Delta hedge status
Suggested alert logic:
- Soft Limit: Cash Delta uses 50–70% of budget
- Hard Limit: Cash Delta exceeds 100% of budget
- Liquidation Limit: Cash Delta exceeds 125–150% of budget
The PDF explains that Short Straddle positions may begin near Delta neutral, but negative Gamma can rapidly push Delta in an unfavorable direction as the underlying moves.
Step 5: Gamma Monitor
Check:
- Gamma Cash
- DTE
- ATM proximity
- Expected gap move
- Event risk
- Gamma budget usage
Suggested rule:
- If DTE is below 7 and the position is near ATM, treat Short Gamma risk as elevated
- If the Gamma budget is breached, reduce short options, buy wings, or close
The PDF highlights that Gamma becomes especially dangerous near expiration because small underlying moves can create large Delta changes and make dynamic hedging expensive or ineffective.
Step 6: Vega and IV Monitor
Check:
- Vega exposure
- IV change from entry
- IV change from prior close
- ATM IV
- Skew
- Term structure
- Volga or Vomma
- Vanna
Suggested alert logic:
- If IV rises sharply, estimate Vega P&L impact
- If Vega loss exceeds budget, reduce exposure, buy protection, or close
- If term structure inverts, escalate to crisis mode
The PDF emphasizes that Short Straddle is Short Vega, meaning implied-volatility expansion can create losses even if the underlying price does not move significantly.
Step 7: Margin and Liquidity Monitor
Check:
- Margin usage
- Available liquidity
- Stress margin call
- Bid-ask spread
- Market depth
- Exit cost
- Broker margin model change
Suggested alert logic:
- If margin usage rises materially, stop adding short-volatility exposure
- If bid-ask spreads widen, avoid new short options
- If stress margin call exceeds liquidity buffer, reduce exposure
The PDF warns that margin pressure and liquidity deterioration can reinforce losses in short-volatility strategies.
Step 8: Joint Stress Test
Run combined scenarios:
- Mild: plus or minus 1 sigma spot move, plus 1 vol IV shock
- Moderate: plus or minus 2 sigma spot move, plus 3 vol IV shock
- Severe: plus or minus 3 sigma spot move, plus 5 to 10 vol IV shock
- Crash: minus 5% to minus 10% spot move, plus 10 to 25 vol IV shock
- Melt-up: plus 5% to plus 10% spot move, plus 3 to 10 vol IV shock
Purpose: Avoid checking Delta and Vega separately when the true danger is often spot down, IV up, skew wider, margin higher, and liquidity worse.
Step 9: Anti-Martingale Check
Ask:
- Am I adding risk because the trade still has edge?
- Or am I adding risk to avoid realizing a loss?
- Am I selling more options to recover previous losses?
- Am I increasing Short Gamma or Short Vega after a breach?
- Am I relying on premium income to hide risk?
Mandatory reminder:
- Do not double down
- Do not sell more premium to repair losses
- Do not increase Short Gamma after Delta or Gamma breach
- Do not use new premium to cover old losses
The PDF identifies martingale-style averaging down, lack of hard risk limits, and weak governance as core failure patterns in catastrophic short-volatility outcomes.
Step 10: Morning Decision Output
Market Status:
Greek Status:
- Delta: OK, Soft Breach, Hard Breach, or Liquidation
- Gamma: OK, Elevated, or Breached
- Vega: OK, Elevated, or Breached
Margin and Liquidity:
- Margin: OK, Warning, or Breach
- Liquidity: OK, Thin, or Dislocated
Required Action:
- Continue monitoring
- Hedge
- Reduce
- Buy wings
- Convert to defined-risk structure
- Close
- Activate kill switch
Behavioral Guardrail:
- No averaging down
- No premium-repair trades
- No hidden losses
- No front-office override without independent review
Part 6: Short Straddle Risk Gates
This part details Short Straddle risk gates. Delta gates review Net Delta, Cash Delta, budget usage, and hedge status. Gamma gates review DTE, ATM proximity, gap risk, and event risk. Vega, margin, liquidity, and stress-loss gates determine whether to monitor, hedge, reduce, buy wings, convert, close, or activate a kill switch immediately.
Goal
Make Delta, Gamma, Vega, margin, liquidity, and stress-loss gates determine the workflow before any premium-selling conversation.
Prompt
Short-option sale review should only continue if Delta, Gamma, Vega, margin, liquidity, and stress-loss budgets are all inside limits.
Result
If any hard limit is breached, the correct workflow is reduce, hedge, buy wings, convert to defined-risk structure, close, or activate kill switch.
Demo Output Summary:
Summary Execute Note for Trader
This note replaces Demo Output Summary and should be used after Step 1 to Step 9 of the trader morning routine. It is for educational risk-management use only, not investment advice or a trade recommendation.
From March to June 2026, the macro setup is not a clean low-volatility environment. May CPI rose 4.2% year over year, the highest annual inflation reading in three years, while core CPI was 2.9% year over year. Energy prices were a major contributor, with energy up 3.9% for the month and 23.5% over 12 months. This matters for short-option selling because inflation shocks can reprice rates, volatility, index skew, and margin requirements quickly.
The May labor market was still firm, with reported nonfarm payrolls up 172,000, unemployment at 4.3%, and average hourly earnings up 3.4% year over year. A resilient labor market gives the Fed less pressure to ease quickly, which keeps rate-volatility and equity-volatility risk relevant for short premium strategies.
The next FOMC decision window is mid-June 2026, and market commentary indicates the Fed is expected to stay cautious because inflation remains above target. The same source reports the 2-year Treasury near 4.13% and the 10-year Treasury near 4.55%, showing that rates remain high enough to matter for discount rates, equity multiples, and option volatility risk.
Volatility is elevated enough to demand caution, but not extreme enough to justify ignoring tail risk. FRED shows the CBOE VIX at 22.22 on June 10, 2026, and the CBOE S&P 500 3-Month Volatility Index at 22.89 on the same date. This means near-term and 3-month implied volatility are both active risk inputs for any Short Straddle or Short Strangle review.
A separate market-data source showed VIX at 18.84 intraday on June 11, 2026, with a 3-month change of minus 30.96% and a 52-week range of 13.38 to 35.30. This suggests volatility has compressed from prior stress levels but remains capable of sharp jumps, which is exactly the type of setup where short-option traders can become overconfident.
Execution note after Step 1 to Step 9:
Start the session by loading last K conversation turns and the latest summary memory. If prior warnings included Delta drift, Vega shock, margin stress, liquidity deterioration, or premium-repair behavior, do not treat today as a clean reset.
Check the overnight macro tape before evaluating any short-option setup. Focus on CPI, payrolls, FOMC expectations, Treasury yields, energy prices, equity futures, volatility indices, and event calendar. Current inflation and rate conditions mean the trader should assume macro headline risk remains active.
Before considering any short-option sale, confirm the position snapshot. Review the underlying, expiry, DTE, strike location, break-even range, current spot, position size, and whether the position is Short Straddle, Short Strangle, Short Gamma, or Short Vega. The uploaded risk framework emphasizes that Short Straddle exposure is not passive income; it is short volatility, short Gamma, and short Vega exposure with asymmetric tail risk.
Delta gate: Do not proceed with new short-option exposure if Net Delta or Cash Delta is already near a soft, hard, or liquidation threshold. If Cash Delta is using 50–70% of the risk budget, shift from opportunity review to hedge or reduce mode. If Cash Delta exceeds 100%, move to mandatory risk reduction. If it exceeds 125–150%, move to liquidation or defined-risk conversion. The uploaded framework stresses that Short Straddle positions can begin near Delta neutral but become directional quickly because negative Gamma accelerates Delta movement.
Gamma gate: If DTE is below 7 days, if the position is near ATM, or if a major macro release is near, classify the setup as elevated Short Gamma risk. Do not rely on high Theta alone. If Gamma Cash is already above budget, reduce short Gamma, buy wings, or close instead of adding new short options. The uploaded framework warns that near-expiry Gamma can make dynamic hedging expensive or ineffective.
Vega gate: With VIX and 3-month implied volatility both around the low-20s on June 10, the trader must check whether current premium is compensation for real risk or just an invitation to sell into unstable macro conditions. Estimate Vega P&L under plus 3, plus 5, and plus 10 vol shocks before any short-option sale. If Vega loss exceeds the predefined budget, do not add short Vega.
Margin and liquidity gate: If margin usage is rising, if bid-ask spreads are widening, or if exit cost is increasing, do not sell more premium. Current macro conditions include inflation pressure, high rates, and active volatility, so margin models can change quickly during stress. The uploaded framework highlights that margin pressure and liquidity deterioration can turn a manageable short-volatility loss into a forced deleveraging event.
Joint stress gate: Run spot-down plus IV-up scenarios before considering short-option exposure. Use mild, moderate, severe, crash, and melt-up scenarios. The key danger is not Delta alone or Vega alone; it is spot down, IV up, skew wider, margin higher, and liquidity worse at the same time. The uploaded framework explicitly requires combined Delta and Vega stress testing rather than isolated Greek checks.
Anti-martingale gate: If the reason for selling short options is to recover a prior loss, reduce cost basis, collect premium after a breach, or avoid realizing loss, stop. Do not sell more straddles, do not increase Short Vega, do not add Short Gamma, and do not use new premium to cover old losses. The uploaded framework identifies martingale-style repair behavior, weak hard limits, and poor governance as core catastrophic short-volatility failure patterns.
Morning execution status:
Market status should be set to Watch or Stress, not Calm, when inflation is above target, FOMC repricing risk is active, VIX is near or above 20, and energy or rate volatility is creating macro uncertainty.
Short-option sale review should only continue if Delta, Gamma, Vega, margin, liquidity, and stress-loss budgets are all inside limits. If any hard limit is breached, the correct workflow is reduce, hedge, buy wings, convert to defined-risk structure, close, or activate kill switch.
Trader action note:
- Do not sell short options only because implied volatility looks elevated.
- Do not sell short options only because the last few weeks were profitable.
- Do not sell short options if the trade requires averaging down to make the thesis work.
- Do not sell short options if margin usage, bid-ask spread, or stress loss is already deteriorating.
- Do not sell short options into a macro event unless the position survives spot-down plus IV-up stress testing.
- Only continue analysis when the position remains within predefined Delta, Gamma, Vega, margin, liquidity, and stress-loss limits.
Final execute note:
Today’s short-option workflow should prioritize survival first, premium second. Current 3-month macro data shows inflation pressure, cautious Fed expectations, firm labor data, elevated rates, and active volatility. That environment does not automatically prohibit short-option analysis, but it requires strict Greek budgets, stress testing, liquidity checks, anti-martingale discipline, and predefined kill-switch rules before any short premium exposure is considered.
Part 7: Anti-Martingale Governance
This part explains anti-martingale governance. The assistant detects whether risk is added for valid process reasons or to avoid realizing a loss. It warns against doubling down, selling premium to repair losses, increasing Short Gamma after breaches, increasing Short Vega during stress, or hiding old losses with new premium today.
Goal
Detect whether risk is added for valid process reasons or to avoid realizing a loss.
Prompt
Do not double down, sell premium to repair losses, increase Short Gamma after breaches, increase Short Vega during stress, or hide old losses with new premium.
Result
The assistant warns against doubling down, selling premium to repair losses, increasing Short Gamma after breaches, increasing Short Vega during stress, or hiding old losses with new premium today.
Tips
- Treat recovery trading as a governance event.
- Escalate repeated premium-repair behavior.
- Require independent review before overrides.
- Connect sizing to risk capacity, not hope.
- Document decisions, breaches, and lessons.
Part 8: Agent Behavior Boundaries
This part defines behavior boundaries. The assistant uses plaintext, concise wording, professional tone, and known preferences. It avoids investment recommendations, price targets, buy signals, sell signals, and certainty-based forecasts. Thailand-related requests are limited to lawful travel, relocation, vacation, or retreat planning, excluding evasion, hiding, illegal escape, or legal circumvention requests.
Goal
Keep the assistant educational, process-focused, lawful, professional, concise, and auditable.
Prompt
Avoid investment recommendations, price targets, buy signals, sell signals, certainty-based forecasts, illegal evasion support, and legal circumvention requests.
Result
The assistant uses plaintext, concise wording, professional tone, and known preferences. It avoids investment recommendations, price targets, buy signals, sell signals, and certainty-based forecasts. Thailand-related requests are limited to lawful travel, relocation, vacation, or retreat planning, excluding evasion, hiding, illegal escape, or legal circumvention requests.
Create Amazon Bedrock AgentCore Memory with Episodic Strategy
Step 1: Install dependencies using requirements.txt.
Step 2: Import Dict, datetime, Agent, tool, HookProvider, MemoryClient, StrategyType.
Step 3: Configure REGION, TRADER_ID, SESSION_ID, and MEMORY_NAME.
Step 4: Create MemoryClient as client using REGION.
Step 5: Define strategies with StrategyType.EPISODIC and trading namespaceTemplates.
Step 6: Create memory using client.create_memory_and_wait and store memory_id.
Step 7: Define create_premarket_checklist tool for market_focus, key_events, and watchlist.
Step 8: Define check_risk_limits tool for account_risk_budget, max_daily_loss, max_trade_loss, and margin_usage.
Step 9: Define create_trade_plan tool for instrument, trade_thesis, entry_condition, invalidation_condition, and exit_plan.
Step 10: Define record_trade_journal tool for instrument, action_taken, reason, result, and lesson.
Step 11: Define create_end_of_day_review tool for pnl_summary, rule_adherence, mistakes, and improvement_plan.
Step 12: Define get_namespaces using mem_client and memory_id to map namespaces.
Step 13: Define EpisodicMemoryHooks with memory_id, client, and namespaces.
Step 14: Define retrieve_episodes_and_reflections to retrieve episodes, reflections, user_query, and actor_id.
Step 15: Define save_trading_interaction to save messages, actor_id, session_id, and tool results.
Step 16: Define register_hooks to register MessageAddedEvent and AfterInvocationEvent callbacks.
Step 17: Create episodic_hooks using EpisodicMemoryHooks(memory_id, client).
Step 18: Create trader_routine_agent with hooks, model, tools, state, and system_prompt.
Prompt: Agent System
You are a trader daily routine assistant with memory from past trading days.
Your role:
- Help the trader follow a disciplined daily routine
- Support pre-market preparation, risk review, trade planning, trade journaling, and end-of-day reflection
- Use past trading episodes to identify recurring process issues
- Apply reflections about discipline, risk control, execution quality, and emotional patterns
- Focus on process, risk management, and decision hygiene
- Do not provide financial advice, investment recommendations, price targets, or instructions to buy or sell securities
When you see [PAST TRADING EPISODE] context, use it to identify relevant process patterns.
When you see [TRADING REFLECTION] context, apply those learned discipline and risk-control patterns.
Always:
1. Start with risk limits before trade ideas
2. Require a pre-defined invalidation condition
3. Encourage position sizing before entry
4. Track whether the trader followed the plan
5. Identify emotional trading, revenge trading, overtrading, and averaging-down behavior
6. Encourage defined-risk structures where appropriate
7. Remind the trader that no trade is required if conditions are unclear
8. Keep outputs educational and process-focused, not advisory
Never:
1. Recommend buying, selling, shorting, or holding a specific asset
2. Predict market direction as certainty
3. Encourage leverage, martingale, doubling down, or revenge trading
4. Override risk limits
5. Treat unrealized recovery hopes as a valid risk plan
Function: Create a pre-market trading checklist.
Args
- market_focus: Main market, sector, index, asset class, or product being monitored
- key_events: Scheduled events such as earnings, CPI, FOMC, central bank decision, or major data release
- watchlist: Symbols or instruments the trader plans to monitor
Returns
- Structured pre-market checklist
Prompt: Create a pre-market trading checklist
Market Focus:
{market_focus}
Key Events:
{key_events}
Watchlist:
{watchlist}
Routine:
1. Review overnight price action
2. Check major economic or corporate events
3. Review volatility conditions
4. Confirm liquidity and spreads
5. Define trade invalidation levels before entry
6. Confirm maximum daily loss limit
7. Confirm position size before any order
8. Avoid adding risk after emotional or impulsive losses
Function: Check daily trading risk limits.
Args
- account_risk_budget: Total risk budget allocated for the trading day
- max_daily_loss: Maximum permitted loss for the day
- max_trade_loss: Maximum permitted loss for a single trade
- margin_usage: Current or planned margin usage
Returns
- Structured risk limit review
Prompt: Check daily trading risk limits
RISK LIMIT REVIEW
Account Risk Budget:
{account_risk_budget}
Maximum Daily Loss:
{max_daily_loss}
Maximum Single-Trade Loss:
{max_trade_loss}
Margin Usage:
{margin_usage}
Rules:
1. Stop trading if maximum daily loss is reached
2. Do not increase size after a loss
3. Do not use new trades to recover old losses
4. Reduce exposure when liquidity deteriorates
5. Avoid undefined-risk positions unless explicitly approved by the risk plan
6. Convert undefined risk to defined risk when required
7. Follow the pre-defined exit plan without discretionary overrides
Function: Create a structured trade plan before entering a trade.
Args
- instrument: Symbol, index, futures contract, option structure, or asset being considered
- trade_thesis: Reason for considering the trade
- entry_condition: Objective condition required before entry
- invalidation_condition: Condition that proves the trade idea is wrong
- exit_plan: Planned profit-taking, stop-loss, time stop, or risk reduction rule
Returns
Prompt: Create a structured trade plan before entering a trade
Instrument:
{instrument}
Trade Thesis:
{trade_thesis}
Entry Condition:
{entry_condition}
Invalidation Condition:
{invalidation_condition}
Exit Plan:
{exit_plan}
Pre-Trade Confirmation:
1. Position size is defined
2. Loss limit is defined
3. Exit condition is defined before entry
4. Trade does not violate daily risk budget
5. Trade does not depend on averaging down or martingale behavior
Function: Record a trade journal entry.
Args
- instrument: Symbol, index, futures contract, option structure, or asset traded
- action_taken: What was done, such as entered, exited, reduced, hedged, or skipped
- reason: Why the action was taken
- result: Outcome of the action
- lesson: Lesson learned from the trade or decision
Returns
- Structured trade journal entry
Prompt: Record a trade journal entry
Instrument:
{instrument}
Action Taken:
{action_taken}
Reason:
{reason}
Result:
{result}
Lesson:
{lesson}
Review Tags:
- Process discipline
- Risk control
- Execution quality
- Emotional control
- Rule adherence
Function: Create an end-of-day trading review.
Args
- pnl_summary: Summary of daily profit and loss
- rule_adherence: Whether trading rules were followed
- mistakes: Mistakes, emotional decisions, or process breaks observed
- improvement_plan: Specific improvement plan for the next trading day
Returns
- Structured end-of-day review
Prompt: Create an end-of-day trading review
P&L Summary:
{pnl_summary}
Rule Adherence:
{rule_adherence}
Mistakes:
{mistakes}
Improvement Plan:
{improvement_plan}
Reflection Questions:
1. Did I follow my pre-defined risk limits?
2. Did I avoid revenge trading?
3. Did I avoid averaging down without a plan?
4. Did I respect liquidity and spread conditions?
5. Did I exit based on rules rather than hope?
6. What should be repeated tomorrow?
7. What must be avoided tomorrow?
Prompt: Create trader daily routine
You are a trader daily routine assistant with memory from past trading days.
Your role:
- Help the trader follow a disciplined daily routine
- Support pre-market preparation, risk review, trade planning, trade journaling, and end-of-day reflection
- Use past trading episodes to identify recurring process issues
- Apply reflections about discipline, risk control, execution quality, and emotional patterns
- Focus on process, risk management, and decision hygiene
- Do not provide financial advice, investment recommendations, price targets, or instructions to buy or sell securities
When you see [PAST TRADING EPISODE] context, use it to identify relevant process patterns.
When you see [TRADING REFLECTION] context, apply those learned discipline and risk-control patterns.
Always:
1. Start with risk limits before trade ideas
2. Require a pre-defined invalidation condition
3. Encourage position sizing before entry
4. Track whether the trader followed the plan
5. Identify emotional trading, revenge trading, overtrading, and averaging-down behavior
6. Encourage defined-risk structures where appropriate
7. Remind the trader that no trade is required if conditions are unclear
8. Keep outputs educational and process-focused, not advisory
Never:
1. Recommend buying, selling, shorting, or holding a specific asset
2. Predict market direction as certainty
3. Encourage leverage, martingale, doubling down, or revenge trading
4. Override risk limits
5. Treat unrealized recovery hopes as a valid risk plan
Code: Create Amazon Bedrock AgentCore Memory with Episodic Strategy
# Step 1: Install dependencies
# !pip install -qr requirements.txt
# Step 2: Import required packages
from typing import Dict
from datetime import datetime
from strands import Agent, tool
from strands.hooks import (
AfterInvocationEvent,
HookProvider,
HookRegistry,
MessageAddedEvent,
)
from bedrock_agentcore.memory import MemoryClient
from bedrock_agentcore.memory.constants import StrategyType
# Step 3: Configure runtime settings
REGION = "us-west-2"
TRADER_ID = "trader_001"
SESSION_ID = f"trading_day_{datetime.now().strftime('%Y%m%d%H%M%S')}"
MEMORY_NAME = "TraderDailyRoutineEpisodicMemory"
# Step 4: Create memory client
client = MemoryClient(region_name=REGION)
# Step 5: Define episodic memory strategy
strategies = [
{
StrategyType.EPISODIC.value: {
"name": "TradingRoutineEpisodes",
"description": "Captures daily trading routines, risk reviews, trade journals, and end-of-day reflections",
"namespaceTemplates": ["/trading/actor/{actorId}/episodes/"],
"reflectionConfiguration": {
"namespaceTemplates": [
"/trading/actor/{actorId}/"
]
},
}
}
]
# Step 6: Create memory resource with episodic strategy
memory = client.create_memory_and_wait(
name=MEMORY_NAME,
strategies=strategies,
description="Episodic memory for trader daily routine assistant",
event_expiry_days=180,
)
memory_id = memory["id"]
# Step 7: Create trader routine tool for pre-market checklist
@tool
def create_premarket_checklist(market_focus: str, key_events: str, watchlist: str) -> str:
"""Create a pre-market trading checklist.
Args:
market_focus: Main market, sector, index, asset class, or product being monitored
key_events: Scheduled events such as earnings, CPI, FOMC, central bank decision, or major data release
watchlist: Symbols or instruments the trader plans to monitor
Returns:
Structured pre-market checklist
"""
return f"""PRE-MARKET CHECKLIST
Market Focus:
{market_focus}
Key Events:
{key_events}
Watchlist:
{watchlist}
Routine:
1. Review overnight price action
2. Check major economic or corporate events
3. Review volatility conditions
4. Confirm liquidity and spreads
5. Define trade invalidation levels before entry
6. Confirm maximum daily loss limit
7. Confirm position size before any order
8. Avoid adding risk after emotional or impulsive losses"""
# Step 8: Create trader routine tool for risk limits
@tool
def check_risk_limits(
account_risk_budget: str,
max_daily_loss: str,
max_trade_loss: str,
margin_usage: str,
) -> str:
"""Check daily trading risk limits.
Args:
account_risk_budget: Total risk budget allocated for the trading day
max_daily_loss: Maximum permitted loss for the day
max_trade_loss: Maximum permitted loss for a single trade
margin_usage: Current or planned margin usage
Returns:
Structured risk limit review
"""
return f"""RISK LIMIT REVIEW
Account Risk Budget:
{account_risk_budget}
Maximum Daily Loss:
{max_daily_loss}
Maximum Single-Trade Loss:
{max_trade_loss}
Margin Usage:
{margin_usage}
Rules:
1. Stop trading if maximum daily loss is reached
2. Do not increase size after a loss
3. Do not use new trades to recover old losses
4. Reduce exposure when liquidity deteriorates
5. Avoid undefined-risk positions unless explicitly approved by the risk plan
6. Convert undefined risk to defined risk when required
7. Follow the pre-defined exit plan without discretionary overrides"""
# Step 9: Create trader routine tool for trade plan
@tool
def create_trade_plan(
instrument: str,
trade_thesis: str,
entry_condition: str,
invalidation_condition: str,
exit_plan: str,
) -> str:
"""Create a structured trade plan before entering a trade.
Args:
instrument: Symbol, index, futures contract, option structure, or asset being considered
trade_thesis: Reason for considering the trade
entry_condition: Objective condition required before entry
invalidation_condition: Condition that proves the trade idea is wrong
exit_plan: Planned profit-taking, stop-loss, time stop, or risk reduction rule
Returns:
Structured trade plan
"""
return f"""TRADE PLAN
Instrument:
{instrument}
Trade Thesis:
{trade_thesis}
Entry Condition:
{entry_condition}
Invalidation Condition:
{invalidation_condition}
Exit Plan:
{exit_plan}
Pre-Trade Confirmation:
1. Position size is defined
2. Loss limit is defined
3. Exit condition is defined before entry
4. Trade does not violate daily risk budget
5. Trade does not depend on averaging down or martingale behavior"""
# Step 10: Create trader routine tool for trade journal
@tool
def record_trade_journal(
instrument: str,
action_taken: str,
reason: str,
result: str,
lesson: str,
) -> str:
"""Record a trade journal entry.
Args:
instrument: Symbol, index, futures contract, option structure, or asset traded
action_taken: What was done, such as entered, exited, reduced, hedged, or skipped
reason: Why the action was taken
result: Outcome of the action
lesson: Lesson learned from the trade or decision
Returns:
Structured trade journal entry
"""
return f"""TRADE JOURNAL ENTRY
Instrument:
{instrument}
Action Taken:
{action_taken}
Reason:
{reason}
Result:
{result}
Lesson:
{lesson}
Review Tags:
- Process discipline
- Risk control
- Execution quality
- Emotional control
- Rule adherence"""
# Step 11: Create trader routine tool for end-of-day review
@tool
def create_end_of_day_review(
pnl_summary: str,
rule_adherence: str,
mistakes: str,
improvement_plan: str,
) -> str:
"""Create an end-of-day trading review.
Args:
pnl_summary: Summary of daily profit and loss
rule_adherence: Whether trading rules were followed
mistakes: Mistakes, emotional decisions, or process breaks observed
improvement_plan: Specific improvement plan for the next trading day
Returns:
Structured end-of-day review
"""
return f"""END-OF-DAY REVIEW
P&L Summary:
{pnl_summary}
Rule Adherence:
{rule_adherence}
Mistakes:
{mistakes}
Improvement Plan:
{improvement_plan}
Reflection Questions:
1. Did I follow my pre-defined risk limits?
2. Did I avoid revenge trading?
3. Did I avoid averaging down without a plan?
4. Did I respect liquidity and spread conditions?
5. Did I exit based on rules rather than hope?
6. What should be repeated tomorrow?
7. What must be avoided tomorrow?"""
# Step 12: Create helper command to get namespace mappings
def get_namespaces(mem_client: MemoryClient, memory_id: str) -> Dict:
"""Get namespace mapping for memory strategies."""
memory_strategies = mem_client.get_memory_strategies(memory_id)
result = {}
for strategy in memory_strategies:
reflection_config = strategy.get("reflectionConfiguration", {})
result[strategy["type"]] = {
"namespaces": strategy.get("namespaces", []),
"reflectionNamespaces": reflection_config.get("namespaces", []),
}
return result
# Step 13: Create episodic memory hook provider
class EpisodicMemoryHooks(HookProvider):
"""Memory hooks for episodic memory with reflections."""
def __init__(self, memory_id: str, client: MemoryClient):
self.memory_id = memory_id
self.client = client
self.namespaces = get_namespaces(self.client, self.memory_id)
def retrieve_episodes_and_reflections(self, event: MessageAddedEvent):
"""Retrieve relevant episodes and reflections before processing."""
messages = event.agent.messages
if messages[-1]["role"] != "user" or "toolResult" in messages[-1]["content"][0]:
return
user_query = messages[-1]["content"][0]["text"]
actor_id = event.agent.state.get("actor_id")
if not actor_id:
return
all_context = []
episodic_config = self.namespaces.get("EPISODIC", {})
for namespace_template in episodic_config.get("namespaces", []):
namespace = namespace_template.format(actorId=actor_id)
episodes = self.client.retrieve_memories(
memory_id=self.memory_id,
namespace=namespace,
query=user_query,
top_k=3,
)
for episode in episodes:
if isinstance(episode, dict):
content = episode.get("content", {})
if isinstance(content, dict):
text = content.get("text", "").strip()
if text:
all_context.append(f"[PAST TRADING EPISODE] {text}")
for namespace_template in episodic_config.get("reflectionNamespaces", []):
namespace = namespace_template.format(actorId=actor_id)
reflections = self.client.retrieve_memories(
memory_id=self.memory_id,
namespace=namespace,
query=user_query,
top_k=2,
)
for reflection in reflections:
if isinstance(reflection, dict):
content = reflection.get("content", {})
if isinstance(content, dict):
text = content.get("text", "").strip()
if text:
all_context.append(f"[TRADING REFLECTION] {text}")
if all_context:
context_text = "\n".join(all_context)
original_text = messages[-1]["content"][0]["text"]
messages[-1]["content"][0]["text"] = (
f"Past Trading Experience:\n{context_text}\n\nCurrent Query: {original_text}"
)
def save_trading_interaction(self, event: AfterInvocationEvent):
"""Save trading interaction for episode extraction."""
messages = event.agent.messages
if len(messages) < 2 or messages[-1]["role"] != "assistant":
return
interaction_messages = []
for msg in messages:
role = msg["role"].upper()
content = msg["content"]
if isinstance(content, list):
for item in content:
if "text" in item:
interaction_messages.append((item["text"], role))
elif "toolUse" in item:
tool_info = item["toolUse"]
tool_text = f"[TOOL: {tool_info.get('name', 'unknown')}]"
interaction_messages.append((tool_text, "TOOL"))
elif "toolResult" in item:
result = (
item["toolResult"]
.get("content", [{}])[0]
.get("text", "")
)
interaction_messages.append(
(f"[RESULT: {result[:200]}]", "TOOL")
)
if interaction_messages:
actor_id = event.agent.state.get("actor_id")
session_id = event.agent.state.get("session_id")
if not actor_id or not session_id:
return
self.client.create_event(
memory_id=self.memory_id,
actor_id=actor_id,
session_id=session_id,
messages=interaction_messages,
)
def register_hooks(self, registry: HookRegistry) -> None:
"""Register episodic memory hooks."""
registry.add_callback(
MessageAddedEvent,
self.retrieve_episodes_and_reflections,
)
registry.add_callback(
AfterInvocationEvent,
self.save_trading_interaction,
)
# Step 14: Create trader daily routine agent
episodic_hooks = EpisodicMemoryHooks(memory_id, client)
trader_routine_agent = Agent(
hooks=[episodic_hooks],
model="global.anthropic.claude-haiku-4-5-20251001-v1:0",
tools=[
create_premarket_checklist,
check_risk_limits,
create_trade_plan,
record_trade_journal,
create_end_of_day_review,
],
state={
"actor_id": TRADER_ID,
"session_id": SESSION_ID,
},
system_prompt="""You are a trader daily routine assistant with memory from past trading days.
Your role:
- Help the trader follow a disciplined daily routine
- Support pre-market preparation, risk review, trade planning, trade journaling, and end-of-day reflection
- Use past trading episodes to identify recurring process issues
- Apply reflections about discipline, risk control, execution quality, and emotional patterns
- Focus on process, risk management, and decision hygiene
- Do not provide financial advice, investment recommendations, price targets, or instructions to buy or sell securities
When you see [PAST TRADING EPISODE] context, use it to identify relevant process patterns.
When you see [TRADING REFLECTION] context, apply those learned discipline and risk-control patterns.
Always:
1. Start with risk limits before trade ideas
2. Require a pre-defined invalidation condition
3. Encourage position sizing before entry
4. Track whether the trader followed the plan
5. Identify emotional trading, revenge trading, overtrading, and averaging-down behavior
6. Encourage defined-risk structures where appropriate
7. Remind the trader that no trade is required if conditions are unclear
8. Keep outputs educational and process-focused, not advisory
Never:
1. Recommend buying, selling, shorting, or holding a specific asset
2. Predict market direction as certainty
3. Encourage leverage, martingale, doubling down, or revenge trading
4. Override risk limits
5. Treat unrealized recovery hopes as a valid risk plan""",
)
Use Amazon Bedrock AgentCore Memory with Episodic Strategy
Step 1: Create episodic_hooks using EpisodicMemoryHooks(memory_id, client).
Step 2: Create trader_routine_agent using Agent with hooks, model, tools, state, and system_prompt.
Step 3: Add tools: create_premarket_checklist, check_risk_limits, create_trade_plan, record_trade_journal, create_end_of_day_review.
Step 4: Set trader_routine_agent state with TRADER_ID and SESSION_ID.
Step 5: Define system_prompt for trading routine, risk control, journaling, and discipline.
Step 6: Create past_trading_sessions list for seeding previous trading routine episodes.
Step 7: Add Session 1 for pre-market preparation, CPI event, watchlist, and risk limits.
Step 8: Add Session 2 for trade planning, IV normalization, liquidity, and skipped trade journal.
Step 9: Add Session 3 for end-of-day review, flat P&L, rule adherence, and no forced trades.
Step 10: Add Session 4 for recovery-trading warning, martingale avoidance, and emotional-control journaling.
Step 11: Seed memory using client.create_event with memory_id, TRADER_ID, session_id, and past_trading_sessions.
Step 12: Test pre-market memory using trader_routine_agent and store result in response1.
Step 13: Test risk-limit recall using trader_routine_agent and store result in response2.
Step 14: Test trade-plan creation using trader_routine_agent and store result in response3.
Step 15: Test emotional-trading pattern using trader_routine_agent and store result in response4.
Step 16: Test trade-journal recording using trader_routine_agent and store result in response5.
Step 17: Test end-of-day review using trader_routine_agent and store result in response6.
Step 18: Store responses in test_responses for notebook review without printing.
Demo: Use Amazon Bedrock AgentCore Memory with Episodic Strategy
system_prompt="""You are a trader daily routine assistant with memory from past trading days.
Your role:
- Help the trader follow a disciplined daily trading routine
- Support pre-market preparation, risk review, trade planning, trade journaling, and end-of-day review
- Use past trading episodes to identify recurring behavior patterns
- Apply reflections about discipline, execution quality, risk control, and emotional control
- Focus on process quality, not market prediction
- Do not provide financial advice, investment recommendations, price targets, or instructions to buy or sell securities
When you see [PAST TRADING EPISODE] context, use it to identify relevant process patterns.
When you see [TRADING REFLECTION] context, apply those learned risk-control and discipline patterns.
Always:
1. Start with risk limits before discussing trade ideas
2. Require a clear trade thesis before entry
3. Require a pre-defined invalidation condition
4. Require position sizing before execution
5. Track whether the trader followed the plan
6. Identify emotional trading, revenge trading, overtrading, and averaging-down behavior
7. Encourage defined-risk structures where appropriate
8. Remind the trader that no trade is required when conditions are unclear
Never:
1. Recommend buying, selling, shorting, or holding a specific asset
2. Predict market direction as certainty
3. Encourage leverage, martingale, doubling down, or revenge trading
4. Override risk limits
5. Treat hope or recovery trading as a valid plan
"""
Trader Input: Record this in my trade journal: Instrument: QQQ options Action: skipped trade Reason: bid-ask spread was too wide Result: no trade taken Lesson: avoid forcing entries
Trader Input: Let's do my end-of-day review. P&L was flat. I followed my rules. Main mistake: I kept watching a poor setup for too long. Improvement: define a time limit for monitoring low-quality setups.
# Step 14: Create trader daily routine agent
episodic_hooks = EpisodicMemoryHooks(memory_id, client)
trader_routine_agent = Agent(
hooks=[episodic_hooks],
model="global.anthropic.claude-haiku-4-5-20251001-v1:0",
tools=[
create_premarket_checklist,
check_risk_limits,
create_trade_plan,
record_trade_journal,
create_end_of_day_review,
],
state={
"actor_id": TRADER_ID,
"session_id": SESSION_ID,
},
system_prompt="""You are a trader daily routine assistant with memory from past trading days.
Your role:
- Help the trader follow a disciplined daily trading routine
- Support pre-market preparation, risk review, trade planning, trade journaling, and end-of-day review
- Use past trading episodes to identify recurring behavior patterns
- Apply reflections about discipline, execution quality, risk control, and emotional control
- Focus on process quality, not market prediction
- Do not provide financial advice, investment recommendations, price targets, or instructions to buy or sell securities
When you see [PAST TRADING EPISODE] context, use it to identify relevant process patterns.
When you see [TRADING REFLECTION] context, apply those learned risk-control and discipline patterns.
Always:
1. Start with risk limits before discussing trade ideas
2. Require a clear trade thesis before entry
3. Require a pre-defined invalidation condition
4. Require position sizing before execution
5. Track whether the trader followed the plan
6. Identify emotional trading, revenge trading, overtrading, and averaging-down behavior
7. Encourage defined-risk structures where appropriate
8. Remind the trader that no trade is required when conditions are unclear
Never:
1. Recommend buying, selling, shorting, or holding a specific asset
2. Predict market direction as certainty
3. Encourage leverage, martingale, doubling down, or revenge trading
4. Override risk limits
5. Treat hope or recovery trading as a valid plan""",
)
# Step 15: Seed past trading routine episodes
past_trading_sessions = [
# Session 1: Pre-market preparation and risk setup
(
"Let's prepare for today's trading session. I want to focus on index options and major macro events.",
"USER",
),
(
"I'll help structure the trading day around preparation, risk limits, and rule-based execution.",
"ASSISTANT",
),
(
"The main event today is the CPI release. I want to watch SPX, QQQ, and VIX closely.",
"USER",
),
("[TOOL: create_premarket_checklist]", "TOOL"),
(
"[RESULT: PRE-MARKET CHECKLIST: Market focus is index options. Key event is CPI. Watchlist includes SPX, QQQ, and VIX.]",
"TOOL",
),
(
"Pre-market checklist prepared. Please confirm your daily risk limits before considering any trade.",
"ASSISTANT",
),
(
"Maximum daily loss is 1.5% of account equity. Maximum single-trade loss is 0.5%. Margin usage should stay below 20%.",
"USER",
),
("[TOOL: check_risk_limits]", "TOOL"),
(
"[RESULT: RISK LIMIT REVIEW: Max daily loss 1.5%, max trade loss 0.5%, margin usage below 20%. No adding risk after losses.]",
"TOOL",
),
(
"Risk limits are recorded. Any trade idea should include entry condition, invalidation condition, and exit plan.",
"ASSISTANT",
),
# Session 2: Trade planning and execution discipline
(
"I am considering an options volatility trade after the event, but only if spreads tighten and IV starts to normalize.",
"USER",
),
(
"Let's turn that into a structured trade plan before any execution.",
"ASSISTANT",
),
("[TOOL: create_trade_plan]", "TOOL"),
(
"[RESULT: TRADE PLAN: Instrument is index options. Thesis is post-event volatility normalization. Entry requires spreads tightening and IV stabilization. Invalidation is IV expansion or liquidity deterioration. Exit plan is predefined risk reduction.]",
"TOOL",
),
(
"Good. I skipped the trade because spreads stayed too wide after the CPI release.",
"USER",
),
("[TOOL: record_trade_journal]", "TOOL"),
(
"[RESULT: TRADE JOURNAL ENTRY: Action taken was skipped. Reason was poor liquidity and wide spreads. Lesson was to avoid forcing trades after event volatility.]",
"TOOL",
),
(
"That was a disciplined decision. Skipping a low-quality setup protects the trading process.",
"ASSISTANT",
),
# Session 3: End-of-day review
(
"Let's do the end-of-day review. I had no trades today, but I followed the plan and avoided forcing entries.",
"USER",
),
("[TOOL: create_end_of_day_review]", "TOOL"),
(
"[RESULT: END-OF-DAY REVIEW: P&L flat. Rules followed. No forced trades. Improvement plan is to keep monitoring liquidity and avoid trading only because an event occurred.]",
"TOOL",
),
(
"Review completed. The key positive behavior was protecting capital by not trading when conditions were unclear.",
"ASSISTANT",
),
# Session 4: Risk control issue
(
"Yesterday I almost added size after a losing trade because I wanted to recover quickly.",
"USER",
),
(
"That is a process warning. Recovery trading and martingale behavior should be blocked by the trading plan.",
"ASSISTANT",
),
("[TOOL: record_trade_journal]", "TOOL"),
(
"[RESULT: TRADE JOURNAL ENTRY: Action was avoided. Reason was emotional urge to recover losses. Lesson was to stop trading after emotional activation and respect daily risk limits.]",
"TOOL",
),
(
"This pattern should be watched carefully. The rule is no increase in size after a loss and no trades made only to recover previous losses.",
"ASSISTANT",
),
]
client.create_event(
memory_id=memory_id,
actor_id=TRADER_ID,
session_id="seed_trading_session_001",
messages=past_trading_sessions,
)
# Step 16: Test trader daily routine scenarios
# Test 1: Follow-up on previous pre-market preparation
response1 = trader_routine_agent(
"Let's prepare for today's session. What should I review first based on my previous routine?"
)
# Test 2: Risk limit reminder
response2 = trader_routine_agent(
"Before looking at trade ideas, remind me what risk limits I usually define."
)
# Test 3: Trade planning discipline
response3 = trader_routine_agent(
"""I am watching SPX options after a macro event.
The setup only interests me if spreads tighten and volatility starts to normalize.
Can you help me structure this as a trade plan?"""
)
# Test 4: Emotional trading pattern
response4 = trader_routine_agent(
"I had a losing trade earlier and feel tempted to increase size to recover. What should I do according to my process?"
)
# Test 5: Trade journal entry
response5 = trader_routine_agent(
"""Record this in my trade journal:
Instrument: QQQ options
Action: skipped trade
Reason: bid-ask spread was too wide
Result: no trade taken
Lesson: avoid forcing entries when liquidity is poor"""
)
# Test 6: End-of-day review
response6 = trader_routine_agent(
"""Let's do my end-of-day review.
P&L was flat.
I followed my rules.
Main mistake: I kept watching a poor setup for too long.
Improvement: define a time limit for monitoring low-quality setups."""
)
# Step 17: Store test responses for notebook review without printing
test_responses = {
"premarket_followup": response1,
"risk_limit_reminder": response2,
"trade_plan": response3,
"emotional_trading_pattern": response4,
"trade_journal": response5,
"end_of_day_review": response6,
}
Description of Risk
Delta Risk
Delta risk measures directional exposure created when the short straddle drifts away from neutrality. Governance should define limits, monitoring frequency, hedge triggers, and escalation rules when delta exceeds tolerance. Controls should consider gap moves, intraday volatility, assignment risk, and liquidity of hedging instruments. Reporting should separate planned rebalancing from emergency intervention, ensuring decisions remain documented, timely, and auditable across conditions.
Gamma Risk
Gamma risk reflects how quickly delta changes as the underlying moves, making short straddles vulnerable to sharp price swings. Governance should impose gamma limits near expiry, define adjustment thresholds, and require scenario analysis for sudden jumps. Controls should discourage delayed hedging, especially during fast markets. Risk reports should highlight convexity exposure, hedge slippage, and losses from repeated rebalancing under stress.
Vega Risk
Vega risk captures sensitivity to implied volatility changes, which can damage short straddles even without major directional movement. Governance should set volatility exposure limits, monitor event calendars, and restrict positions before earnings, policy announcements, or holidays. Controls should compare realized, implied, and stressed volatility. Reporting should show volatility shocks, skew changes, and liquidity impacts on closing or rolling positions promptly.
Margin Risk
Margin risk arises when adverse moves or volatility expansion increase collateral requirements faster than capital can be deployed. Governance should define minimum buffers, concentration caps, funding sources, and forced reduction rules. Controls should test margin under broker, exchange, and internal stress assumptions. Reporting should include excess liquidity, utilization trends, breach warnings, and procedures for orderly de-risking before compulsory liquidation events.
Liquidity Risk
Liquidity risk concerns the ability to enter, hedge, roll, or close short straddles without unacceptable market impact. Governance should limit position size relative to option volume, open interest, bid-ask spreads, and underlying depth. Controls should restrict trading during dislocated markets. Reporting should track execution quality, slippage, time-to-exit estimates, and backup plans when normal liquidity disappears suddenly across relevant trading venues.
Stress-Loss Risk
Stress-loss risk estimates portfolio damage under extreme but plausible shocks, including price gaps, volatility spikes, correlation breakdowns, and liquidity freezes. Governance should require predefined scenarios, reverse stress tests, and maximum tolerable loss thresholds. Controls should link stress results to capital allocation and position reduction. Reporting should explain assumptions, worst cases, recovery actions, and residual exposures after hedging under severe conditions.
Anti-Martingale Behavior
Anti-martingale behavior means reducing exposure after losses and increasing only after verified risk capacity improves, rather than doubling down. Governance should prohibit loss-chasing, unchecked averaging, and position expansion during breaches. Controls should tie sizing to capital, volatility, drawdown, and liquidity metrics. Reporting should identify repeated adjustments, escalation failures, and any behavior inconsistent with disciplined risk reduction during adverse market regimes.
Governance Controls
Governance controls define accountability, authority, documentation, and independent challenge for short straddle risk decisions. Policies should specify approved instruments, limits, monitoring cadence, exception handling, model validation, and breach escalation. Committees should review performance, stress outcomes, and control effectiveness. Audit trails should preserve rationale, approvals, hedge actions, and post-incident lessons to support transparency and continuous improvement across the full risk lifecycle.