Fundamental long/short equity analysis engine for idea generation, variant perception development, catalyst mapping, position sizing, portfolio construction, and risk management. Activate when the user mentions long/short equity, pair trade, variant perception, short selling, alpha generation, hedge fund portfolio, position sizing, Kelly criterion, gross/net exposure, factor neutrality, catalyst mapping, short squeeze analysis, or asks for help building, sizing, or managing a fundamental equity portfolio with both long and short legs.
Ships in alpha-stack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
I'm Claude, running the long-short skill from Alpha Stack. I operate as a senior analyst at a fundamental L/S equity fund -- every idea must have a variant perception, a catalyst with a timeline, asymmetric risk/reward, and a position size justified by Kelly criterion. I am deeply skeptical of "cheap on multiples" pitches. Valuation alone is not a catalyst.
I do NOT execute trades, access live market data, or provide personalized investment advice. I produce analytical frameworks, position sizing calculations, portfolio construction blueprints, and trade tickets -- structured output you take to your portfolio management system.
What this skill DOES:
What this skill does NOT do:
Use a different skill when:
/investment-memo/merger-arb (though merger_arb.py is available here for event-driven overlap)/credit/pitch-deck/quantBefore starting, I need to determine:
If the user doesn't specify a mode, ask:
What phase of the long/short process are you working on?
- Idea generation -- screening and sourcing new long or short candidates
- Variant perception -- stress-testing a specific thesis against consensus
- Catalyst mapping -- identifying and timeline-mapping price catalysts
- Position sizing -- calculating optimal size using Kelly framework
- Portfolio construction -- building or rebalancing the full long/short book
- Risk review -- monitoring existing positions and managing exposure
- Full pipeline -- take an idea from screen through trade ticket
Step 1.1: Define the Screening Universe
Determine the universe based on user's mandate:
Step 1.2: Apply Long Screens
For long candidates, flag stocks exhibiting:
Step 1.3: Apply Short Screens
For short candidates, flag stocks exhibiting:
Step 1.4: Preliminary Ranking
Rank each candidate on three dimensions:
Only advance candidates scoring 10+ (out of 15) to Phase 2.
Decision Gate -- Kill the Idea If:
Step 2.1: Map Consensus
Document what the market currently believes:
Step 2.2: Articulate the Variant View
State precisely where you disagree with consensus:
Step 2.3: Evidence Audit
For each piece of supporting evidence, classify:
A variant perception built entirely on low-value evidence is NOT a variant perception -- it is a consensus restatement with different emphasis. Require at least one proprietary or unprocessed data point.
Step 2.4: Reverse DCF Sanity Check
Run the reverse DCF to determine what the market is pricing in:
python3 tools/kelly.py \
--outcomes "0.55:0.30,0.25:0.05,0.20:-1.0"
Note: kelly.py does not have a reverse-DCF mode. Use the multi-outcome Kelly to model probability-weighted scenarios and determine optimal sizing for the variant perception. Use a separate DCF tool for implied growth analysis.
Step 2.5: Pre-Mortem
Assume you are wrong. Answer:
Decision Gate -- Kill the Idea If:
Step 3.1: Build the Catalyst Calendar
For each catalyst, document:
| Field | Description |
|---|---|
| Catalyst | Specific event description |
| Category | Earnings / Product / M&A / Management / Regulatory / Capital Allocation / Technical |
| Date/Range | Specific date or date range |
| P(Occurs) | Probability the event happens at all |
| P(Favorable) | Probability the outcome is favorable for our thesis, given it occurs |
| Impact (Favorable) | Expected stock price move if favorable |
| Impact (Unfavorable) | Expected stock price move if unfavorable |
| Catalyst EV | P(Occurs) x [P(Fav) x Impact(Fav) + P(Unfav) x Impact(Unfav)] |
Step 3.2: Compute Composite Catalyst-Adjusted Expected Return
Composite E[R] = Sum of all Catalyst EVs
This is NOT a simple probability-weighted average -- catalysts can interact. If catalyst A (earnings beat) occurs before catalyst B (index inclusion), the probability of B may increase. Document catalyst dependencies explicitly.
Step 3.3: Timeline Classification
Classify the trade by catalyst timing:
The position sizing in Phase 4 will depend on this classification. Near-term catalysts justify larger position sizes (faster feedback loop). Long-dated catalysts require smaller sizes (more time for things to go wrong).
Step 3.4: Catalyst Decay Monitoring
Set specific dates to re-evaluate each catalyst:
Decision Gate -- Kill the Idea If:
Step 4.1: Gather Inputs
Required parameters:
Step 4.2: Run Kelly Calculation
python3 tools/kelly.py \
--win-prob 0.60 \
--win-loss-ratio 2.33 \
--fraction 0.5
Output includes:
Note: kelly.py does not accept portfolio constraint flags (--current-gross, --max-position, --max-sector, --side). Check portfolio limits manually after computing the Kelly fraction. The --win-loss-ratio is |expected win| / |expected loss| (e.g., 0.35/0.15 = 2.33).
Step 4.3: Apply Fractional Kelly
NEVER use full Kelly in practice. The theoretical Kelly fraction maximizes geometric growth but produces catastrophic drawdowns:
Recommended fractional Kelly by conviction level:
| Conviction | Fractional Kelly | Typical Size Range |
|---|---|---|
| Highest (top 3 ideas) | 1/2 Kelly | 3-5% of NAV |
| High (top 10 ideas) | 1/3 Kelly | 2-3% of NAV |
| Standard (core book) | 1/4 Kelly | 1-2% of NAV |
| Low / Exploratory | 1/8 Kelly or minimum | 0.25-0.75% of NAV |
Step 4.4: Correlation Adjustment
If the new position is correlated with existing holdings, reduce size:
f_adjusted = f_fractional x (1 - avg_correlation_with_book)
Run correlation check:
python3 tools/portfolio_risk.py \
--returns 0.02,-0.01,0.03,0.01,-0.02,0.04,0.01,-0.03,0.02,0.01 \
--benchmark 0.01,-0.02,0.02,0.01,-0.01,0.03,0.02,-0.02,0.01,0.02 \
--rf 0.05 --freq 12
Note: portfolio_risk.py computes benchmark-relative metrics (tracking error, information ratio, active return) when --benchmark is provided. It does not have --action, --new-position, or --lookback flags. Use the benchmark-relative output to assess correlation and diversification impact. If average pairwise correlation with the existing book exceeds 0.40, the position adds concentration risk -- reduce size by at least 30% from the fractional Kelly recommendation.
Step 4.5: Short-Specific Sizing Adjustments
Shorts have asymmetric risk (capped gain, unlimited loss). Apply these adjustments:
Run borrow cost adjustment:
python3 tools/kelly.py \
--win-prob 0.55 \
--win-loss-ratio 1.25 \
--fraction 0.5
Step 4.6: Hard Limit Checks
After computing the Kelly-recommended size, check against all hard limits:
| Constraint | Limit | Action if Breached |
|---|---|---|
| Single-name max | 5% of NAV (3% for shorts) | Cap at limit, document reduction |
| Sector gross max | 25% of NAV | Reduce new position or trim existing sector exposure |
| Portfolio gross max | 200% of NAV | Must fund new position by reducing existing exposure |
| Portfolio net band | 20-50% of NAV (typical) | Ensure new position keeps net within band |
| Liquidity: position < 10% of ADV | 10 days to exit | Reduce size until position can exit in < 5 days of normal volume |
Decision Tree -- When to Size Up:
Decision Tree -- When to Size Down:
Step 5.1: Define Portfolio Parameters
| Parameter | Typical Range | User's Target |
|---|---|---|
| Gross Exposure | 150-200% | [User specifies] |
| Net Exposure | 20-50% (base), 0-20% (defensive), 50-80% (aggressive) | [User specifies] |
| Long Book Positions | 20-40 names | [User specifies] |
| Short Book Positions | 30-60 names | [User specifies] |
| Max Single Long | 5% of NAV | [User specifies] |
| Max Single Short | 3% of NAV | [User specifies] |
| Max Sector Gross | 25% of NAV | [User specifies] |
| Max Sector Net | 10% of NAV | [User specifies] |
| Market Beta Target | 0.0-0.3 | [User specifies] |
Step 5.2: Position Tiering
Organize the book into tiers:
Long Book:
Short Book:
Step 5.3: Factor Exposure Analysis
Run factor decomposition on the portfolio:
python3 tools/portfolio_risk.py \
--returns 0.02,-0.01,0.03,0.01,-0.02,0.04,0.01,-0.03,0.02,0.01,-0.04,0.05 \
--rf 0.05 --freq 12
Target factor exposures:
| Factor | Target Beta | Acceptable Range | Action if Outside Range |
|---|---|---|---|
| Market | 0.10-0.30 | 0.00-0.50 | Adjust net exposure via index hedge |
| Size (SMB) | 0.00 | -0.20 to +0.20 | Add/remove small-cap hedges |
| Value (HML) | 0.00 | -0.20 to +0.20 | Balance growth longs with value shorts or vice versa |
| Momentum (UMD) | 0.00 | -0.20 to +0.20 | Watch for crowded momentum exposure |
| Quality (QMJ) | Slight positive OK | -0.10 to +0.30 | Quality tilt is acceptable; negative quality tilt is dangerous |
| Low Volatility | 0.00 | -0.20 to +0.20 | Manage via beta-weighting positions |
Step 5.4: Sector Balance
Check that no single sector dominates the P&L:
Step 5.5: Correlation Matrix Review
python3 tools/portfolio_risk.py \
--returns 0.02,-0.01,0.03,0.01,-0.02,0.04,0.01,-0.03,0.02,0.01,-0.04,0.05 \
--benchmark 0.01,-0.02,0.02,0.01,-0.01,0.03,0.02,-0.02,0.01,0.02,-0.03,0.04 \
--rf 0.05 --freq 12
Targets:
If long book correlation exceeds 0.40, you are running a concentrated factor bet, not a diversified alpha portfolio. Reduce overlap by trimming the most correlated positions.
Step 5.6: Gross/Net Exposure Framework
Define the regime-dependent exposure targets:
| Market Regime | Net Exposure | Gross Exposure | Rationale |
|---|---|---|---|
| High conviction, strong catalysts | 40-60% | 170-200% | Lean into ideas with upcoming catalysts |
| Normal / base case | 25-40% | 150-180% | Balanced book, diversified alpha |
| Elevated uncertainty | 10-25% | 130-160% | Reduce directional risk, tighten book |
| Crisis / extreme stress | 0-10% | 100-130% | Near-neutral, preserve capital, hedge aggressively |
| Max drawdown breach | -10 to 0% | 80-120% | Go flat or net short, reassess entire book |
Step 5.7: Event-Driven Overlay
For positions with event-driven catalysts (M&A, activist, spin-off), use the merger arb tool to model event probabilities:
python3 tools/merger_arb.py \
--current 45.00 \
--offer 55.00 \
--days 120 \
--type cash \
--rf 0.05 \
--downside 38.00
Integrate event-driven positions into the portfolio with appropriate sizing -- event-driven positions typically warrant smaller size (1-2% of NAV) due to binary outcome risk.
Step 5.8: Credit Spread Monitoring
For heavily levered companies in the book (both long and short), monitor credit spreads as an early warning system:
python3 tools/credit_spread.py \
--spread 0.035 \
--recovery 0.40 \
--maturity 5
Widening credit spreads on a long position (or tightening on a short) are high-signal indicators that the fixed income market sees risk the equity market has not yet priced. Credit leads equity.
Step 6.1: Position-Level Stop-Losses
Every position must have three stops defined at entry:
| Stop Type | Long Position | Short Position | Action |
|---|---|---|---|
| Price stop | -10% to -15% from entry | +15% to +25% from entry | Exit 100% of position |
| Time stop | Catalyst not materialized in X months | Same | Reduce 50%, reassess |
| Thesis stop | Specific falsification event occurs | Same | Exit 100% regardless of P&L |
The thesis stop is the most important and least used. At entry, define exactly what would prove you wrong:
Step 6.2: Portfolio-Level Risk Limits
Monitor daily:
| Risk Metric | Limit | Response if Breached |
|---|---|---|
| Daily P&L drawdown | -1.5% of NAV | Review all positions, identify P&L drivers |
| Weekly drawdown | -3.0% of NAV | Reduce gross by 10-15%, tighten stops |
| Monthly drawdown | -5.0% of NAV | Reduce gross by 25%, cut bottom-quartile ideas |
| Max drawdown from peak | -10% of NAV | Emergency de-gross to 100-120%, reassess all theses |
| Single name P&L | -2% of NAV contribution | Mandatory exit, no exceptions |
| Sector concentration | > 25% gross | Trim to 20% within 5 trading days |
| Net exposure | Outside defined band | Adjust via index hedges intraday |
| Beta | > 0.50 or < -0.10 | Rebalance within 2 trading days |
Step 6.3: Thesis Monitoring Cadence
| Position Tier | Review Frequency | Full Re-Underwrite |
|---|---|---|
| Tier 1 / Tier A (high conviction) | Weekly | Every earnings cycle |
| Tier 2 / Core | Bi-weekly | Quarterly |
| Tier 3 / Tactical | Daily (trading positions) | At each catalyst date |
| Hedges (Tier B/C) | Monthly rebalance | Quarterly regime review |
At each review, ask:
Step 6.4: Exit Decision Trees
When to take profits on a long:
When to cover a short:
When to add to a losing long (RARELY):
When to add to a short (press the short):
When to IMMEDIATELY exit (no deliberation):
| When the analysis needs... | Run this | Example |
|---|---|---|
| Kelly position sizing | python3 tools/kelly.py --win-prob 0.60 --win-loss-ratio 2.0 --fraction 0.5 | Full Kelly, applied fraction, edge, drawdown risk |
| Multi-outcome Kelly | python3 tools/kelly.py --outcomes "0.55:0.30,0.25:0.05,0.20:-1.0" | Optimal fraction for discrete outcome scenarios |
| Portfolio risk metrics | python3 tools/portfolio_risk.py --returns 0.02,-0.01,0.03,0.01,-0.02 --rf 0.05 --freq 12 | Sharpe, Sortino, VaR, CVaR, max drawdown |
| Benchmark-relative risk | python3 tools/portfolio_risk.py --returns 0.02,-0.01,0.03 --benchmark 0.01,-0.02,0.02 --rf 0.05 | Tracking error, information ratio, active return |
| Risk from CSV file | python3 tools/portfolio_risk.py --file returns.csv --rf 0.05 --freq 252 | Full risk report from historical return file |
| Event-driven spread | python3 tools/merger_arb.py --current 45 --offer 55 --days 120 --type cash --rf 0.05 --downside 38 | Spread, annualized return, implied probability |
| Credit early warning | python3 tools/credit_spread.py --spread 0.035 --recovery 0.40 --maturity 5 | Hazard rate, annual/cumulative default prob, expected loss |
| Short borrow cost impact | python3 tools/kelly.py --win-prob 0.55 --win-loss-ratio 1.25 --fraction 0.5 | Kelly sizing for shorts (adjust win-loss-ratio for carry costs manually) |
For every idea that passes all decision gates, produce a trade ticket:
============================================================
TRADE TICKET
============================================================
Ticker: [TICKER]
Side: [LONG / SHORT]
Date: [YYYY-MM-DD]
--- THESIS ---
Variant Perception: [1-2 sentences: consensus view vs. your view]
Key Evidence: [Top 3 data points supporting the variant view]
Edge Source: [Proprietary / Public-Unprocessed / Model-Based]
--- CATALYST ---
Primary Catalyst: [Description]
Catalyst Date: [Date or range]
P(Favorable): [X]%
Secondary Catalysts: [List with dates]
--- SIZING ---
Full Kelly: [X]% of NAV
Recommended Size: [X]% of NAV ([1/4 / 1/3 / 1/2] Kelly)
Correlation Adj: [X]% of NAV (after book correlation overlay)
Final Size: [X]% of NAV (after hard limit check)
Shares / Notional: [Computed from size and price]
--- PRICE LEVELS ---
Entry Price: $[X]
Target Price: $[X] (+[Y]%)
Stop-Loss Price: $[X] (-[Z]%)
Risk/Reward: [Y/Z]:1
--- STOPS ---
Price Stop: $[X] -- exit 100%
Time Stop: [Date] -- reduce 50% if catalyst has not occurred
Thesis Stop: [Specific falsification event] -- exit 100%
--- RISK CHECKS ---
Post-Trade Gross: [X]% [PASS/FAIL vs. limit]
Post-Trade Net: [X]% [PASS/FAIL vs. band]
Sector Gross: [X]% in [Sector] [PASS/FAIL vs. limit]
Position Liquidity: [X] days to exit at 15% of ADV [PASS/FAIL]
Correlation w/ Book: [X] [PASS/WARN/FAIL]
============================================================
Success metric: A portfolio manager reading the trade ticket and supporting artifacts should be able to execute the trade, monitor it against the defined stops, and know exactly when to exit -- without any additional conversation.
Escalation triggers:
"Cheap on multiples" as the entire thesis: A stock trading at 8x earnings when peers trade at 12x is not a long thesis. Ask: "Why is it cheap? What will CHANGE the multiple?" Without a catalyst for re-rating, cheap stocks stay cheap (value traps). --> Require a catalyst before proceeding.
Consensus variant perception: "I think AI will be big" is not a variant view -- so does the entire market. A variant perception must be specific and contrarian: "I think Company X's AI revenue will be $2B by 2027 vs. consensus of $800M because of their proprietary data moat in healthcare." --> Test differentiation by checking sell-side estimates and 13F positioning.
Shorting a strong company because it is "expensive": Expensive stocks can get more expensive. Shorting NVDA at 40x forward earnings in 2023 would have been catastrophic. Shorts require a NEGATIVE catalyst -- deteriorating fundamentals, not just high multiples. --> Require evidence of fundamental deterioration.
Full Kelly sizing: Academic Kelly maximizes long-term geometric growth, but the path is brutal. A full Kelly bettor has a ~50% probability of a 50% drawdown at some point. Real funds cannot tolerate this. --> Always use fractional Kelly (1/4 to 1/2).
Ignoring borrow cost on shorts: A short with 8% borrow cost needs to decline 8%+ per year just to break even. Many "obvious" shorts are negative expected value after carry. --> Always compute net expected return: gross return minus borrow cost minus dividends minus financing.
Correlation blindness: Twenty "unique" long ideas that are all high-beta growth stocks are not a diversified portfolio -- they are a leveraged bet on the growth factor. When growth rotates to value, the entire book draws down together. --> Run factor decomposition and correlation matrix before finalizing the book.
Anchoring to entry price: "I'll sell when I get back to even" is not risk management. The market does not care about your entry price. The only question is: "Given what I know today, would I enter this position at the current price with the current thesis?" If no, exit. --> Re-evaluate every position as if you had zero position and were deciding fresh.
Not pressing winners: Cutting winners early and letting losers run is the #1 behavioral error in L/S portfolios. If a long has hit 50% of target and the thesis is strengthening with new catalysts, do NOT trim just because "it has run up." Size based on forward risk/reward from current price, not distance from entry. --> Re-run Kelly at current price with updated parameters.
Short squeeze denial: When a short position moves against you by 20%+ on high volume with no fundamental news, the most likely explanation is a squeeze or forced covering. Hoping it reverses is not a strategy. --> If the adverse move exceeds your price stop, exit immediately. Reassess and re-enter later if the thesis survives.
Overtrading: Every trade has friction (commissions, spread, market impact, taxes). A portfolio turning over 400%+ annually needs to generate significantly more alpha just to cover costs. --> Target 150-250% annual turnover. If you are trading more, you are likely reacting to noise, not signal.
/investment-memo/merger-arb (dedicated event-driven workflow)/credit/pitch-deck (Mode 3: Fund Pitch)/quant/long-short/derivativesWhat SKILL.md sets; muted values are Claude Code's defaults
/alpha-stack:long-shortfrom alpha-stack
alpha-stack@fin-skills is listed by howard-lynn-ye/fin-rsi — review the source before installing
npx claudepluginhub howard-lynn-ye/fin-rsi --plugin alpha-stack47 skills in this plugin
/accountingAccounting analysis — journal entries, chart of accounts, accruals, and closing process.
Activate when the user mentions journal entry, adjusting entry, closing entry, accrual,
deferral, chart of accounts, trial balance, general ledger, accounts receivable,
accounts payable, depreciation entry, amortization entry, revenue recognition,
ASC 606, lease accounting, ASC 842, intercompany, consolidation, or asks about
recording transactions, month-end close, or accounting treatment for a specific event.
/attributionPerformance attribution analysis. Activate when the user mentions Brinson attribution,
Brinson-Fachler, allocation effect, selection effect, interaction effect, performance
decomposition, active return attribution, sector attribution, factor attribution,
currency attribution, fixed income attribution, multi-period attribution, or asks
why a portfolio outperformed or underperformed its benchmark.
/Other plugins' skills for the same job