Menu

1 / 2

Expected value calculation for stock positions — a Claude Code skill that does the math

DEV Community·tellmefrankie·6 months ago
#alvkuMKS
Reading 0:00
15s threshold

Before entering any position, I run three scenarios: bull case, base case, bear case. Multiply each by its probability. Sum the results. If the EV is negative, don't enter.

This sounds simple. In practice, when you're looking at a live chart with a position about to move, you skip it.

I built a Claude Code skill to make the calculation automatic and honest.

What the EV Calculator does

You give it a position description in plain language. It generates three scenarios with probability-weighted outcomes and returns a go/no-go with the expected value calculation shown.

Input:

NVDA current price $120 Bull case: AI infrastructure spend accelerates, price $145, probability 35% Base case: Consolidation, price $118, probability 45% Bear case: Macro deterioration, positions rotate out, price $95, probability 20% Entry: $120, position size: 5% of portfolio

Enter fullscreen mode

Exit fullscreen mode

Output:

Expected Value Analysis — NVDA

Bull: $145 × 0.35 = $50.75 Base: $118 × 0.45 = $53.10 Bear: $95 × 0.20 =…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.