Long Short Construction logo

Long Short Construction

Community
agentii-ai
long-short-construction

Long short portfolio construction, market neutral positioning, factor-balanced book, gross and net exposure management, pair selection, beta hedging, portfolio construction methodology

Overview

Publisheragentii-ai
Repositoryagentii-investment-intelligence
Skill namelong-short-construction
Stars
207
Forks
16
Bundled files
3
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by agentii-ai on GitHub. Read the source before you install it.

Installation

Install the Long Short Construction AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/agentii-ai/agentii-investment-intelligence/tree/main/plugins/vertical-plugins/portfolio-strategy/skills/agentii/long-short-construction
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/agentii-ai/agentii-investment-intelligence.git /tmp/agentii-investment-intelligence
mkdir -p .claude/skills
cp -r /tmp/agentii-investment-intelligence/plugins/vertical-plugins/portfolio-strategy/skills/agentii/long-short-construction .claude/skills/long-short-construction
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Long Short Construction in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Long Short Construction on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Long Short Construction is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Methodology fused from institutional portfolio-construction and buy-side long/short frameworks; all text is an original paraphrase.

Defaults

ParameterDefault ValueRationale
lookback_quarters4Standard window for beta and correlation estimation
gross_exposure_target150%Mid-range of the 130-200% institutional band
net_exposure_band-20% to +60%Defines strategy identity; outside this is style drift
beta_net_deviation_max15ppGap between raw and beta-adjusted net above which the hedge is mis-specified
max_long_position5%Standard conviction sizing
max_short_position3%Halved for unbounded loss and adverse position drift
max_days_to_cover5Squeeze avoidance on any single short

Preflight

Run canonical pre-flight per contracts/preflight.md. Include the X-Agentii-Trace header on every tool call per contracts/x-agentii-trace-header.md — carry the _run_id from your first tool result and name yourself (and your parent, if you were spawned).

Data Source Priority

  1. Construction methodology — references/construction-methodology.md (bundled exposure framework)
  2. Strategy frameworks — search_investment_strategies(domain=fundamental, kind=position_sizing)
  3. Historical analogues — search_by_analogue(market_regime=...) for regime-specific exposure precedent
  4. Market data — ~~market_data placeholder for beta estimation and borrow/short-interest inputs

Methodology

Retrieval Scope

structured_only

Retrieval Strategy

Ownership & insider signals: search_institutional_holdings (top-10 holders + whale portfolios, direction=accumulating|reducing|new|exited) and search_insider_trades (Form-4 transactions with SEC URLs) are available as signal inputs.

Branch (a) Structured Data Query from contracts/retrieval.md. Retrieve construction frameworks via search_investment_strategies; retrieve regime precedent via search_by_analogue. Detailed methodology in references/construction-methodology.md.

Temporal Scope

See frontmatter temporal_scope block.

Tool Allowlist

See frontmatter allowed_tools.

Protocol

Gross and net exposure are two independent dials. Gross sets how much stock-specific opportunity the book harvests; net sets how much of the return is simply the market. Raising gross while holding net constant is the defining move of long/short construction — it is what separates the strategy from levered long-only. Full derivations, attribution worked examples, and book-level limit tables are in references/construction-methodology.md.

Foundational principle: return tracks net exposure, not gross. Adding equal-beta shorts to a long book halves the return without improving selection. A short book that exists only to damp beta is a pure drag — shorts must earn their own alpha, or index-level hedging is the cheaper and more honest instrument.

