Bear Call Spread Options Flow

Generate income in bearish or neutral markets with this credit spread strategy using automated Node-RED trading

What is a Bear Call Spread?

A Bear Call Spread (also called a "Short Call Spread" or "Credit Call Spread") is a bearish options strategy designed to profit when the underlying asset's price stays below a certain level or declines. Unlike the Bear Put Spread which is a debit strategy, the Bear Call Spread generates a net credit when opened. This Node-RED flow automates the entire strategy execution using the Alpaca API, including contract selection, order execution, position tracking, and performance analytics.

📉 Bearish Strategy 💰 Credit Spread 📋 Options Trading Call Options Vertical Spread Income Strategy
2
Option Legs
$10
Strike Width
Credit
Strategy Type
Defined
Risk Profile

📊 Bear Call Spread Structure

SELL Call option at lower strike price (closer to the money) — receives premium (higher value)
BUY Call option at higher strike price (further out-of-the-money) — pays premium to cap risk

💰 Credit Received: The difference between the premium received from selling the lower-strike call and the premium paid for the higher-strike call is your maximum profit. You keep this credit if the stock stays below the lower strike at expiration.

🎯 Risk Profile: Maximum loss is the width of the strikes minus the net credit received. Maximum profit (the net credit) is achieved when the underlying stays below the lower strike price at expiration.

Bear Call Spread vs Bear Put Spread

Both strategies profit from bearish moves, but they have key differences:

Feature Bear Call Spread Bear Put Spread
Type Credit Spread Debit Spread
Initial Cash Flow Receive premium upfront Pay premium upfront
Options Used Call options Put options
Maximum Profit Net credit received Strike width minus debit paid
When to Use Neutral to moderately bearish Moderately to strongly bearish
Time Decay Works in your favor Works against you

Key Features

🔍 Automatic Contract Selection

Fetches available call options contracts for your chosen expiration date and automatically calculates optimal strike prices based on current market price.

📊 Real-Time Position Tracking

Monitors buy leg, sell leg, and underlying positions every minute during market hours (9 AM - 3 PM ET, Monday-Friday).

💼 Multi-Account Support

Supports multiple paper trading accounts for testing different configurations and managing complex positions across accounts.

📈 Market Value Calculation

Calculates ITM/OTM status and market value for both legs, tracking premiums and potential payouts in real-time.

🎚️ Open Interest Filtering

Filters contracts by open interest (>1000) to ensure sufficient liquidity for smooth trade execution and tight bid-ask spreads.

⚡ Limit Order Execution

Uses limit orders for precise entry and exit prices, avoiding slippage on the options trades.

Flow Workflow Steps

The flow executes the bear call spread strategy in a structured sequence:

Clear Flow Variables

Reset all flow variables to ensure a clean starting state before executing the strategy.

Set Ticker & Expiration

Configure the underlying asset and options expiration date (e.g., December 19, 2025).

Fetch Current Price

Get the real-time price of the underlying to determine appropriate strike prices for the spread.

Fetch Call Options Contracts

Retrieve available call options contracts for the specified expiration date range with sufficient liquidity.

Calculate Strike Prices

Determine sell strike (ATM or slightly OTM) and buy strike (10 points higher) based on current price.

Execute Credit Spread

Sell the lower-strike call (collecting premium) and buy the higher-strike call (paying less premium) to receive net credit.

Monitor & Track Performance

Continuously track position market values, calculate P&L, and monitor for assignment risk as expiration approaches.

How to Import This Flow

  1. Copy the JSON code from the box below by clicking the "Copy to Clipboard" button.
  2. Open your MachineTrader Node-RED editor.
  3. Click the hamburger menu (☰) in the top-right corner.
  4. Select Import from the dropdown menu.
  5. Paste the JSON code into the import dialog.
  6. Click Import to add the flow to your workspace.
  7. Configure your Alpaca credentials in the Paper account configuration nodes.
  8. Click Deploy to activate the flow.

⚠️ Important: Credit spreads involve the obligation to sell stock if assigned. Options trading involves substantial risk and may not be suitable for all investors. The maximum loss equals the strike width minus the credit received. Always test thoroughly before using real funds.

💡 Note: Bear Call Spreads work best when you expect the underlying to stay flat or decline moderately. The strategy benefits from time decay (theta) as long as the stock stays below your short strike. You can modify the underlying asset and expiration date in the "set variables" function node.

Node-RED Flow JSON

Click the button below to copy the complete flow configuration to your clipboard:

Bear Call Spread.json

            

📄 Note: The JSON code will be loaded dynamically. If it doesn't appear, please download the JSON file directly.

Customization Options

You can easily customize this flow to fit your options trading goals:

🔄 Change Underlying Asset

Edit the "set variables" function node to change the underlying value to any optionable stock or ETF. Ensure the asset has sufficient options liquidity for tight spreads.

📅 Modify Expiration Date

Update the expirationDate variable to target different expiration cycles. Shorter-dated options have faster time decay but higher gamma risk.

📊 Adjust Strike Width

The default spread width is $10. Modify the strike calculation to change strikeHigh = strike + 10 for wider or narrower spreads. Wider spreads = more credit but more risk.

🎚️ Filter by Open Interest

Adjust the open interest filter threshold in the "filter contracts by open_interest" function. Higher thresholds ensure better liquidity but fewer available contracts.

📍 Adjust Strike Selection

Move the short strike further OTM for higher probability of profit but lower credit, or closer to ATM for more credit but higher risk of being tested.