Loading…
Public trading strategy

Peace deal with Iran finally in sight — short oil as prices get ready to drop

Created

Thesis

The war in Iran has kept oil prices high because a massive portion of the world's oil has to pass through the Strait of Hormuz. With a peace deal imminent, this major bottleneck is about to reopen, which will let a lot more oil flow to the global market. Basic economics suggests that a huge increase in supply will cause the price of oil to drop. Because oil prices have been artificially inflated by war fears, an end to the conflict should trigger a rapid move back toward lower, pre-war prices.

Strategy approach

Build a rule-based strategy to short USO (United States Oil Fund) on a daily (D) timeframe. Enter a short position if the front-month crude oil futures contract closes below its 10-day simple moving average. Exit the short position if crude oil closes above its 5-day simple moving average, or use a 4% stop-loss to the upside.

Markets and timeframes

Entry and exit at a glance

These are the named rules in the shared configuration. Review the full conditions below before using a strategy.

  • Entry: SMA Signal Short (USO@4h) (1 condition)
  • Exit: Short Exit Rule (USO@4h) (1 condition)
  • Exit: Take Profit at 8.0% (1 condition)
  • Exit: Stop Loss at 4.0% (1 condition)

Shared strategy rules

Rule configuration

{
  "data_dependencies": [
    {
      "symbol": "USO",
      "timeframe": "4h"
    }
  ],
  "entry_rules": [
    {
      "conditions": [
        {
          "left": {
            "field": "close",
            "type": "price"
          },
          "operator": "less_than",
          "right": {
            "chart_ref": {
              "symbol": "USO",
              "timeframe": "4h"
            },
            "indicator": {
              "name": "sma",
              "period": 10
            },
            "type": "indicator"
          }
        }
      ],
      "direction": "short",
      "enabled": true,
      "id": "entry_1",
      "name": "SMA Signal Short (USO@4h)",
      "priority": 1,
      "trade_symbol": "USO"
    }
  ],
  "exit_rules": [
    {
      "applies_to": "short",
      "conditions": [
        {
          "left": {
            "field": "close",
            "type": "price"
          },
          "operator": "greater_than",
          "right": {
            "chart_ref": {
              "symbol": "USO",
              "timeframe": "4h"
            },
            "indicator": {
              "name": "sma",
              "period": 5
            },
            "type": "indicator"
          }
        }
      ],
      "enabled": true,
      "id": "exit_1",
      "name": "Short Exit Rule (USO@4h)",
      "priority": 1,
      "purpose": "signal"
    },
    {
      "applies_to": "short",
      "conditions": [
        {
          "left": {
            "field": "unrealized_pnl_percent",
            "type": "position"
          },
          "operator": "greater_than_or_equal",
          "right": {
            "type": "constant",
            "value": 8
          }
        }
      ],
      "enabled": true,
      "id": "exit_2",
      "name": "Take Profit at 8.0%",
      "priority": 50,
      "purpose": "take_profit",
      "target_symbol": "USO"
    },
    {
      "applies_to": "short",
      "conditions": [
        {
          "left": {
            "field": "unrealized_pnl_percent",
            "type": "position"
          },
          "operator": "less_than_or_equal",
          "right": {
            "type": "constant",
            "value": -4
          }
        }
      ],
      "enabled": true,
      "id": "exit_3",
      "name": "Stop Loss at 4.0%",
      "priority": 100,
      "purpose": "stop_loss",
      "target_symbol": "USO"
    }
  ],
  "position_sizing": {
    "max_position_percent": 25,
    "method": {
      "resistance_stop_rank": 1,
      "risk_percent": 2,
      "type": "fixed_risk"
    },
    "min_position_value": 100
  },
  "trigger_timeframe": "4h",
  "version": 1
}

Indicator configuration

{
  "indicators": [
    {
      "name": "sma",
      "period": 10
    },
    {
      "name": "sma",
      "period": 5
    }
  ]
}

Parsed strategy

{
  "data_dependencies": [
    {
      "symbol": "USO",
      "timeframe": "4h"
    }
  ],
  "entry_rules": [
    {
      "conditions": [
        {
          "left": {
            "field": "close",
            "type": "price"
          },
          "operator": "less_than",
          "right": {
            "chart_ref": {
              "symbol": "USO",
              "timeframe": "4h"
            },
            "indicator": {
              "name": "sma",
              "period": 10
            },
            "type": "indicator"
          }
        }
      ],
      "direction": "short",
      "enabled": true,
      "id": "entry_1",
      "name": "SMA Signal Short (USO@4h)",
      "priority": 1,
      "trade_symbol": "USO"
    }
  ],
  "exit_rules": [
    {
      "applies_to": "short",
      "conditions": [
        {
          "left": {
            "field": "close",
            "type": "price"
          },
          "operator": "greater_than",
          "right": {
            "chart_ref": {
              "symbol": "USO",
              "timeframe": "4h"
            },
            "indicator": {
              "name": "sma",
              "period": 5
            },
            "type": "indicator"
          }
        }
      ],
      "enabled": true,
      "id": "exit_1",
      "name": "Short Exit Rule (USO@4h)",
      "priority": 1,
      "purpose": "signal"
    },
    {
      "applies_to": "short",
      "conditions": [
        {
          "left": {
            "field": "unrealized_pnl_percent",
            "type": "position"
          },
          "operator": "greater_than_or_equal",
          "right": {
            "type": "constant",
            "value": 8
          }
        }
      ],
      "enabled": true,
      "id": "exit_2",
      "name": "Take Profit at 8.0%",
      "priority": 50,
      "purpose": "take_profit",
      "target_symbol": "USO"
    },
    {
      "applies_to": "short",
      "conditions": [
        {
          "left": {
            "field": "unrealized_pnl_percent",
            "type": "position"
          },
          "operator": "less_than_or_equal",
          "right": {
            "type": "constant",
            "value": -4
          }
        }
      ],
      "enabled": true,
      "id": "exit_3",
      "name": "Stop Loss at 4.0%",
      "priority": 100,
      "purpose": "stop_loss",
      "target_symbol": "USO"
    }
  ],
  "position_sizing": {
    "max_position_percent": 25,
    "method": {
      "resistance_stop_rank": 1,
      "risk_percent": 2,
      "type": "fixed_risk"
    },
    "min_position_value": 100
  },
  "trigger_timeframe": "4h",
  "version": 1
}

Strategy instructions

Trading agent generated from recommendation idea 'Peace deal with Iran finally in sight — short oil as prices get ready to drop'. Thesis: The war in Iran has kept oil prices high because a massive portion of the world's oil has to pass through the Strait of Hormuz. With a peace deal imminent, this major bottleneck is about to reopen, which will let a lot more oil flow to the global market. Basic economics suggests that a huge increase in supply will cause the price of oil to drop. Because oil prices have been artificially inflated by war fears, an end to the conflict should trigger a rapid move back toward lower, pre-war prices.

Performance

No trade count, win rate, or realized P&L figures are provided in this public preview. The thesis and shared rules do not establish a performance record.

What this public preview can establish

  • The thesis and strategy approach describe a market view. They do not show whether an entry or exit condition is currently met.
  • Technical strategy fields are shared above. Inspect the actual conditions and check when they were evaluated before relying on them.
  • No trade count, win rate, or P&L figure is published in this preview. It cannot establish a performance record.

Explore

How CommonQuant researches and tests strategies · Public paper-trading record and its limits · Discover public strategies