Contact

OPT_PROB_INMONEY in LibreOffice: Terminal Price Probabilities

Financial Intermediate LibreOffice Calc LibreOffice 4.0

Calculate LibreOffice OPT_PROB_INMONEY for terminal price ranges. Follow eight checked examples, strikes and the distinction from barrier-hit probability.

Verification status: Eight ordinary terminal-range expressions recalculated through documented ODF identities in LibreOfficeDev 26.8.0.0.alpha0, headlessly. Exact identities, values and controls match independent model checks. Numerical helper unavailable; 26.8.1.1 source only, with no stable or GUI test. How formula examples are checked

Quick answer: =OPT_PROB_INMONEY(30;0.2;0.1;1;0;50) returned 0.984384937023 in the checked development build. It matches the independent diffusion-model calculation and the rounded official Help example.

Availability and version history

  • Introduced: LibreOffice 4.0, explicitly stated in function-specific Help.
  • Supported in: 26.8 Help and 26.8.1.1 registration; no retirement is established.
  • Scope: Desktop Calc’s Pricing add-in. English names are source-mapped to documented ODF service names.
  • Checked: October 14, 2026. Eight ordinary terminal-range expressions recalculated through documented ODF identities in LibreOfficeDev 26.8.0.0.alpha0, headlessly. Stable releases, GUI entry and 26.8.1.1 execution remain untested.

What OPT_PROB_INMONEY measures

OPT_PROB_INMONEY asks where the modeled asset price finishes at maturity. With no strike, it returns the probability of finishing between the two active price limits. With a strike and call selection, the checked examples restrict the lower end to the strike; a put selection restricts the upper end. The earlier path is not part of this terminal event.

A price can cross a barrier during the interval and later finish back inside the terminal range. Consequently this function must not be labelled the probability of avoiding a knock-out throughout the option’s life. Its result is also not an option price or a probability of net profit after premiums and costs. Function-specific Help.

Syntax and arguments

OPT_PROB_INMONEY(Spot; Volatility; Drift; Maturity; LowerBarrier; UpperBarrier [; Strike [; PutCall]])

The first six arguments are required. Spot is a positive initial price; Volatility is a positive annual decimal volatility; Drift is the annual decimal price drift; Maturity is a time in years. For example, 0.2 means 20% volatility and 0.5 means half a year, not a calendar date serial.

LowerBarrier and UpperBarrier are price levels. The checked formulas use zero to disable a limit. Strike is optional. If Strike is supplied but PutCall is omitted, the inspected parser defaults to a call, and that seven-argument case was executed. Use the documented lowercase strings "c" and "p". The default absent strike is represented internally by a sentinel; it is not a recommendation to supply negative strikes.

For clarity, the examples either omit both optional arguments or supply a nonnegative strike with an unambiguous choice. Barrier/strike intersections outside the ordinary ordered cases below were not tested. Complete wrapper.

Eight ordinary model examples

Each expression below was evaluated using its documented qualified ODF service identity. The table shows the corresponding English function spelling. The independent values were computed to 110 decimal digits and cross-checked by numerical density integration; both columns are displayed to twelve decimal places. All inputs are illustrative model parameters.

Formula Independent model reference LibreOfficeDev result
=OPT_PROB_INMONEY(30;0.2;0.1;1;0;50) 0.984384937023 0.984384937023
=OPT_PROB_INMONEY(70;0.3;0.15;1;60;0;80;"p") 0.344045040212 0.344045040212
=OPT_PROB_INMONEY(100;0.2;0.05;1;80;120) 0.674045861757 0.674045861757
=OPT_PROB_INMONEY(100;0.2;0.05;1;0;110;100;"c") 0.187613899351 0.187613899351
=OPT_PROB_INMONEY(100;0.2;0.05;1;90;0;100;"p") 0.191116696595 0.191116696595
=OPT_PROB_INMONEY(100;0.2;0.05;1;0;0;100) 0.55961769237 0.55961769237
=OPT_PROB_INMONEY(100;0.2;0.05;0.5;0;100) 0.457764986688 0.457764986688
=OPT_PROB_INMONEY(100;0.2;0.05;2;100;0) 0.583997985714 0.583997985714

Practical worksheet

For a terminal-price range calculation, set A2=100, B2=0.2, C2=0.05, D2=1, E2=80 and F2=120. Enter =OPT_PROB_INMONEY(A2;B2;C2;D2;E2;F2) and format the result as a percentage. The independent and saved direct-argument reference is 67.404586175658%. The cell-based layout is a worksheet recipe; the native cases used the explicit arguments shown in the table.

To ask about a call finishing above 100 but below 110, keep the first four inputs and use lower limit 0, upper limit 110, strike 100 and "c". Its probability is 0.187613899351. For a put finishing above 90 but below strike 100, use lower limit 90, upper limit 0, strike 100 and "p"; the result is 0.191116696595. These are bounded terminal events, not unrestricted call/put payoff calculations.

Advanced interpretation and independent checks

An independent calculation uses the documented geometric price-diffusion model. With initial price S, annual drift μ, volatility σ and positive horizon T, write:

log(final price / S) = (μ − σ² / 2) × T + σ × sqrt(T) × Z

Here Z has a standard normal distribution. For a positive price bound B, define z(B) = [ln(B/S) − (μ−σ²/2)×T] / [σ×sqrt(T)]. The terminal probability between effective lower and upper limits is Φ(z(upper)) − Φ(z(lower)), where Φ is the standard normal cumulative probability. A disabled lower limit contributes zero cumulative probability; a disabled upper limit contributes one.

For S=100, σ=0.2, μ=0.05 and T=1, the independent probabilities below 80, between 80 and 120, and above 120 are 0.102807074403, 0.674045861757 and 0.223147063841. Their unrounded values sum to one. This partition is a useful arithmetic check; it does not say that the middle group never crossed a boundary earlier.

Scaling Spot, all active barriers and Strike by the same positive factor leaves the logarithmic ratios and probability unchanged. Both official examples were independently checked again with all prices multiplied by ten. This is a model identity, not a claim that changing real market prices leaves the estimated volatility or drift unchanged.

Boundaries and model assumptions

The complete wrapper rejects nonpositive Spot or Volatility and negative Maturity, and rejects incompatible optional argument types. It also rejects a nonfinite result returned by the numerical helper. The parser accepts lowercase call/put prefixes; using the documented short codes avoids depending on that permissiveness.

The native checks cover positive horizons and ordinary ordered price limits. A zero horizon is allowed past the wrapper guard but was not executed here. Invalid bounds, already crossed barriers, negative supplied strikes, extreme tails and exact spreadsheet error displays were not tested. The underlying bs::prob_in_money helper was unavailable, so the wrapper alone does not establish all those outcomes.

Keep the event and the assumptions visible in your sheet. A constant-volatility, constant-drift diffusion probability is conditional on that model and its chosen inputs. It is not a calibrated statement about future market outcomes simply because the formula returns a number between zero and one. Inspected wrapper.

Official evidence and checking scope

The saved application is LibreOfficeDev 26.8.0.0.alpha0, build 2c87e51eeaa2b413ff4ae097b2705eea1995d8e5, on Linux. A stale cached control changed to 3 and an uncached control returned 7. Exact ODF identities, numeric result types and all sixteen probability expressions were checked across the two related guides. Each guide’s claim covers its own eight examples. The 26.8.1.1 wrapper and input parsers were source-checked, but the underlying Black-Scholes numerical helper was unavailable. No direct English GUI entry, stable-release execution, market calibration or unlisted boundary case is claimed.