Skip to content
TotalFinance

Explore scenarios

Revalue an option position before expiry across underlying prices, volatility shocks and the passage of time.

Run it

Live, in your browser. Nothing leaves this page.

Local
$100.00

USD

25%

decimal · stays above 0.10 so every shock is valid

7 days

calendar days · integer

4%

decimal

Change any input; everything updates.

Scenario cells
125
Lowest grid P&L
-$309.16
USD · not maximum loss
Highest grid P&L
$686.24
USD · not maximum profit
Days forward
7
Mark-to-market P&L by underlying price and volatility shockGreen cells make money and red cells lose it, relative to the model premiums paid today. Rows shift implied volatility; the valuation date advances by the chosen days.
-10.00%-5.00%0.00%5.00%10.00%$75.00$82.50$90.00$97.50$105.00$112.50$120.00$127.50$135.00Scenario underlying price · USDRows: Volatility shock
Show data (5 rows)
Volatility shock \ Scenario underlying price · USD$75.00$77.50$80.00$82.50$85.00$87.50$90.00$92.50$95.00$97.50$100.00$102.50$105.00$107.50$110.00$112.50$115.00$117.50$120.00$122.50$125.00$127.50$130.00$132.50$135.00
-10.00%-$309.16-$309.16-$309.16-$309.15-$309.04-$308.31-$304.86-$292.91-$261.47-$196.93-$90.81$52.23$213.31$367.08$492.82$581.50$635.71$664.54$677.95$683.42$685.38$686.01$686.19$686.23$686.24
-5.00%-$309.16-$309.15-$309.06-$308.64-$307.07-$302.26-$290.08-$264.26-$217.59-$144.77-$45.44$74.25$202.89$327.20$435.96$522.69$586.03$628.64$655.13$670.44$678.67$682.82$684.78$685.65$686.02
0.00%-$309.08-$308.83-$307.99-$305.65-$299.99-$288.09-$266.02-$229.57-$175.43-$102.53-$12.87$88.54$194.63$297.88$391.80$472.01$536.60$585.81$621.42$645.94$662.09$672.26$678.42$682.00$684.01
5.00%-$308.47-$307.22-$304.29-$298.21-$286.87-$267.65-$237.86-$195.35-$139.09-$69.70$10.52$97.85$187.76$275.63$357.45$430.27$492.41$543.39$583.69$614.47$637.22$653.54$664.91$672.62$677.73
10.00%-$306.45-$303.15-$296.95-$286.29-$269.35-$244.29-$209.62-$164.51-$109.05-$44.35$27.55$103.95$181.78$258.07$330.17$396.05$454.38$504.53$546.48$580.66$607.86$629.02$645.12$657.14$665.95
P&L curves for three volatility shocks
  • −5 volatility points
  • No volatility shock
  • +5 volatility points
Starting price 100Break-even
Show data (25 rows)
Scenario underlying price · USD−5 volatility pointsNo volatility shock+5 volatility points
$75.00-$309.16-$309.08-$308.47
$77.50-$309.15-$308.83-$307.22
$80.00-$309.06-$307.99-$304.29
$82.50-$308.64-$305.65-$298.21
$85.00-$307.07-$299.99-$286.87
$87.50-$302.26-$288.09-$267.65
$90.00-$290.08-$266.02-$237.86
$92.50-$264.26-$229.57-$195.35
$95.00-$217.59-$175.43-$139.09
$97.50-$144.77-$102.53-$69.70
$100.00-$45.44-$12.87$10.52
$102.50$74.25$88.54$97.85
$105.00$202.89$194.63$187.76
$107.50$327.20$297.88$275.63
$110.00$435.96$391.80$357.45
$112.50$522.69$472.01$430.27
$115.00$586.03$536.60$492.41
$117.50$628.64$585.81$543.39
$120.00$655.13$621.42$583.69
$122.50$670.44$645.94$614.47
$125.00$678.67$662.09$637.22
$127.50$682.82$672.26$653.54
$130.00$684.78$678.42$664.91
$132.50$685.65$682.00$672.62
$135.00$686.02$684.01$677.73

