Alpha with AI

Alpha with AI

I Taught Claude to Pull a Company's Whole Debt Structure from One Filing

The most expensive thing equity and credit investors skip is the debt that gets paid before they do. I built a skill so I never skip it again.

Alpha with AI's avatar
Alpha with AI
Jun 02, 2026
∙ Paid

A quick note before we start: this is one of our deepest builds yet, and it is going out free, to everyone. No paywall on this one. If you find it useful, the best thing you can do is subscribe and pass it on.

I have been in the equity market since 2018. I still make mistakes every single day.

I do not say that the way people say it when they want you to think they are humble. I say it because it is the truest thing I know about this business. I make a mistake, I sit with it, I rethink it, I learn the lesson, and then I make a slightly different mistake the next week. That is the whole job. Anyone who tells you the best investors stop making mistakes has not watched the best investors closely enough.

Look at Mohnish Pabrai and Micron. One of the sharpest value investors of his generation sold most of his Micron position in 2023, before one of the great runs in semiconductors. That is not a small investor fumbling. That is a master of the craft, and the market still handed him a regret he will carry for years.

Because that is what the market is. The market is a place of regrets.

You regret buying the stock. You regret selling the stock. You regret not buying it. You regret not selling it. You regret the opportunity you took and the one you let walk past. There is no version of this game where you escape the pile. Everyone has a pile. The best investors do not have no regrets. They just work, every single day, to make the pile a little smaller than it was last year.

I used to write this newsletter about tools. The hot thing that month. Sometimes it was Claude, sometimes Perplexity, sometimes Chatgpt, sometimes something else. And somewhere along the way I realised I was doing my readers a quiet disservice. Because a tool you learn this month is stale next month. A tool does not make you a better investor. The only thing that makes you a better investor is becoming one, slowly, over years, by learning from people a few mistakes ahead of you.

So I changed what this newsletter is. It is not about tools anymore. It is about the regrets I am trying not to repeat, and the systems I build so I do not. I will never be a perfect investor. Not in twenty years. What I can do is show you my mistakes early enough that some of them never have to become yours.


Most of what I build, I give away here, free, because the point was never to gate the work. It was to make more investors better at this. If you want every skill, every workflow, and the downloadable guides as they ship, there is a paid tier that keeps this whole thing running, and I am grateful to everyone who is on it. But this edition, like the work itself, is yours.


This edition is one of those mistakes.

It is about the part of a company almost no equity investor reads. The part that has a legal claim on the cash flows and the assets before you ever see a rupee or a dollar. The debt stack sitting directly above your shares.

I have held companies whose equity story I knew cold and whose debt I had never truly read. I knew the growth narrative, the margins, the management. And I had no real idea which notes were secured against the actual assets, which covenant flipped if the rating changed, or how many new shares a quiet convertible settlement was about to print on top of mine. I found those things out the way most equity investors find them out. Afterwards.

That is a regret. And it is one of the most common and most expensive regrets in all of equity investing, because almost nobody does the work to avoid it. Not because they are lazy. Because the work is genuinely brutal. You are hunting through a 10-Q, cross-referencing three footnotes to find one put date, squinting at conversion language buried thirty pages deep, trying to assemble a picture the company has deliberately scattered across the document.

So I built something so I would never have to skip that work again. And so you do not have to either.

I am going to show you the exact case, the exact filing, and the exact build. And by the end you will not just have a skill. You will see the stack that has been sitting above your equity this whole time.

What Sits Above You

Everyone has a view on Carnival.

The cruise line that almost drowned in debt when the world stopped sailing. The one that loaded up on borrowings just to survive 2020 and 2021, and has spent every quarter since trying to dig back out. If you follow the stock, you know this story. The recovery. The deleveraging. The slow climb back.

This is what most of us look at when we follow a company like this.

A price chart. A five year line clawing its way back up. Total assets in one bar, total liabilities in another. It looks complete. You glance at it and feel like you understand the balance sheet. Big company, lots of assets, lots of liabilities, recovering nicely.

Now let me ask you the question I could not answer for years on companies I actually owned.

As an equity holder in Carnival, what exactly sits above you?

Not “the debt.” That single light blue liabilities bar is hiding the only thing that matters here. Because debt is not one thing. It is a stack. And every layer in that stack has a legal claim on Carnival’s cash and Carnival’s ships that comes ahead of your shares.

