Compute negative-price probability after n steps

Read the full interview experience this question came from →

Quick Overview

This question evaluates understanding of discrete probability distributions and random-walk processes within Statistics & Math, testing skills in binomial modeling and numeric computation for probabilistic outcomes.

Compute negative-price probability after n steps

Company: Optiver

Role: Software Engineer

Category: Statistics & Math

Difficulty: medium

Interview Round: Online Assessment

A price starts at value s. Each day for n independent days, it moves to s + x with probability p and to s − x with probability 1 − p (x > 0). After n days, what is the probability that the final price is strictly below 0? Derive a closed-form expression (in terms of a binomial tail or equivalent) and describe an algorithm to compute it accurately for large n.

Overview: This question evaluates understanding of discrete probability distributions and random-walk processes within Statistics & Math, testing skills in binomial modeling and numeric computation for probabilistic outcomes.

Read the full Optiver Software Engineer interview experience this question came from

Optiver logo
Optiver
Aug 13, 2025
mediumSoftware EngineerOnline AssessmentStatistics & Math
7
0

Random-Walk Price Crossing Probability

Setup

  • Initial price: S₀ = s (real number).
  • Step size: x > 0.
  • Number of days: n (integer ≥ 0).
  • Each day t = 1, 2, ..., n, the price moves independently:
    • Up by +x with probability p.
    • Down by −x with probability 1 − p. So S_{t+1} = S_t + X_t, where X_t ∈ {+x, −x}.

Task

After n days, what is the probability that the final price S_n is strictly below 0? Derive:

  1. A closed-form expression (as a binomial CDF/tail or equivalent).
  2. An algorithm to compute it accurately for large n.