Skip to content

Instantly share code, notes, and snippets.

View jubishop's full-sized avatar
🎼
Making a podcast app.

Justin Bishop jubishop

🎼
Making a podcast app.
View GitHub Profile

Screening Strategy

A systematic approach to identifying the best stocks for selling [put options][put-option] based on the divergence between [implied volatility][implied-volatility] and [historical volatility][historical-volatility]. The core thesis: when options are priced for significantly more volatility than a stock has actually exhibited, there is an edge in selling those options β€” the [volatility risk premium][volatility-risk-premium] tends to decay in the seller's favor.

Universe

Start with the top ~100 [S&P 500][sp500] stocks by [market cap][market-cap]. Large-cap stocks have the deepest [option markets][options-market] and the tightest [bid/ask spreads][bid-ask-spread]. Smaller index constituents often have options so illiquid that the spread alone wipes out any premium advantage.

Filters

Screening Strategy

A systematic approach to identifying the best stocks for selling [put options][put-option] based on the divergence between [implied volatility][implied-volatility] and [historical volatility][historical-volatility]. The core thesis: when options are priced for significantly more volatility than a stock has actually exhibited, there is an edge in selling those options β€” the [volatility risk premium][volatility-risk-premium] tends to decay in the seller's favor.

Universe

Start with the top ~100 [S&P 500][sp500] stocks by [market cap][market-cap]. Large-cap stocks have the deepest [option markets][options-market] and the tightest [bid/ask spreads][bid-ask-spread]. Smaller index constituents often have options so illiquid that the spread alone wipes out any premium advantage.

Filters

Trading Strategy

Short [put][put-option] [premium][premium] collection on a discretionary basket of stocks. The goal is recurring income from option premium β€” never stock ownership. [Assignment][assignment] is always avoided by [rolling][rolling] positions forward before the [exercise boundary][exercise-boundary] is breached. All cash remains invested long in stable ETFs; the puts are sold against the [margin][margin] capacity of the account, with total [notional exposure][notional-exposure] kept under 25% of liquid assets.

How It Works

Sell put options on stocks you like at [strikes][strike-price] below the current price. Collect the premium upfront. If the stock stays above the strike, the option [expires][expiration] worthless and you keep the full premium. If the stock drops toward or below the strike, roll the position out (and potentially down) to a later expiration before assignment can happen.

This is not the [wheel strategy][wheel-strategy]. If assignment occurs despite rolling efforts,

@jubishop
jubishop / STRATEGY.md
Last active April 4, 2026 17:21
Short put premium collection strategy

Trading Strategy

Short [put][put-option] [premium][premium] collection on a discretionary basket of stocks. The goal is recurring income from option premium β€” never stock ownership. [Assignment][assignment] is always avoided by [rolling][rolling] positions forward before the [exercise boundary][exercise-boundary] is breached. All cash remains invested long in stable ETFs; the puts are sold against the [margin][margin] capacity of the account, with total [notional exposure][notional-exposure] kept under 25% of liquid assets.

How It Works

Sell put options on stocks you like at [strikes][strike-price] below the current price. Collect the premium upfront. If the stock stays above the strike, the option [expires][expiration] worthless and you keep the full premium. If the stock drops toward or below the strike, roll the position out (and potentially down) to a later expiration before assignment can happen.

This is not the [wheel strategy][wheel-strategy]. If assignment occurs despite rolling efforts,

On-Device ML Episode Recommendations

Context

The app has no recommendation or rating system. Users accumulate episodes across subscribed podcasts but have no intelligent help choosing what to listen to next. The Command Center already has like/dislike commands registered but disabled. We want to build an on-device ML recommendation engine using Apple's NLEmbedding (Natural Language framework) to compute semantic similarity between episodes, combined with explicit user feedback (like/dislike) and implicit behavioral signals (listening history, completion rate).

Key constraint: MLRecommender (Create ML) is macOS-only for training, so we can't use it on-device. Instead, we use NLContextualEmbedding (BERT-based, iOS 17+) as the primary embedding model, with NLEmbedding.sentenceEmbedding as fallback. These are pre-trained neural networks that run entirely on-device to compute semantic vectors for episode text. On top of this, we build a preference learning system that adapts to the user over ti

@jubishop
jubishop / search_logic.md
Created March 19, 2026 05:09
better search logic

Separate Search Row Identity from Canonical Podcast Data

Problem Search/trending currently use feedURL for two different jobs:

  1. Canonical podcast data.
  2. Stable UI identity for a result row.

When an iTunes result maps to an already-saved podcast whose canonical feedURL differs, using the real feedURL fixes the model but destabilizes the list. Using the search feedURL stabilizes the list but makes the bridged Podcast partially synthetic.

name background_tasks_investigation
description Deep investigation into BGTaskScheduler failures on TestFlight builds β€” dasd rejection, rate limiting, and scheduling strategies
type project

Background Task Scheduling Investigation (2026-03-14)

The Problem

Background tasks (BGProcessingTask / BGAppRefreshTask) schedule and execute correctly on dev builds but fail silently on TestFlight/release builds. BGTaskScheduler.submit() returns success (no throw), but the system daemon dasd rejects the request internally.


A. Task blocks where errors silently disappear

These are Task blocks containing try with no error handling at all. The errors vanish into the void.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ File β”‚ Line β”‚ Function β”‚ What fails silently β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ ManagingEpisodes.swift β”‚ 80-85 β”‚ queueEpisodeOnTop β”‚ getOrCreateEpisodeID + queue.unshift β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

Plan: Claude Code Remote Control via launchctl

Context

You want a persistent Claude Code remote-control session running in the background on your Mac, accessible from your phone at any time. This avoids needing to manually open a terminal and run claude remote-control every time.

What we'll create

File: ~/Library/LaunchAgents/com.jubi.claude-remote.plist

A LaunchAgent that:

@jubishop
jubishop / CLAUDE.md
Created February 26, 2026 22:06
CLAUDE.md

MCP Usage

  • If discussing Swift, SwiftUI, and iOS: Consult the apple-docs and apple-deep-docs mcps for up to date information.

Repo Guardrails

  • Never create commits or push unless the humans explicitly ask.
  • Assume the working tree may hold user edits; respect them and avoid resets or reverts.
  • Stay sandbox-friendly: ask for elevated access only when instructions require files outside the workspace.

Build & Test

  • Don't actually try to build or test unless the user explicitly asks.