More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Portfolio Returns Truth: the return you can defend

    1

    TWR vs IRR on exact flow dates, a same-money index benchmark from day one, one currency, plus an offline returns script.

    Free

    1 use5.0 (1 review)
    Portfolio Returns Truth: the return you can defend

    Portfolio Returns Truth: the return you can defend

    Example session with this skill installed

    My book has four deposits and one withdrawal over 23 months. Am I beating the index on the same money? Here are the CSVs.

    • Read your context and instructions
    • Compiled the portfolio returns truth
    • Generated the data export

    $ python3 scripts/returns.py flows.csv values.csv index.csv
    (illustrative inputs, run 2026-11-16)

    period 2024-01-02 .. 2025-12-01 (699 days)
    rates are annualised
    opening 10000.00
    put in after 15000.00 taken out 3000.00
    closing 28204.65
    gain 6204.65
    TWR +16.55% (the selection: timing of deposits removed)
    IRR +16.26% (the money: exact flow dates)
    same-money index value 26255.34 gain 4255.34
    book minus index +1949.31 (index IRR +11.32%)

    $ returns.py no_flows.csv values.csv
    no flows: without dated deposits and withdrawals neither IRR
    nor a same-money index can be computed [exit 1]

    flows.csv

    CSV · data export

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Two people look at the same portfolio and quote different returns, and both are right: one measured the picks, the other the money. This skill makes your agent say which question a number answers, compute it on exact flow dates, and benchmark it against an index bought with the same deposits on the same days.

    What it does

    Your agent chooses TWR or IRR from the question asked, annualises only from about a year (cumulative before, never blank), builds a same-money index shadow from your first day, keeps every series in your currency, and checks for the data problems that quietly corrupt a return: broker transfers imported as a sale and a buy, unpriced positions, splits, dividends counted twice.

    What you get

    PathHolds
    SKILL.mdnine rules, question-to-measure table, method
    references/twr-vs-irr.mdconventions, annualising, year one, why Modified Dietz fails
    references/same-money-benchmark.mdthe shadow account, windows, position vs index
    references/currency.mdFX leg, native vs reader currency, gaps, pence
    references/data-traps.mdtransfers, unpriced names, dividends, splits, backdating
    scripts/returns.pyTWR, exact-date IRR, same-money index and gap (stdlib, offline)
    tests/8 unit tests and illustrative CSVs

    Who it's for

    Self-directed investors, analysts and developers building portfolio tools who have seen a return that disagrees with the broker, drops after an import, or beats an index only because the index was measured on different money.

    Scope

    Covered: time- and money-weighted returns, benchmark construction, currency handling, ledger data traps. The script works on CSVs you supply.

    Not covered: fetching prices, currency conversion, parsing broker exports, tax-lot returns, derivatives, leverage, risk ratios.

    This is measurement guidance, not investment advice.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.

    Needs a clean value path: transfers, splits and unpriced names must be fixed before the script sees them. Sample CSVs are invented. No tax-lot, leverage or risk-ratio support.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    5.0
    1 review
    5
    1
    4
    0
    3
    0
    2
    0
    1
    0

    This skill has been used 1 time.

    Trust & safety

    Security scan

    Security scan passed 1 day ago

    • Free with an Agensi account

    Software
    Python 3.9+ (standard library only)

    Permissions

    Offline. Reads local CSV files only.

    Listed1 day ago

    What's inside

    Frequently Asked Questions

    It ignores when money went in. Exact-date IRR and TWR answer different questions; gain over cost answers neither.

    No. It is offline and reads three CSVs you supply, in one currency.

    Check the opening value convention and whether dividends are flows. The script counts the first day's value as the buy-in and only later flows.

    Annualising a few months prints a pace nobody earned. The script switches to annualised at 358 days.

    Free