Real Codex workflows

Real Sessions

Browse complete strategy-research conversations, from the first natural-language request through validated artifacts, simulation, and analysis.

SESSION 02

WEAK_IBS

A simple SPY mean-reversion hypothesis carried from natural-language rules to a twenty-year historical simulation.

WEAK_IBS RUN
2006–2025 · SPY · 389 trades
You

Create a trade plan named WEAK_IBS_TRADE_PLAN. Use a maximum holding period of 60 days and a universe containing only SPY. Enter when IBS is below 0.1 and exit when IBS is above 0.8.

WhaleRider

I’ll create the requested trade plan with the exact name, universe, holding period, and IBS rules.

Created by WhaleRider.

Definition ID: 6aae9c9331249edb825f66a9

WEAK_IBS_TRADE_PLAN.trade-plan.yamlGenerated definition
# ==============================================================================
# WHALERIDER TRADE-PLAN CONFIGURATION
# ==============================================================================
# Artifact Name: WEAK_IBS_TRADE_PLAN
# Purpose: Defines market scope, calculations, signals, and trading decisions.
# Status: Generated configuration; validation is required before deployment.
# Website: https://whalerider.org
# WhaleRider © 2026 RockSoldi. All rights reserved.
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# TRADE-PLAN IDENTITY
# ------------------------------------------------------------------------------
# Identifies this trade-plan definition using the required stable artifact name.
NAME: WEAK_IBS_TRADE_PLAN

# ------------------------------------------------------------------------------
# TRADE DIRECTION
# ------------------------------------------------------------------------------
# Opens long positions when the daily internal bar strength condition is oversold.
SIDE: LONG

# ------------------------------------------------------------------------------
# RISK MANAGEMENT
# ------------------------------------------------------------------------------
# Limits each position to a maximum holding period of sixty calendar days.
# Existing positions are not replaced when capital is unavailable.
RISK:
  HOLDING_MAX_PERIOD: 60D
  REPLACEMENT_MODE: NONE

# ------------------------------------------------------------------------------
# MARKET UNIVERSE
# ------------------------------------------------------------------------------
# Restricts all evaluation and trading activity to the SPY ticker.
UNIVERSE:
  TICKERS:
    - SPY

# ------------------------------------------------------------------------------
# INDICATORS
# ------------------------------------------------------------------------------
# Captures daily closing, low, and high prices for internal bar strength.
# IBS measures the close's location within the daily high-to-low price range.
INDICATORS:
  - NAME: DAILY_CLOSE
    DOMAIN: CANDLE
    INTERVAL: DAY
    MEASUREMENT: Close
  - NAME: DAILY_LOW
    DOMAIN: CANDLE
    INTERVAL: DAY
    MEASUREMENT: Low
  - NAME: DAILY_HIGH
    DOMAIN: CANDLE
    INTERVAL: DAY
    MEASUREMENT: High
  - NAME: IBS
    DOMAIN: DERIVED
    MEASUREMENT: (DAILY_CLOSE - DAILY_LOW) / (DAILY_HIGH - DAILY_LOW + 0.0000001)

# ------------------------------------------------------------------------------
# SIGNALS
# ------------------------------------------------------------------------------
# Identifies an oversold IBS reading below 0.1 for entry.
# Identifies an elevated IBS reading above 0.8 for the signal-based exit.
SIGNALS:
  - NAME: IBS_OVERSOLD
    IS: IBS < 0.1
  - NAME: IBS_OVERBOUGHT
    IS: IBS > 0.8

# ------------------------------------------------------------------------------
# TRADING CRITERIA
# ------------------------------------------------------------------------------
# Enters when daily IBS is below 0.1 and exits when it exceeds 0.8.
# The independent sixty-day maximum holding control remains active.
CRITERIA:
  ENTER:
    IF: IBS_OVERSOLD
  EXIT:
    IF: IBS_OVERBOUGHT