I pulled Carnival’s most recent quarterly filing and read the debt note properly. Here is what that one bar is actually made of.

At the top, with the first claim, sits roughly three billion dollars of secured debt, backed by collateral and guaranteed by the operating subsidiaries. These get paid first, and they have assets pledged behind them.

Below that, the bulk of it. Around twenty one billion dollars of unsecured debt that is still guaranteed by the subsidiaries. Notes running out to 2033. Euro notes. Export credit facilities stretching all the way to 2037. No collateral, but a guarantee from the companies that actually operate the ships.

And below that, the weakest tier of the debt, a little over a billion dollars that is unsecured and carries no subsidiary guarantee at all. Structurally the most fragile borrowing Carnival has. And it is still ahead of you.

Three separate layers. Roughly twenty six billion dollars of claims. All of it stacked above the equity. All of it gets satisfied before a single dollar reaches a shareholder.

And here is the part that should bother you most. This stack does not sit still. In the most recent quarter alone, one set of convertible notes that had been sitting in that pile simply disappeared from the debt and reappeared as equity. Converted. New shares, printed on top of yours, while everyone was busy watching the price chart recover.

None of this is hidden. It is all in the filing. Every number I just gave you is disclosed, sitting in a debt note, available to anyone willing to read it.

That is exactly the problem.

It is disclosed, but it is scattered. The principal is in one table. The maturity is in another column. The guarantee structure is in the row headers. The conversion that reshaped your ownership is buried in the equity statement three pages away. To see the stack the way I just laid it out, you have to hunt through the document, cross reference footnotes, and assemble by hand a picture the company has deliberately spread across the entire filing.

So almost nobody does it. Not because they are lazy. Because it is genuinely brutal, and slow, and the price chart is right there looking like enough.

That is the regret I kept making. Knowing the equity story cold, and never reading the stack that sat above it.

This is how I make sure I never skip that work again. On Carnival, or on any company I own.

The Build, In Four Moves

I am not going to read that filing by hand. Not anymore.

Not because I cannot. Because I have done it enough times to know how it ends. I find the debt table. I start pulling tranches into a spreadsheet. Somewhere around the third Euro note I lose my place. I go hunting for a maturity date and end up reading a footnote about something else. An hour later I have half a table, I am not sure I caught everything, and I still have not touched the conversion language sitting three pages away in the equity statement. The work is real. It is just the kind of work that falls apart the moment my attention does.

So I wrote down the method once, in a form that runs the same way every time, and never gets bored on the third Euro note.

That written-down method is what I mean by a skill.

Let me be precise about this, because it is the heart of the whole edition. A skill is not a prompt I paste and lose. It is a small instruction file that holds my methodology permanently. The difference matters more than it sounds. A prompt you re-type from scratch each time forgets things. You forget to ask about make-whole provisions on one company, about the fundamental-change put on another, about the events that quietly moved the balances on a third. A skill does not forget. Every nuance I care about is written into it once, so every company I point it at gets the same thorough treatment, in the same shape, with the same discipline.

And here is the question I know you are asking, because it is the right one. If I build this looking at Carnival, how can it possibly work on Walmart, or Tesla, or an aircraft manufacturer, when their debt looks nothing alike?

Because the skill does not encode Carnival’s debt. It encodes how debt is disclosed.

This is the part worth slowing down on. Every company that files with the SEC, regardless of industry, discloses its debt the same way, because the accounting rules force it to. A debt footnote. Each instrument. Its principal. Its maturity. Its coupon. Whether it is secured or unsecured. Whether it is guaranteed. Where it ranks. The conversion, call, and put terms. The events that changed the balance over the period. Tesla’s convertibles, Walmart’s plain senior notes, an airline’s debt secured against its aircraft, Carnival’s three tiers stacked above the equity. The instruments are wildly different. The disclosure skeleton is identical.

So the skill never assumes what the debt is. It only knows the questions to ask of any filing, and it asks them every time. That is what makes one skill work across thousands of companies. Not luck. Structure.

There is one honest limit, and I will say it plainly because it is what makes the output trustworthy. The skill is only as complete as the filing. If a company buries a key term in an indenture that the 10-Q only references, the skill cannot invent it. But it will tell you that the term is missing and point you to where to go find it. It does not paper over the gap. It marks it.

The build itself is small. Four moves. Most of it is the model working while I drink my protein shake.

