Calculate with P/L graph
POST/api/v1/calculate
Everything /pop returns, plus the profit/loss grid the calculator charts: P/L by stock price and date up to the earliest expiry.
Request body
symbolstringoptional- Ticker, e.g.
AAPL. Needed to fill in any price, IV or stock price you leave out. legsarrayrequired- Up to 8 option legs and 1 stock leg.
Each leg is an object:
type:call,putorstockaction:buyorsellquantity: contracts (100 shares each), or shares for a stock leg. Default 1, up to 1,000,000.strikeandexpiry(YYYY-MM-DD): required for calls and putsprice: per share. Optional: left out, the current market price is used.iv: implied volatility as a whole percent (e.g.28.5). Optional: worked out from the price.
underlyingPricenumberoptional- Stock price to use. Default: the current price.
iv30numberoptional- 30-day implied volatility, whole percent, used for the probability. Default: the stock's IV30.
priceMin, priceMaxnumberoptional- Price range for the grid. Default: automatic.
ivChangenumberoptional- Shift every implied volatility by this percent, e.g.
-10.
Response
The fields in data. See requests and responses for the envelope and errors.
probabilityOfProfitnumber- Chance (0 to 1) of making at least $0.01 at the earliest expiry.
probabilityOf50PctMaxProfitnumber- Chance of reaching half the max profit. Also
probabilityOf75PctMaxProfitandprobabilityOfMaxProfit. breakevensarray- Stock prices where the position breaks even at expiry, each with
profitWhen(above,beloworflat). maxProfit, maxLossnumber- Dollars for the whole position.
maxProfitUnlimitedandmaxLossUnlimitedsay when there is no limit. netCostnumber- What the position costs to open, in dollars. Negative for a credit.
collateralnumber|null- Estimated margin for naked short options, in dollars.
underlyingPrice, volatilityUsednumber- The stock price and the IV the probability used.
evaluatedAtstring- The date the probability is for: the earliest expiry.
legsarray- Your legs with the prices and IVs used.
calculatorUrlstring|null- Opens the same position in the calculator, at the same prices. Null when the calculator can't open it from a link.
graph.pricesarray- Stock prices across the grid (columns).
graph.datesarray- Dates (rows):
date,daysFromTodayandatExpiry. The last is the earliest expiry. graph.profitLossarrayprofitLoss[d][p]: dollars if closed atprices[p]ondates[d].graph.expiryobject- The expiry row:
dateandprofitLoss. graph.today, graph.entryCoststring, number- Today in New York, and what the position cost to open.