Contact

OPT_TIME_SWITCH Function (Gnumeric)

Financial Intermediate Gnumeric

Value discrete time-switch payoffs in Gnumeric with OPT_TIME_SWITCH, payment scaling, observation dates and existing qualifying periods.

Verification status: Retained 1.12.57 ssconvert evidence independently checked after rollback; no GUI or fresh native execution claimed. How formula examples are checked

Exact syntax

=OPT_TIME_SWITCH(flag,spot,strike,a,time,m,dt,rate,carry,volatility)

OPT_TIME_SWITCH values a discrete condition-based payment stream paid at maturity. A call counts observations above strike; a put counts observations below strike. The payment associated with a qualifying period is a times dt, not simply a.

All ten arguments are required. Flag is “c” or “p”. Spot and strike are positive prices. A is the payment-rate multiplier; time is years until maturity; m is the number of past qualifying time units; dt is the positive observation step as a fraction of a year. Rate is the annual continuously compounded discount rate, carry is net annual cost of holding the asset, and volatility is annualized standard deviation. Use a nonnegative integer m for a count.

Observation grid and example

The callback sets n to the integer conversion of time/dt and sums future observations i=1 through n-1. It excludes the maturity endpoint. In the recorded example time=1 and dt=0.25 therefore use observations at 0.25, 0.5 and 0.75 years, not four quarterly dates. With a=10 each qualifying observation contributes 2.5 at maturity.

The call result is 3.861531050939 and the put 3.272689632817. Each was independently calculated from normal probabilities for the lognormal price threshold at those three dates, discounted by exp(-0.05). Their sum is 7.134220683755, equal to three certain payments of 2.5 discounted for one year. This complement check is valid for the continuous-price model, where equality at the threshold has zero probability.

Advanced use: reconcile past observations

Changing m from 0 to 2 raises the call value to 8.617678173442. The increase is exactly 2*10*0.25*EXP(-0.05) to rounding, about 4.756147122504. Past periods enter as a known count, not an estimated probability. Maintain that count separately from the future grid so that observations are not counted twice. An actual contract that includes a maturity observation needs a separate cash-flow model; changing the label of this function does not change its endpoint convention.

Errors and troubleshooting

An invalid flag returns #NUM!. Choose positive dt and time, and a modest bounded number of steps. Very small dt creates a large loop; zero dt and impractically large step counts were not executed. Nonintegral time/dt is truncated in the source and can omit a residual interval, so prefer an explicit integral schedule and verify the dates. Zero volatility and nonpositive spot or strike are outside the tested domain. A wrong result often comes from treating a as the payment per step instead of remembering the multiplication by dt.

Recorded formulas and results

  • =OPT_TIME_SWITCH("c",100,100,10,1,0,0.25,0.05,0.05,0.2) → 3.8615310509386886
  • =OPT_TIME_SWITCH("p",100,100,10,1,0,0.25,0.05,0.05,0.2) → 3.2726896328166672
  • =OPT_TIME_SWITCH("c",100,100,10,1,2,0.25,0.05,0.05,0.2) → 8.61767817344226
  • =OPT_TIME_SWITCH("bad",100,100,10,1,0,0.25,0.05,0.05,0.2) → #NUM!

Version, portability and verification scope

The introduction release is not established by the retained evidence. The retained implementation and bounded native evidence are Gnumeric 1.12.57. No retirement or last functioning release is established. Function availability, argument defaults and numerical algorithms can differ in other spreadsheets; test exported workbooks in the receiving application rather than treating the name as a compatibility guarantee. These are synthetic calculation examples, not investment recommendations.

Native ssconvert recalculated the saved workbook on 17 October 2026 at 02:45 UTC. Input formulas, saved output cells and evidence-file hashes were rechecked after recovery. The 4 records above are engine evidence, not GUI screenshots. No new execution, untested extreme case or newer-version execution is claimed.

Official sources