Skip to content

PayoffChart

Stable

Shows the profit or loss at the end for a position as the price moves, with break-even prices and best and worst outcomes labelled.

Also known as profit loss chart, options payoff

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

A long call

Long call, strike 100

Profit or loss at expiry, dollars per share

You lose at most 5. You break even at 105. Above that the profit keeps growing.

You pay 5 for the right to buy at 100. The most you lose is what you paid. The profit has no top. The dashed line is today's price.

When to use it

Lets someone see what could happen to a position before they take it, and where it starts to make or lose money.

Made of: Side scale for profit and loss · Zero line · Profit and loss line · Tinted profit area · Hatched loss area · Break-even marks and labels · Max profit and max loss labels · Current price marker · Bottom price labels

Use it for

  • An option or a spread: a long call, a bull call spread, an iron condor.
  • A share position, alone or combined with options.
  • Any result that depends on one price, when you already have the points.

Not for

Do and avoid

Buy one call at 100

Profit or loss at expiry, in rupees

Do. The premium is included, so the break-even point is right.

Buy one call at 100

Profit or loss at expiry, in rupees

Avoid. With no premium, the chart shows the wrong break-even point.

Do

  • Say "at expiry" and the unit in the ChartFrame subtitle.
  • State the break-even prices and the most you can make or lose in the summary.
  • Use payoffAtExpiry(legs, spots) when your app needs the same numbers elsewhere.
  • Pass the current price as spot so people see where they are now.

Avoid

  • Don't use it to promise a result. It shows the end value only, not the chance of reaching it.
  • Don't leave out the premium on option legs. The line would show the wrong break-even.
  • Don't hide the table view. Some people need the numbers.

On a phone

  • The chart measures its container and redraws at that width, so it fills a phone screen.
  • Touch or drag across the chart to read the profit or loss at a price. Vertical swipes still scroll the page, and the tooltip stays until you tap elsewhere.
  • The tooltip flips to the left of your finger past the middle of the chart.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started