Before the moves, one thing about why this is worth your time even if you never look at a single bond.

What I am about to walk through is not really a debt lesson. It is a pattern. A mistake I kept making, turned into a small tool that stops me from making it again. The mistake here happens to be ignoring the debt stack. But the four moves are the same whether the skill you build checks a company’s debt, runs a macro lens, or forces a pre-mortem before you size a position. Learn the four moves once, and you can build a tool around any mistake you are tired of repeating. The debt skill is just my example. Yours will be different.

Share

Move one. Define the job.

Before I touch a filing, I write one sentence. Who the skill is for, what situation it runs in, what it produces. Mine:

An equity or credit investor, looking at any company with meaningful debt, who needs every instrument, term, and ranking pulled from the filing into one clean, sourced structure before they trust their view of the company.

That sentence is the filter for everything after it. It tells the skill to work at the instrument level, not the summary level. It says the company is a variable, never a constant. Skip this and you get a vague “summarize the debt” tool that hands back the same shallow view we are trying to escape.

Here is the prompt I actually used to pressure-test that sentence before building:

I want to build a reusable skill. Before we write anything, here is the
one-sentence job: [paste your sentence].

Ask me three sharp questions that would expose anything vague or missing
in that sentence. Do not write the skill yet.
Cowork pointed at the folder with the 10-Q inside and pressure testing my original sentence
Three questions answered around soft spots of my sentence

It will create an iteration 1 of the Debt structure skill on the questions answered by you.

Move two. Teach Claude the structure of a good output.

This is the move people skip, and it is the one that matters most. I do not write the skill from my own head. I have spent couple of years half-knowing what a debt waterfall needs, and half-knowing is exactly how things get missed. So I hand Claude a real filing and have it work out, with me, the full structure of what a complete extraction must capture, before any skill exists.

This is where the hard-won detail comes from: every field a debt instrument has, every event that moves a balance, every footnote nuance, every gap that needs flagging. I am not asking Claude to remember debt. I am asking it to lay out the skeleton that any company’s debt is disclosed within.

The prompt:

Read the attached SEC filing's debt note. Do not summarize it.

Lay out the complete STRUCTURE a credit analyst would need to extract a
debt waterfall from ANY company's filing, not just this one. Organize it as:

1. The fields every individual debt instrument has (principal, maturity,
   coupon, secured/unsecured, guarantee, ranking, conversion/call/put terms,
   status).
2. The kinds of EVENTS that change a debt balance over a period (issuance,
   repayment, conversion, redemption, repurchase, amendment).
3. The qualitative footnote terms that matter for risk (collateral,
   covenants, make-whole, fundamental-change puts, special interest).
4. The categories of information that are often MISSING from a filing and
   must be pulled from other documents.

For each, note where in this filing it appeared, so I can see the structure
is real. This becomes the backbone of a reusable skill.

What comes back is the backbone: the fields, the events, the nuances, the gaps. The domain, laid out. Now the skill has something true to be built on.

Move three. Write the skill.

Now, and only now, I have Claude write the instruction file, using the structure from Move 2 and the discipline rules I insist on: read only the filing, cite every figure, flag what is missing, stay at the instrument level, never assume the company.

The prompt:

Using only the structure we just laid out, write a SKILL.md for a reusable
skill named debt-waterfall.

The skill must:
- Take any company's SEC filing as input and produce four outputs: a debt
  master table ordered by ranking, an events ledger, qualitative notes, and
  an open-items list.
- Read ONLY the filing given. Never use outside knowledge about the company.
- Put "NOT DISCLOSED" wherever the filing is silent, and record it in open
  items. Never fill a gap from memory.
- Cite the page and section for every figure and every legal term.
- Stay strictly at extraction. No valuation, no recommendation, no opinion.
- Work on any filer in any industry, because it encodes how debt is
  DISCLOSED, not any one company's debt.

Format as a standard SKILL.md with frontmatter, role, the four outputs,
reading instructions, output discipline, and what it does not do.

What comes back is the skill. I read it once, tighten a few lines, and lock it. Here it is in full, free to copy:

full debt-waterfall.md inline here

the finished SKILL.md open in the editor

Read the rules in it. The one that governs everything: if a number is not in the filing, the skill does not supply it. That single rule is why I trust this output in a way I would never trust a raw AI answer.

Move four. Install it, run it, and carry the result into Excel.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2026 Shikshan Nivesh · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture