lyndonkl/claude/option-valuation-toolkit

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Prices options for valuation work — Black-Scholes with a cost-of-delay yield, binomial trees that allow early exercise, dilution-adjusted employee options for the equity bridge, equity in a heavily levered firm valued as a call on firm value, and implied volatility. Use when employee options or warrants must be subtracted before computing value per share, when a distressed or negative-earnings company's equity still trades above zero, when testing whether a patent, licence, undeveloped reserve or expansion right is a real option that deserves a premium, or when early exercise makes a European formula wrong. Triggers on option pricing, Black-Scholes, binomial tree, real options, option to delay, patent as an option, equity as a call option, distress and default probability, employee stock options, dilution, warrants, implied volatility, put-call parity.

Install

npx vskill@latest install lyndonkl/claude/option-valuation-toolkit

SKILL.md

Option valuation toolkit

Four option problems recur in valuation work.

Employee options are a claim on equity. They have to be priced and subtracted before you divide by shares. The equity of a deeply indebted firm behaves like a call option on the firm's assets, which is why a stock keeps trading after a discounted cash flow model says the company is worth nothing. A patent, a licence or an undeveloped reserve can carry value that a static DCF misses. And some options get exercised early, which a European formula cannot see.

The arithmetic here is exact. The inputs usually are not. When the underlying asset does not trade, no replicating portfolio can be built and no arbitrage disciplines the answer. Treat the output as an estimate with a wide band around it, and never quote it to the dollar.

The script

resources/options.py — pure standard library, no installation needed. Every subcommand reads JSON on stdin (or --in FILE) and prints JSON.

bash
python3 resources/options.py <subcommand> --example # show the input shape
python3 resources/options.py <subcommand> --in payload.json
python3 resources/options.py selftest # verify the engine
SubcommandTurns thisInto this
black-scholesspot, strike, life, volatility, riskfree rate, dividend yieldEuropean call or put value, d1, d2, N(d1), N(d2), intrinsic and time value
binomialthe same inputs plus steps and americantree value, up and down factors, risk-neutral probability
employee-optionsequity value, share count, option termstotal option claim, value per option, value per share
equity-as-optionfirm value, face value of debt, debt maturityequity value, implied debt value, probability of default
implied-volan observed option pricethe volatility consistent with that price

selftest runs 18 checks and should report 18 passed. It holds put-call parity to nine decimals. It confirms that a 500-step binomial tree converges to the Black-Scholes value. It checks that an American put is never worth less than its European twin. It also verifies that the dilution loop converges and that implied volatility inverts the pricer. Run it after touching anything.

Before you price a real option, run the three tests

Real options are everywhere. Most of them are worth nothing. The premium is admitted only when three tests pass in order, and the burden of proof sits with whoever wants the premium.

TestQuestionFails when
1. Is there an option?Can you name a specific underlying asset whose value moves unpredictably, and a payoff contingent on a stated event inside a finite window?You cannot write down both. There is no option, so add nothing.
2. Is it worth anything?Does something stop competitors from exploiting the same contingency?The product market is competitive. Rivals compete the excess return away, and the option is worth zero no matter how volatile the underlying.
3. Can a model price it?Is the underlying traded, is the option itself traded, and is the exercise cost knowable?Usually at least one fails for a real asset. Trust the number roughly in proportion to how many hold.

Test 2 is the one that kills most claims. Exclusivity is a spectrum, and the value you may claim scales with it. Ranked from weakest barrier to strongest: first-mover advantage, technological edge, brand name, telecom licences, pharmaceutical patents. Multiply the full option value by an exclusivity factor between 0 and 1 rather than pretending the barrier is absolute. A patent stops copies; it does not stop a rival developing a different drug for the same disease.

Opportunities are not options. An opportunity is something you might do. An option is a right that others do not have, with a defined underlying, a defined strike and a defined expiry. "Real options" belongs in the same family as "synergy" and "strategic considerations" — language reached for when a price has already been decided and needs justifying. If test 1 or test 2 fails, add nothing to the DCF value. If test 3 fails alone, use a decision tree instead and treat any option number as an order of magnitude.

Whatever you do, guard against double counting. If you value a patent separately as an option, remove the growth that same patent would produce from the DCF of the existing business.

Mapping a real option onto the script

There is no separate real-option subcommand. You map the business facts onto black-scholes or binomial inputs yourself.

Real optionTypespotstriketime_to_expirydividend_yield
Option to delaycallPV of project cash flows if taken nowinitial investmentremaining exclusive rightscost of delay
Product patentcallPV of cash flows from launching nowPV of development costpatent lifecost of delay
Undeveloped reservecallvalue of the developed reservedevelopment costrelinquishment periodnet production revenue as a share of value
Option to expandcallPV of cash flows from the expansioncost of entrywindow before the right lapsescost of delay
Option to abandonputPV of remaining project cash flowssalvage or abandonment valueremaining life of the escape clause—

The dividend_yield field is the single most consequential input in real-option work and the one most often left at zero. It represents value leaking out of the underlying while you wait. For a right that expires in n years, 1/n is the working default: each year of delay is one year of cash flows you will never collect. Real-option lives run five to seventeen years, so omitting this yield overstates the answer badly.