Steps
  1. Exposure Inventory: Compute long %, short %, gross (L+S), and raw net (L−S) against NAV. Record the starting point before any proposed change.

  2. Beta-Adjusted Net (the decision-grade measure): Compute (Long% x weighted long beta) - (Short% x weighted short beta). Raw net silently assumes both sides share market sensitivity. High-beta growth longs hedged with defensive low-beta shorts can carry more directional risk than raw net implies. If raw and beta-adjusted net diverge by more than beta_net_deviation_max, the hedge is mis-specified — re-select or re-size the short side rather than reporting raw net.

  3. Risk Decomposition: Confirm the book's residual is idiosyncratic. Market components offset across paired exposure, leaving long-side plus short-side company/industry risk. Note the failure mode explicitly: with beta removed there is no tailwind to carry weak selection.

  4. Short-Side Classification: Separate alpha shorts (held to earn a return on their own thesis) from index shorts (held to damp beta). These are not interchangeable — using alpha shorts as a beta hedge pays the analytical cost of the former for the return profile of the latter. Screen every alpha short against the seven structural constraints (market long bias, unbounded loss, timing, borrow availability, short interest and days-to-cover, volatility asymmetry, sizing).

  5. Position Drift Check: Short weights move adversely by construction — a losing short grows into the book while a losing long shrinks out of it. Schedule re-sizing rather than relying on stops alone. Flag any short exceeding max_short_position or max_days_to_cover.

  6. Pair Integrity (when expressing an explicit pair): same primary risk factor on both legs; beta-match rather than dollar-match; each leg must clear the research bar independently; name the divergence catalyst and its date range; size for the decoupled case, since correlated legs decouple precisely under the stress the pair was built to survive.

  7. Sensitivity Grid: Publish fund return across a −20% to +20% market range. The slope of the row is net exposure; the intercept is alpha. Diagnose both separately — a book can post a good return while its intercept is zero and its slope is merely large.

  8. Limit Reconciliation: Check gross, net band, sector net, and per-position sizes against Defaults. Recompute all three exposure measures after every position change; the two dials stay independent only if measured continuously, otherwise a series of individually reasonable trades silently converts a hedged book into a levered directional one.

  9. Output: Report both exposure measures, the attribution split (beta contribution vs alpha contribution per side), the sensitivity grid, and every limit breach.

Output File

{ticker}/{YYYY-MM-DD_HHMM}_long-short-construction_{affix}.md

Output Structure

  1. Executive Summary — current gross/net/beta-adjusted net and whether the book sits within its mandate band
  2. Exposure Table — long %, short %, gross, raw net, beta-adjusted net, with weighted betas per side
  3. Attribution Split — beta contribution vs alpha contribution for the long and short books separately
  4. Short-Side Review — alpha vs index classification, seven-constraint screen, days-to-cover and borrow status
  5. Pair Detail — per-pair legs, beta match, divergence catalyst and expected window
  6. Sensitivity Grid — fund return across −20% to +20% market range, with slope (net) and intercept (alpha) called out
  7. Limit Reconciliation — every Defaults threshold with pass/breach status
  8. Historical Analogues — regime-matched exposure precedent with /v/ citations
  9. Coverage Gaps — missing betas, unavailable borrow data, degraded-mode flags

Error Handling

ErrorFallback
No beta data for a holdingUse sector-median beta; flag the substitution and widen the reported beta-adjusted net as a range
Borrow / short-interest data unavailableReport the short as unverified for squeeze risk; do not clear it against max_days_to_cover
search_investment_strategies unreachableProceed with references/construction-methodology.md; annotate coverage_gap
search_by_analogue returns emptyContinue without regime precedent; flag reduced confidence on the exposure band

Memory Load

See contracts/memory-load.md.

Snapshot

See contracts/snapshot-synthesis.md.

Final Summary (TUI)

Include ### Key Citations block with 0-10 clickable /v/ URLs.

References

  • references/construction-methodology.md
  • contracts/citation-and-memory.md
  • contracts/retrieval.md
  • contracts/output-frontmatter-schema.md
  • contracts/memory-load.md
  • contracts/snapshot-synthesis.md
  • contracts/preflight.md

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Long Short Construction AI skill do?

Long short portfolio construction, market neutral positioning, factor-balanced book, gross and net exposure management, pair selection, beta hedging, portfolio construction methodology

Why use Long Short Construction on TypingMind?

Because you install it once and use it with any model. Long Short Construction is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Long Short Construction in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/agentii-ai/agentii-investment-intelligence/tree/main/plugins/vertical-plugins/portfolio-strategy/skills/agentii/long-short-construction. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Long Short Construction?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Long Short Construction?

As many as you like. As long as a model supports skills, you can use Long Short Construction with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Long Short Construction AI skill free?

Yes. It is published on GitHub by agentii-ai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