Assumptions & conventions

What the calculation assumed, echoed by the library rather than hidden.

conventionsVersion
0.0.1
marketSource
construction

Diagnostics & warnings

No warnings. Engine, method and convergence details:

engine
black-scholes-merton
method
closed-form
converged
true

Use it in your project

Returns scenario rows in value, plus assumptions and diagnostics. Each row names its underlying price, volatility shock and P&L. These three price scenarios use the same market and time advance as the chart, with no volatility shock.

First call
import { legs, strategy } from '@insiderfinance/totalfinance/strategy';

const market = {
  "spot": 100,
  "volatility": 0.25,
  "riskFreeRate": 0.04,
  "asOf": "2026-01-02T21:00:00Z",
  "expiry": "2026-02-20T21:00:00Z"
};
const position = strategy([
  legs.call({ strike: 100, quantity: 1 }),
  legs.call({ strike: 110, quantity: -1 }),
], { premiums: 'model', market, multiplier: 100 });
const underlyingPrices = [90, 100, 110];
const result = position.scenarioTable({
  prices: underlyingPrices,
  volatilityShocks: [0],
  daysForward: [7],
});
console.log(result);
Output of this example
{
  "value": [
    {
      "underlyingPrice": 90,
      "volatilityShock": 0,
      "daysForward": 7,
      "pnl": -266.0227750248115,
      "delta": 11.434003363616915,
      "gamma": 2.313645532320745,
      "theta": -1.712543514838866,
      "vega": 5.39111102805149
    },
    {
      "underlyingPrice": 100,
      "volatilityShock": 0,
      "daysForward": 7,
      "pnl": -12.865453876559855,
      "delta": 38.63467859251617,
      "gamma": 1.9066587050305426,
      "theta": -2.023336198040153,
      "vega": 5.4849086035125225
    },
    {
      "underlyingPrice": 110,
      "volatilityShock": 0,
      "daysForward": 7,
      "pnl": 391.7953512007746,
      "delta": 35.03651104419351,
      "gamma": -2.2261780297847213,
      "theta": 1.9606882151464209,
      "vega": -7.748929279017776
    }
  ],
  "assumptions": {
    "conventionsVersion": "0.0.1",
    "marketSource": "construction"
  },
  "diagnostics": {
    "engine": "black-scholes-merton",
    "method": "closed-form",
    "converged": true,
    "warnings": []
  }
}
Reproduce this entire calculator
Full result object

Both examples use the inputs of the last successful calculation. Displayed metrics are rounded; copied programs keep exact values. Every copy on this page is type-checked and executed against the packed package in CI.

Ask your AI agent

With the TotalFinance MCP server connected, your agent runs this calculation with the totalfinance_scenario_run tool (start the server with --profile scenarios). The prompt below uses your current inputs.

Prompt

Use the TotalFinance MCP tool totalfinance_scenario_run to revalue a 100/110 bull call spread across a grid of underlying-price and volatility shocks: starting price 100, volatility 25%, valued 7 calendar days forward, risk-free rate 4%. Report the worst and best cells of the P&L grid.

Connect Claude, Cursor, VS Code, Codex or ChatGPT

What this calculates

position.scenarioTable() reprices every leg with a model for each combination of underlying price, volatility shock and days forward. The result is mark-to-market P&L relative to the model premiums paid today, not an expiration payoff and not a forecast.

Reading the heatmap

Each cell is one scenario. Green cells make money and red cells lose it; the numbers are the P&L in USD. Moving down the rows raises implied volatility; advancing the valuation date in the panel shows time decay working through the whole grid.

Compare with expiration

The strategy analyzer shows the same kind of position at expiration. The difference between the two pictures is the time value still in the options.

Edit this page on GitHub ↗Every code block on this site is executed in CI against the library.