# ------------------------------------------------------------------------------
# LEGAL AND RISK NOTICE
# ------------------------------------------------------------------------------
# This configuration is provided for technical and informational use only.
# It is not investment, financial, legal, or tax advice and is not a
# recommendation or solicitation to buy, sell, or hold any instrument.
# Trading involves risk of loss. Margin and short selling may result in
# losses exceeding the capital initially committed.
# Historical, backtested, and simulated results do not guarantee future results.
# ==============================================================================
You

Create a risk policy named WEAK_IBS_RISK_POLICY. Set maximum position risk and maximum allocation to 100% of equity.

WhaleRider

I’ll create the requested risk policy with the exact allocation limits.

Created by WhaleRider.

Definition ID: 6aae9cdb31249edb825f66aa

WEAK_IBS_RISK_POLICY.risk-policy.yamlGenerated definition
# ==============================================================================
# WHALERIDER RISK-POLICY CONFIGURATION
# ==============================================================================
# Artifact Name: WEAK_IBS_RISK_POLICY
# Purpose: Defines reusable limits for position value and loss exposure.
# Status: Generated configuration; validation is required before deployment.
# Website: https://whalerider.org
# WhaleRider © 2026 RockSoldi. All rights reserved.
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# POSITION LIMITS
# ------------------------------------------------------------------------------
# Defines per-position value and risk limits as percentages of account equity.
# This policy permits each new position to use up to the full current account
# equity, subject to available buying power and strategy allocation capacity.
NAME: WEAK_IBS_RISK_POLICY
# Caps one new position at 100% of current account equity.
MAX_POSITION_VALUE_PCT: 100
# Targets a maximum loss budget of 100% of current account equity per position.
MAX_POSITION_RISK_PCT: 100

# ------------------------------------------------------------------------------
# LEGAL AND RISK NOTICE
# ------------------------------------------------------------------------------
# This configuration is provided for technical and informational use only.
# It is not investment, financial, legal, or tax advice and is not a
# recommendation or solicitation to buy, sell, or hold any instrument.
# Trading involves risk of loss. Margin and short selling may result in
# losses exceeding the capital initially committed.
# Historical, backtested, and simulated results do not guarantee future results.
# ==============================================================================
You

Create a strategy from both definitions and call it WEAK_IBS_STRATEGY.

WhaleRider

I’ll link the trade plan and risk policy into WEAK_IBS_STRATEGY.

Created by WhaleRider.

Definition ID: 6aae9d0b31249edb825f66ab

WEAK_IBS_STRATEGY.strategy.yamlGenerated definition
# ==============================================================================
# WHALERIDER STRATEGY CONFIGURATION
# ==============================================================================
# Artifact Name: WEAK_IBS_STRATEGY
# Purpose: Connects one deployed trade plan to one deployed risk policy.
# Status: Generated configuration; validation is required before deployment.
# Website: https://whalerider.org
# WhaleRider © 2026 RockSoldi. All rights reserved.
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# DEPLOYED ARTIFACT REFERENCES
# ------------------------------------------------------------------------------
# Binds the strategy to validated, deployed artifact identifiers.
# Identifies this strategy artifact using the supplied stable definition name.
NAME: WEAK_IBS_STRATEGY
# References the supplied deployed trade plan that defines trading rules.
TRADE_PLAN_ID: 6aae9c9331249edb825f66a9
# References the supplied deployed risk policy that defines risk limits.
RISK_POLICY_ID: 6aae9cdb31249edb825f66aa

# ------------------------------------------------------------------------------
# LEGAL AND RISK NOTICE
# ------------------------------------------------------------------------------
# This configuration is provided for technical and informational use only.
# It is not investment, financial, legal, or tax advice and is not a
# recommendation or solicitation to buy, sell, or hold any instrument.
# Trading involves risk of loss. Margin and short selling may result in
# losses exceeding the capital initially committed.
# Historical, backtested, and simulated results do not guarantee future results.
# ==============================================================================
You

Create a simulation called WEAK_IBS_SIMULATION from 2006-01-01 to 2025-12-31, with initial cash of $100,000.

WhaleRider