Match the riskfree rate to the option's life. A seventeen-year option takes a seventeen-year government bond rate, not a short rate.

Worked example: a pharmaceutical patent

Biogen's patent on Avonex. The underlying is the drug: the present value of cash flows from launching now is $3,422m, and development would cost $2,875m in present-value dollars. The patent runs 17 years. Biotech industry variance of log value is 0.224, so volatility is sqrt(0.224) = 0.4733. The 17-year bond rate is 6.7%. Cost of delay is 1/17 = 5.89%.

bash
echo '{"spot": 3422, "strike": 2875, "time_to_expiry": 17, "volatility": 0.47328637,
"riskfree_rate": 0.067, "dividend_yield": 0.0589, "option_type": "call"}' \
| python3 resources/options.py black-scholes

The result is $905m, against an intrinsic value of $547m. The published figure is $907m; the difference comes from reading N(d) off a table rounded to four decimals. Waiting is worth roughly $358m more than developing today.

Optimal exercise falls out of repeating the calculation. Hold while the option value exceeds spot − strike; exercise once it drops below. Re-run with time_to_expiry set to 16, 15, 14 and so on, and compare each result with the constant $547m. For Avonex the lines cross at about eight years of remaining patent life. Past that point the cost of delay dominates and holding destroys value.

When a binomial tree beats Black-Scholes

Black-Scholes is the continuous-time limit of the binomial model. Both give the same answer when their assumptions hold, which the selftest confirms to within a fifth of a cent at 500 steps. Use the tree when one of those assumptions breaks.

SituationModel
European exercise, continuous price process, no jumpsblack-scholes
Early exercise is genuinely on the tablebinomial with "american": true
Underlying value jumps rather than driftingbinomial, or a jump model outside this toolkit
An American put, or any option on an asset paying out cashbinomial

Early exercise is the rule for real options rather than the exception, because a firm takes a project the moment waiting stops paying. A European formula cannot represent that choice and will understate the option.

bash
echo '{"spot": 100, "strike": 100, "time_to_expiry": 1, "volatility": 0.3,
"riskfree_rate": 0.05, "steps": 200, "option_type": "put", "american": true}' \
| python3 resources/options.py binomial

That returns 9.863. The same put priced European is 9.354, so the right to exercise early is worth about half a point, roughly 5% of the option. For a call on an asset with no payout the premium is zero, since exercising early only surrenders time value.

Choose steps by watching the answer settle. The value oscillates at low step counts and converges from there: 9.969 at 25 steps, 9.856 at 100, 9.863 at 200, 9.867 at 500. A few hundred steps is enough for most work, and the cost grows with the square of the count. If the script refuses to run because the risk-neutral probability falls outside [0, 1], the volatility is too low relative to the rates for the step size — raise steps.

The tree is also the bridge to decision-tree analysis. A binomial tree and a capital budgeting decision tree have the same shape. They differ in the discount rate, not the logic. Where the pricing test fails but the option is real, build the decision tree instead. Do not build both and add them together.

Employee options

Outstanding employee options reduce value per share. The reason is not dilution as such. Options are exercised only when they are in the money, so the firm issues shares below the prevailing price, and existing shareholders pay the difference. Options also matter before exercise, because today's value must already carry the probability and cost of exercise later.

Three methods are in circulation. Two are biased in a predictable direction.

MethodFormulaXYZ resultBias
Diluted share countequity / (shares + option shares)$9.09Too low. Ignores the cash exercise brings in.
Treasury stock(equity + strike proceeds) / diluted shares$10.00Too high. Ignores the options' time premium.
Option value drag(equity − option value) / actual shares$9.46Consistent. Sits between the other two.

The treasury-stock shortcut is what accounting uses for diluted earnings per share, which is why it keeps appearing in valuations. Look at the XYZ column: a firm grants 10 million at-the-money options on a $10 stock and the treasury method says value per share is unchanged at $10.00. That cannot be right. Options at the money have real time value, and someone paid for them. The method also mishandles out-of-the-money options in both directions. Include them and the strike proceeds get added while the value does not, which perversely raises value per share. Exclude them and you have declared time value to be zero.

So value the options and subtract them as a separate claim. That is what employee-options does.

Why the calculation has to iterate

Exercise creates new shares. New shares lower the value of every share. A lower share value lowers the option's own payoff. So the underlying that belongs in the pricer is not the share value today but a diluted one:

adjusted spot = (equity value + total option value) / (shares + options)

The total option value appears on both sides. There is no closed-form solution, so the script starts from an undiluted guess and iterates to a fixed point. Convergence takes under a dozen passes and the output reports iterations and converged.

bash
echo '{"equity_value": 1000, "shares_outstanding": 100, "options_outstanding": 10,
"average_strike_price": 10, "average_time_to_expiry": 10,
"volatility": 0.40, "riskfree_rate": 0.04}' \
| python3 resources/options.py employee-options

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
162
Repository forks
24
7-day trend score
25

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/lyndonkl/claude/option-valuation-toolkit/badge)](https://verified-skill.com/skills/lyndonkl/claude/option-valuation-toolkit)

Something wrong with this skill or its page? Tell us.