Skip to content

Instantly share code, notes, and snippets.

View mphinance's full-sized avatar

Michael H mphinance

View GitHub Profile
@mphinance
mphinance / fetch_my_afterhour_posts.py
Created July 31, 2026 12:32
Download your entire AfterHour post history — just run it, no login/API key needed
#!/usr/bin/env python3
"""
fetch_my_afterhour_posts.py — grab your ENTIRE AfterHour post history in one go.
No login. No API key. No app. Just your username.
Turns out AfterHour's post feed is powered by a public API that anyone can call —
you don't need to be logged in, and you don't need this script to be fancy. It just
asks AfterHour for your posts, 100 at a time (that's the most it'll hand over in one
request), and keeps asking for "the next 100" until it has everything. Then it saves
@mphinance
mphinance / PROMPT-claude-desktop.md
Created June 17, 2026 01:52
strangle-timer: a trend-following options FLIP skill for Claude. Pre-pick an OTM call and put, hold one side at a time off the 5-minute trend, rotate when it flips. Broker-MCP-agnostic, keyless analysis via analyze.py. By mphinance.substack.com

strangle-timer - Claude Desktop execution prompt

Copy everything in the box below into a Claude Desktop chat. It assumes you have a brokerage MCP connected in Claude Desktop (IBKR, Alpaca, Tradier, Tastytrade, ...). Replace the TICKER / strikes / contracts up top. It will analyze first, pick the FIRST side off the live 5-minute trend, and then flip you side-to-side as the trend reverses, reading the ticket back before every order. It never trades without your explicit "go". Despite the skill name this is NOT a held strangle: you hold ONE side at a time and rotate, you never sit long both wings.

@mphinance
mphinance / multibagger_screener.py
Created June 11, 2026 20:39
Multi-Bagger DNA Screener — automates the sector + filtration steps of a small-cap multi-bagger framework (TradingView + yfinance). Companion to mphinance.substack.com
#!/usr/bin/env python3
"""
🚀 Multi-Bagger DNA Screener — The "Find It Before The Analysts" Scanner
Companion piece to Forefront Alpha's "How To Find a Multi-Bagger" series.
He sells the framework: be EARLY, before the headlines, before the analysts,
before the crowd. His named winners — IREN at $7, APLD at $6 — were all small,
under-covered, fast-growing names BEFORE Wall Street showed up.
This screener reverse-engineers that DNA into something you can actually run on
@mphinance
mphinance / README.md
Created June 3, 2026 21:52
Autonomous Claude coding loop for GitHub: a nightly workflow that reads a SPEC.md, plans its own backlog, and ships one feature per run as a PR. Built on anthropics/claude-code-action. Setup + the copy-paste prompt included.

Autonomous Claude coding loop for GitHub

A nightly GitHub Actions loop that reads a SPEC.md, plans its own backlog, and ships one feature per run as a pull request. Built on the official anthropics/claude-code-action.

Two roles, auto-selected: initializer (turns your spec into an ordered feature_list.json) and coder (builds the next pending feature, runs tests first, opens a PR). One long-lived branch, one PR, so you don't wake up to a thousand branches.

@mphinance
mphinance / README.md
Last active May 25, 2026 16:33
Substack Research Dossier — intake half of the creator stack. Companion to mphinance.substack.com/p/claudia-faith-is-six-months-ahead

Substack Research Dossier — Intake Half Of The Creator Stack

A small public gist for Substack creators who want to research other Substacks systematically instead of doom-scrolling them.

Two files:

  • pull_substack_data.py — fetches the public archive + notes for any Substack handle. No auth required, just pip install requests.
  • research_substack_prompt.md — a Claude Code-style prompt that takes the JSON the script produces and writes a dossier in a clean reusable format: profile, last N posts, last N notes, followed-hyperlinks, lineage analysis, takeaways.

Why this exists

@mphinance
mphinance / pulse.py
Created May 24, 2026 15:01
pulse.py — Mine engagement signals from your Substack network. For each profile you follow, compute author-normalized engagement lift and flag outliers. Tags via Gemini.
"""
pulse.py — Mine engagement signals from your Substack network.
For each profile you follow:
1. Pull recent posts (within WINDOW_DAYS)
2. Compute the author's typical engagement baseline (median over the window)
3. Flag posts that significantly outperformed their author's baseline
4. Tag outliers by topic via Gemini
5. Output a digest: which topics are over-performing in your network right now
@mphinance
mphinance / README.md
Last active June 27, 2026 17:15
substack-toolkit v0.3 — read and write Substack from Markdown or Python. Reader feed, Notes publishing, engagement, archive, subscribers. Works around nine undocumented private-API gotchas. Full repo: https://github.com/mphinance/substack-toolkit

substack-toolkit

Full read-and-write Substack toolkit that works around the private-API gotchas Substack will not document for you.

substack-toolkit is a Claude Skill and a small standalone Python library for working with Substack from the outside. Post drafts from Markdown or a Python builder. Read your reader feed, the published archive of any publication, individual posts, profiles, and other users' Notes. Publish Substack Notes. Like and comment with explicit, side-effect-aware methods. Single file, two deps, MIT.

What it does

Write:

# ══════════════════════════════════════════════════════════════════════════════
# MASTER MAP: underlying → list of 2x bull ETFs and 2x bear ETFs
#
# Sources:
# [D] = Direxion
# [G] = GraniteShares
# [R] = REX Shares / T-REX / Tuttle Capital
# [Df] = Defiance ETFs
#
# Only includes SINGLE-STOCK 2x ETFs, not index/sector/commodity products
// This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International  
// https://creativecommons.org/licenses/by-nc-sa/4.0/
// © BigBeluga
//@version=6
// 👨‍🏫 MPH NOTE: //@version=6 tells TradingView's servers which version of the Pine Script language to use. Different versions have different features and rules, so this line is essential for the script to run correctly.
// This script is an implementation of a two-pole filter used as an oscillator.
// Unlike a simple moving average, a two-pole filter provides a very smooth output
// with minimal lag, which makes it ideal for creating responsive oscillators.
// This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International  
// https://creativecommons.org/licenses/by-nc-sa/4.0/
// © BigBeluga
//@version=6
// 👨‍🏫 MPH NOTE: //@version=6 tells TradingView's servers which version of the Pine Script language to use. Different versions have different features and rules, so this line is essential for the script to run correctly.
// This script is an implementation of a two-pole filter used as an oscillator.
// Unlike a simple moving average, a two-pole filter provides a very smooth output
// with minimal lag, which makes it ideal for creating responsive oscillators.