I’ll create the historical simulation using the strategy just created, for the requested date range and initial cash.

Created by WhaleRider.

Definition ID: 6aae9d3631249edb825f66ac

WEAK_IBS_SIMULATION.simulation.yamlGenerated definition
# ==============================================================================
# WHALERIDER SIMULATION CONFIGURATION
# ==============================================================================
# Artifact Name: WEAK_IBS_SIMULATION
# Purpose: Defines a historical multi-strategy simulation and account model.
# Status: Generated configuration; validation is required before execution.
# Website: https://whalerider.org
# WhaleRider © 2026 RockSoldi. All rights reserved.
# ------------------------------------------------------------------------------

# ------------------------------------------------------------------------------
# SIMULATION IDENTITY
# ------------------------------------------------------------------------------
# Identifies this simulation artifact using its required stable definition name.
NAME: WEAK_IBS_SIMULATION

# ------------------------------------------------------------------------------
# STRATEGY ALLOCATION
# ------------------------------------------------------------------------------
# Selects the deployed strategy for execution in the shared simulation account.
# No strategy-specific gross-equity allocation cap is specified.
STRATEGIES:
  - STRATEGY_ID: 6aae9d0b31249edb825f66ab

# ------------------------------------------------------------------------------
# ACCOUNT ASSUMPTIONS
# ------------------------------------------------------------------------------
# Sets starting cash and account equity in dollars.
# Margin configuration is omitted, so no financing model is configured.
INITIAL_CASH: 100000

# ------------------------------------------------------------------------------
# HISTORICAL DATE SCOPE
# ------------------------------------------------------------------------------
# Defines the inclusive historical evaluation period using ISO calendar dates.
FROM: 2006-01-01
TO: 2025-12-31

# ------------------------------------------------------------------------------
# LEGAL AND RISK NOTICE
# ------------------------------------------------------------------------------
# This configuration is provided for technical and informational use only.
# It is not investment, financial, legal, or tax advice and is not a
# recommendation or solicitation to buy, sell, or hold any instrument.
# Trading involves risk of loss. Margin and short selling may result in
# losses exceeding the capital initially committed.
# Historical, backtested, and simulated results do not guarantee future results.
# ==============================================================================
You

Run the simulation and let me know when it has finished.

WhaleRider

I started the simulation, waited for it to reach a terminal state, and checked the status after the service wait timed out.

The simulation finished successfully.

Simulation run ID: 6aae9d5431249edb825f66ad
Status: Completed

You

Show me a summary of the results.

WhaleRider
$580,672.67Ending equity
480.67%Total return
9.19%CAGR
389Completed trades
1.95Profit factor
14.80%Maximum drawdown
0.88Sharpe ratio
1.41Sortino ratio
39.48%Exposure-adjusted CAGR
You

Show me the annual returns and the equity curve.

WhaleRider

Annual returns

0%
+13.78%2006
+10.30%2007
+25.29%2008
+20.49%2009
+7.77%2010
-2.77%2011
+1.36%2012
+13.86%2013
+3.27%2014
+9.04%2015
+13.69%2016
+3.05%2017
-12.53%2018
+18.23%2019
+25.07%2020
+15.74%2021
+4.28%2022
+7.96%2023
+2.10%2024
+11.63%2025

2020 was strongest at 25.07%. The only negative years were 2011 and 2018.

Equity curve

0%100%200%300%400%500%20062008201020122014201620182020202220242025YearCumulative return (%)

Year-end view of the recorded annual results, ending at a 480.67% total return.

You

Show me the best trade and the worst trade.

WhaleRider
TickerEnteredEntryExitedExitSharesP&LReturn
Best tradeSPY2020-10-29$325.632020-11-17$359.231,061+$35,649.60+10.32%
Worst tradeSPY2018-12-13$266.402018-12-27$242.471,090−$26,083.70−8.98%

A complete research loop, preserved as it happened.

The session connects user-defined rules to durable artifacts, a completed twenty-year simulation, authoritative metrics, charts, and trade-level inspection.

Connect your AI →