Skip to content

Instantly share code, notes, and snippets.

View mphinance's full-sized avatar

Michael H mphinance

View GitHub Profile
@mphinance
mphinance / ROC_YM.md
Created July 6, 2025 15:41
Deconstruction Return Of Capital

Deconstructing Return of Capital (ROC) 🛡️

Return of Capital (ROC) is a frequently debated and often misunderstood aspect of ETF distributions, particularly for high-income ETFs like YieldMax products. It's crucial to understand that ROC is primarily a tax classification, not an indicator of fund performance.

What is ROC? A Tax Classification, Not Performance Indicator: 📝

  • Definition: "ROC is simply how a distribution is categorized for tax purposes." It does not signify whether a fund is performing well or poorly.

  • Core Idea: ROC payments "reduce your cost basis in the investment, but they are not immediately taxable." This means that while you receive cash, you don't pay income tax on that portion of the distribution in the current year. 💰

@mphinance
mphinance / TheTaoOfTrading.md
Last active October 29, 2025 16:46
The Tao of Trading: A Detailed Briefing Document

The Tao of Trading by Simon Ree


Introduction

"The Tao of Trading: How to Beat Wall Street at Its Own Game" by Simon Ree is a comprehensive guide to navigating financial markets, particularly focusing on options trading. The book challenges conventional wisdom in finance, aiming to empower individual investors to make their own trading decisions and achieve consistent profitability regardless of market conditions. Ree emphasizes the importance of mindset, risk management, and a systematic approach over relying on traditional financial advice or complex theories.


I. Challenging Conventional Wisdom and Wall Street's Flaws

// 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.
# ══════════════════════════════════════════════════════════════════════════════
# 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
@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:

@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 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 / 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 / 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