1 Introduction

Dynamic pricing is a strategy in which demand-based knowledge and optimization technology are applied to continuously update the price of a service or goods [2, 28, 37, 51]. The key is to relate the demand of a service or goods to optimal prices via mathematical formulas or functions [6, 10]. However, uncertainty in demand poses a challenge in modeling that relationship.

This challenge is widely addressed by incorporating stochastic terms into functions [7, 11, 19]. Three types of models are proposed to address the problem [7], including a stochastic process [2, 61], a parametric demand function [9, 59], and a nonparametric demand function [11, 56]. For models that assume a stochastic process, the uncertainty can be addressed by a Poisson process [2], or by a heterogeneity in Poisson processes to improve the fitting of empirical demand data [61].

Quantity demanded can be regarded as a stochastic variable as well. Parametric and nonparametric approaches are utilized to quantify the relationship between the variable, demand, and prices. Parametric approach assumes that stochastic demand follows a known distribution function with unknown parameters to address uncertainty. Demand is assumed to follow Gaussian distribution with unknown parameters in Ref. [9]. Maximum likelihood estimation is applied to update the parameters, which established the relationship between demand and optimal price [9]. Gaussian noise can also be assumed to capture uncertain demand [59]. Stochastic optimization methods are deployed to tackle optimal prices [59]. A nonparametric approach does not build on a parametric demand function, thus generally maximizing expected revenue (price multiplies expected demand) in the worst-case scenario [7]. The idea is that demand is an unknown function of price and therefore is revenue. Optimal prices can then be addressed by convex optimization [11, 56].

However, a nonlinear deterministic relationship between two or more variables can also be responsible for increased irregularity and hence uncertainty [16, 46]. For dynamic pricing problems, Rump and Stidham [41] based upon a Poisson process and showed that consumers’ nonlinear adaptations to prices theoretically result in uncertain arrivals. From a parametric model, Lu et al. [28] and Hu et al. [17] demonstrated that demand function with discontinuity can also cause uncertainty.

The two different mechanisms to model uncertainty create a basis for a discussion of the dynamics that a demand process underlies in real-life dynamic pricing settings [55]. An understanding of demand dynamics would show whether the above-mentioned three types of models that only consider stochasticity can capture the nature and the essence of uncertainty. Knowledge of that would allow us to verify a Poisson process or Gaussian noise as an underlying process widely assumed in dynamic pricing problems [6, 10, 11, 37, 51].

Here we hypothesize that uncertainty in empirical demand processes can be described by low-dimensional deterministic dynamics rather than stochasticity. A reconstruction of an attractor, a set of states toward which a deterministic dynamical system evolves [16, 46], is our tool to validate the hypothesize. We also aim to show the differences between low-dimensional attractors and stochastic dynamics, thus improving the modeling of dynamic pricing problems.

A fundamental difference between an attractor and stochastic dynamics remains in recurrence [13, 32], which can be visualized by recurrence plots. A recurrence plot is a plot that shows whether a state at time i recurs at time j. An attractor is well organized in recurrence plots [32]; however, disorganizations occur for stochastic dynamics. According to Takens’ embedding theorem [43, 50], under some parameter set, embedding dimension m and time delay \(\tau \), an attractor can be reconstructed from a time series \(\{x_i\}\) of a deterministic dynamical system via

$$\begin{aligned} \pmb {X}_{i}=(x_{i},\,x_{i+\tau },\,\cdots ,\,x_{i+(m-1)\tau }) \end{aligned}$$
(1)

Here, \(x_i\) is a scalar and an observation of the system, and \(\pmb {X}_{i}\) is a vector and a state of the attractor. A difficulty in the application of recurrence plots and time delay embedding (Eq. 1) is the choice of m and \(\tau \) [30, 52]. Tan et al. [52] reviewed methods to select m or \(\tau \). A standard approach is to firstly select \(\tau \) under which mutual information reaches its first minimum and then select m by false nearest neighbor approach [26]. One can simultaneously select m and \(\tau \) by optimization algorithms as well. The optimization can be defined over a statistics of nearest neighbors [25, 26, 35, 47] or average distance of reconstructed points in phase space [48, 52],

We propose a novel recurrence-based reconstruction approach that optimizes m and \(\tau \) simultaneously. The reconstruction utilizes recurrence plots and the statistics of recurrence quantification measures to define an optimal embedding. We then apply the reconstruction on benchmarking systems with well-known dynamics and empirical data in a real-life dynamic pricing setting where noise and non-stationarity cause additional uncertainty. Our results will provide new insights into the applicability of the widely assumed stochastic demand and into an optimal time delay embedding by recurrence quantification analysis.

2 Methods

Recurrence-based reconstruction requires to find an optimal m and an optimal \(\tau \) (Eq. 1). We apply Pareto optimality on recurrence plots and allow m and \(\tau \) to simultaneously travel through a feasible set. Pareto optimality describes an optimization having at least two objectives [23, 29]. A solution is Pareto optimal if and only if any of its objectives cannot be improved without a deterioration in at least one objective [23, 29]. A Pareto front is a set of Pareto optimal solutions. In an objective space, plotting the optimum of the corresponding objectives leads to a Pareto front.

2.1 Recurrence-based reconstruction

A recurrence plot [32] is a visualization of nonlinear dynamics captured in a binary recurrence matrix by

$$\begin{aligned} R_{i,j}= {\left\{ \begin{array}{ll} 1 &{}\text{ for } ||\pmb {X}_{i}-\pmb {X}_{j}||\le \epsilon \\ 0 &{}\text{ for } ||\pmb {X}_{i}-\pmb {X}_{j}||>\epsilon \end{array}\right. } \end{aligned}$$
(2)

where \(R_{i,j}\) is an entry of the matrix, \(\pmb {X}_{i}\) and \(\pmb {X}_{j}\) are a vectorial state of an attractor. Here, \(i,j\in \big \{1,2,\cdots ,N\big \}\), N is the order of the matrix and represents the length of a time series taken in a recurrence quantification analysis, \(\epsilon \) is a threshold, and \(||\cdot ||\) is a distance measure. Our calculation is based on Euclidean distance \(||\cdot ||_2\).

A recurrence plot depends on three parameters, \(\epsilon \) that defines a recurrence (Eq. 2) and m and \(\tau \) for a reconstruction of a vectorial state \(\pmb {X}_{i}\) from a time series via Eq. (1). Here, we fix the recurrence rate (RR) of recurrence plots, thus allowing \(\epsilon \) to be adaptive to the percentage of neighborhood points (RR=10%). Recurrence rate is a recurrence quantification measure that quantifies the density of recurrence points in a recurrence matrix [32], satisfying \( \text{ RR }=\frac{1}{N^2}\sum _{i,j=1}^{N}R_{i,j}. \) We then let \((m, \tau )\) be adjustable and travel through all feasible choices. Pareto optimality is introduced to find an optimal parameter set \((m^*, \tau ^*)\) under which recurrence plots yield more robust results. The diagonal and the vertical lines in a recurrence matrix together are used as a measure to quantify the robustness.

Among recurrence quantification measures, the determinism \(\text{ DET }\) quantifies the dynamics of a system by diagonal lines. The trapping time \(\text{ TT }\) quantifies the dynamics of a system by vertical lines. Here, \(\text{ DET }\) and \(\text{ TT }\) are calculated via

$$\begin{aligned} \text{ DET }= & {} \frac{\sum _{l=l_{\text {min}}}^{N}lP(l)}{\sum _{l=1}^{N}lP(l)}\end{aligned}$$
(3)
$$\begin{aligned} \text{ TT }= & {} \frac{\sum _{v=v_{\text {min}}}^{N}vP(v)}{\sum _{v=v_{\text {min}}}^{N}P(v)} \end{aligned}$$
(4)

At a given length l, P(l) is a histogram of diagonal lines of which the length is equal to l in a recurrence matrix (Eq. 2). At a given length v, P(v) is a histogram of vertical lines of which the length is equal to v. Also, \(l_{\text {min}}\) and \(v_{\text {min}}\) represent the minimal length for corresponding calculations. A diagonal line of length l is closely related to the divergence of a trajectory segment [32]. During l time steps, the trajectory segment of length l is close under the time evolution. A vertical line of length v implies that the consecutive l points are close [32], thus being trapped in an identical state. Without explicit mentioning, we set \(l_{\text {min}}=2\) and \(v_{\text {min}}=2\).

Fig. 1
figure 1

A workflow of recurrence-based attractor reconstruction. A The reconstruction starts from a univariate time series. B At time t and a given parameter set \((m,\tau )\), we look at the the \(t-\)th window including point sets \(\{x_i\}_{i=t}^{(m-1)\tau +S}\) and get S number of reconstructed states via Eq. (1). C We obtain a recurrence plot of those S states via Eq. (2) and calculate \(\text{ DET}_{t}(m,\tau )\) and \(\text{ TT}_{t}(m,\tau )\) via Eqs. (3) and (4), respectively. D Increasing t leads to a time series \(\{\text{ DET}_{t}\}\) of \(\text{ DET }\) and that \(\{\text{ TT}_{t}\}\) of \(\text{ TT }\). At a given \((m,\tau )\), we calculate the standard deviation SD\(_{\text {DET}}\) of \(\{\text{ DET}_{t}\}\) and that SD\(_{\text {TT}}\) of \(\{\text{ TT}_{t}\}\). E We let \((m, \tau )\) travel through a grid, leading to variations of SD\(_{\text {DET}}\) and SD\(_{\text {TT}}\). F We minimize SD\(_{\text {DET}}\) and SD\(_{\text {TT}}\) together by Pareto optimizations (Eq. 5). G We manually select an optimal parameter set \((m^*, \tau ^*)\) by comparing the maximum of local maxima with the global maximum in the (m, SD\(_{\text {TT}}\))-plane

A recurrence-based reconstruction can be described by the following equation and shown in Fig. 1.

$$\begin{aligned} \mathop {\min _{(m,\tau )}} \quad{} & {} \big (\text{ SD}_{\text {DET}}(m,\tau ), \; \text{ SD}_{\text {TT}}(m,\tau )\big )\nonumber \\{} & {} \text{ SD}_{\text {DET}}(m,\tau )=\sqrt{\frac{1}{N_w-1}\sum _{t=1}^{N_w}(\text{ DET}_{t}-\mu _{\text {DET}})^2}\nonumber \\{} & {} \text{ SD}_{\text {TT}}(m,\tau )=\sqrt{\frac{1}{N_w-1}\sum _{t=1}^{N_w}(\text{ TT}_{t}-\mu _{\text {TT}})^2}\nonumber \\{} & {} \mu _{\text {DET}}=\frac{1}{N_w}\sum _{t=1}^{N_w}\text{ DET}_{t}(m,\tau )\nonumber \\{} & {} \mu _{\text {TT}}=\frac{1}{N_w}\sum _{t=1}^{N_w}\text{ TT}_{t}(m,\tau )\nonumber \\{} & {} \text{ DET}_{t}=\text{ DET}_{t}(m,\tau ),~\text{ TT}_{t}=\text{ TT}_{t}(m,\tau )\nonumber \\{} & {} m\in \big \{2,3,\cdots ,20\big \}, ~\tau \in \big \{2,3,\cdots ,20\big \} \end{aligned}$$
(5)

where \(N_w\) depends on the length of a time series and represents the total number of sliding windows to calculate recurrence plots, and \(\text{ DET}_{t}\) is the determinism that is calculated via Eq. (3) at a given \((m,\tau )\) and a given \(t-\)th window (Fig. 1A–C). Similarly, \(\text{ TT}_{t}\) is the trapping time calculated via Eq. (4) at a given \((m,\tau )\) and a given window. An increase of t leads to a time series with determinism \(\{\text{ DET}_{t}\}\) and that with trapping time \(\{\text{ TT}_{t}\}\) (Fig. 1D). Also, \(\mu _{\text {DET}}\) and SD\(_{\text {DET}}\) correspond to the mean and the standard deviation of \(\{\text{ DET}_{t}\}_{t=1}^{N}\) (Fig. 1D), respectively. Similarly, \(\mu _{\textrm{TT}}\) and SD\(_{\text {TT}}\) correspond to those of \(\{\text{ TT}_{t}\}_{t=1}^{N}\), respectively. All sliding windows have an equal number (S) of states under different m or \(\tau \) (Fig. 1B). We set \(S=500\), which is enough to cover the dynamics of one day in our experiments. However, the value of S should be application dependent and ensure a sliding window covering the dynamics that matters.

Two considerations exist in using both \(\text{ DET }\) and \(\text{ TT }\) for a recurrence-based reconstruction. The measure \(\text{ DET }\) shows the ability to disambiguate between stochastic and deterministic dynamics [31, 58]. The degree of determinism (predictability) of a system can be quantified by \(\text{ DET }\) [32, 33]. A use of \(\text{ DET }\) is thus consistent with our goal to identify deterministic dynamics in a real-life signal. In addition, the measure \(\text{ TT }\) shows the ability to signal a change of dynamics from recurrence plots [36]. How long a system is trapped in a specific state can be determined by \(\text{ TT }\) [32]. We thus utilize \(\text{ TT }\) to identify changes related to dynamical states.

Fig. 2
figure 2

A flowchart to select the Pareto optimal parameter set, \((m^*,\tau ^*)\). Scenario C2 is exemplified. The maximum of local maxima is the global maximum, \((m^*,\tau ^*)\) thus exists and correspond to \((m,\tau )\) where the coincidence ocurrs

2.2 Pareto optimal solution

We define a rule to manually select a unique optimal parameter set \((m^*, \tau ^*)\) from Pareto optimal solutions. The rule is that at \((m^*, \tau ^*)\) recurrence plots should yield a large \(\text{ SD}_{\text {TT}}\) at the cost of a small m. We select \((m^*, \tau ^*)\) by the features of solutions in the Pareto and the reordered fronts. Plotting \(\text{ SD}_{\text {DET}}\) against \(\text{ SD}_{\text {TT}}\) yields the (\(\text{ SD}_{\text {DET}}\), \(\text{ SD}_{\text {TT}}\))-plane. Plotting m against \(\text{ SD}_{\text {TT}}\) yields the (m, \(\text{ SD}_{\text {TT}}\))-plane. In the (\(\text{ SD}_{\text {DET}}\), \(\text{ SD}_{\text {TT}}\))-plane, all feasible solutions to Eq. (5), which cannot be dominated by each other, outline a border representing the Pareto front (Fig. 1F). A reordered front is outlined by all feasible solutions and their corresponding objectives in the (m, \(\text{ SD}_{\text {TT}}\))-plane (Fig. 1G). All Pareto optimal solutions and their objectives presented in the (\(\text{ SD}_{\text {DET}}\), \(\text{ SD}_{\text {TT}}\))-plane result in the Pareto front (Fig. 1F). All those solutions and corresponding objectives presented in the (m, \(\text{ SD}_{\text {TT}}\))-plane result in the reordered front (Fig. 1G). More information related to the Pareto front and the reordered front can be found in Sect. 2, Supplementary Information (SI, Section 2). Finally, we focus on the reordered front and compare the local maxima with the global maxima, leading to four scenarios in selecting \((m^*, \tau ^*)\), cf. Fig. 2.

  1. (C1)

    If none of local maxima is observed, then \((m^*, \tau ^*)\) is ambiguous, and we should be skeptical about the existence of \((m^*, \tau ^*)\).

  2. (C2)

    If the maximum of the local maxima corresponds to the global maximum, then \((m^*, \tau ^*)\) exists and corresponds to the \((m, \tau )\) under which the maximum of the local maxima and the global maximum are simultaneously reached.

  3. (C3)

    If the maximum of local maxima is close to the global maximum, then we select \((m, \tau )\) that corresponds to the maximum of local maxima as \((m^*, \tau ^*)\).

  4. (C4)

    If the maximum of local maxima is distant from the global maximum, then we select the \((m, \tau )\) with the smallest of m that leads \(\text{ SD}_{\text {TT}}\) to be close to the global maximum as \((m^*, \tau ^*)\).

In our experiments, we select the parameter \((m, \tau )\) under which the global maximum is reached as \((m^*, \tau ^*)\) in two scenarios. The maximum of local maxima corresponds to the global maximum, or no local maxima exists.

2.3 Surrogate data testing

An alternative tool to tell the difference between stochastic and deterministic dynamics is to conduct surrogate data testing [18, 27, 44, 53]. One defines a null hypothesis and then resamples an original time series to construct a surrogate. The construction ensures that the surrogate exhibits stochastic dynamics and satisfies the defined null hypothesis. Comparisons between the original time series and its surrogate allow rejecting or accepting the corresponding null hypothesis [18, 27, 44, 53]. We utilize three surrogates to test the underlying dynamics of a real-life demand process, addressing certain critical properties, such as independent and identical distribution, linearity, and irregularity. The three surrogates are shuffle-based, Fourier-based, and truncated amplitude-adjusted Fourier transform (AAFT) surrogates.

Shuffle-based surrogate randomly shuffles an original time series [27, 53]. The null hypothesis (H\(_{0,1}\)) is that the time series underlies an independent and identically distributed process [27, 53]. Shuffle-based surrogate can test that whether uncorrelated noise such as Gaussian noise is responsible for the underlying dynamics.

Fourier-based surrogate and truncated AAFT resample an original time series by the complex numbers derived from Fourier analysis. Fourier-based surrogate applies Fourier analysis on an original time series and then shuffles either the phase or the amplitudes of the resulting complex numbers [27, 53]. The null hypothesis (H\(_{0,2}\)) is that the time series does not contain any nonlinearity [27, 53]. By shuffling the phase angles in the Fourier-based method, we can test whether a stationary linear Gaussian process is responsible for the underlying dynamics.

Truncated AAFT shuffles the frequency of the amplitudes of the complex numbers calculated from an original time series and, however, preserves the distribution of the amplitudes [27, 53]. The null hypothesis (H\(_{0,3}\)) is that the time series represents a rescaled linear Gaussian process [27, 34, 53]. Truncated AAFT can test whether a stationary linear process is responsible for irregular fluctuations [34].

Many surrogate data methods exist in testing a null hypothesis, such as a pseudo-periodic test [49] and a wavelet-based surrogate [21]. The reader may refer to a recent review about surrogate data in [27]. We use a package from Julia [4], TimeseriesSurrogate.jl [12, 54] to shuffle a real-life demand process, generating the three types of surrogates.

3 Empirical data

RideAustin [38], a nonprofit enterprise providing ride share service in the city of Austin, Texas, the USA, released a dataset [39], point process data (an event time series) that records the arrivals of every transaction from 4 June 2016 to 13 April 2017. The release of the dataset [39] is to promote research in data analysis and transparent transportations [2, 22, 57]. A ride-sharing market is a representative case of the growing on-demand economics [45]. We thus apply recurrence-based reconstruction and surrogate data testing on that empirical dataset [39].

Fig. 3
figure 3

Recurrence-based reconstruction to sample point process data by optimizing the parameter \(p^*\) for aggregations of demand. A The dataset [39] records the arrivals of each transaction, including the time when the transaction is created. B Aggregating the number of transactions every p minutes leads to raw demand. C Applying linear regression on raw demand leads to a time series of demand. At time t, a detrended demand is equal to the minus between the raw demand \(y_{t}\) and its linear fit \(\hat{y}_t\). D Recurrence-based reconstruction (Fig. 1 and Eq. 5) is applied on the time series of demand. At a given p, varying \((m, \tau )\) produces a time series of SD\(_{\text {DET}}(m,\tau ,p)\) and that of SD\(_{TT}(m, \tau , p)\). E The optimal parameter \(p^*\) is chosen from Pareto optimal solutions to Eq. (6)

Three reasons exist for us to exemplify demand dynamics in a ride-sharing market. Firstly, non-equilibrium prices occur [45], and implementing a dynamic pricing strategy is profitable for both consumers and a driver (seller) [45]. Secondly, in a ride-sharing market, the three variables, price, demand, and supply, highly interact in time and also in space [5], yielding a dynamical system with strong interactions. Thirdly, a ride-sharing market provides a testing ground for nonlinear time-series analysis of heterogeneous dynamics, since on-peak and off-peak patterns are important features in a traffic system [1, 22, 42].

In total, the dataset [39] has 1,494,125 entries (transactions). Each transaction includes information related to the time when a ride is created and starts (Fig. 3A), and when a ride is completed, as well as the localization data such as the longitude and the latitude [39]. Information related to prices such as base fares and total fares is also included. We take four procedures to aggregate the point process data (Fig. 3A–D) and then find an optimal parameter \(p^*\) to yield a time series of demand via Eq. (6).

  1. P1:

    Aggregate transactions every p minutes. Here, p is a parameter that relates to the sampling rate and determines the frequency of aggregations. One counts the number of transactions every p minutes. Each transaction has the field “started_on” to record the arriving time of a consumer. We order the dataset by the field “started_on”. The dataset thus starts at 2016/06/04T00:18:49ZFootnote 1 and ends at 2017/04/13T18:59:43Z (Fig. 3A). For example, at \(p=20\), we count the total number of transactions whose field “started_on” is between 2016/06/04T00:00:00Z and 2016/06/04T00:2 0:00Z, yielding \(y_1\). We then count the number number of transactions whose field “started_on” is between 2016/06/04T00:20:00Z and 2016/06/04T00:40:00Z, yielding \(y_2\). In a similar manner, we thus get a time series of raw demand, \(\big \{y_{1}, y_{2}, \cdots , y_{N_p}\big \}\). Here, \(y_{N_p}\) depends on p and represents the total length of raw demand.

  2. P2:

    Obtain a raw demand. At p, an aggregation yields a time series of raw demand with \(y_{N_p}\) data points (Fig. 3B). At \(p=20\), \(y_{N_p}=22,593\). At \(p=100\), \(y_{N_p}=4,518\).

  3. P3:

    Apply a linear regression for a detrended demand. At time t, we make a linear regression on the point set \(\big \{y_{t-10},y_{t-9}, \cdots , y_{t}, y_{1}, \cdots , y_{t+10}\big \}\) and then find the linear fitting value \(\hat{y}_{t}\) that fits the point \(y_{t}\) (Fig. 3C). A detrended demand represents the time series, \(\big \{y_{t}-\hat{y}_{t} \big \}\). In SI, Section 3 (SI-3) provides an algorithm describing the regression and the detrending procedures.

  4. P4:

    Apply the Pareto optimality for an optimal parameter \(p^*\). We let \(p\in \{5i: i=4, 5, \cdots ,40\}\). At an individual p, procedures P1 to P3 are applied. This yields 37 time series of detrended demand. For a given p and the corresponding detrended demand, we follow the workflow of conducting sliding windowed recurrence analysis (Fig. 1A–E). This leads to the minimum of \(\text{ SD}_{\text {DET}}\) and that of \(\text{ SD}_{\text {TT}}\) (Fig. 1E). Varying the parameter p yields two sets that contain the minimum of \(\text{ SD}_{\text {DET}}\) and that of \(\text{ SD}_{\text {TT}}\), respectively. Pareto optimality is applied on those \(\text{ SD}_{\text {DET}}\) and \(\text{ SD}_{\text {TT}}\) for an optimal parameter \(p^*\). At \(p^*\), the corresponding detrended demand represents ride-sharing demand, becoming the focus of our empirical analysis of demand dynamics.

The following equation can format those four procedures (P1–P4)

$$\begin{aligned} \mathop {\min _{p}} \quad{} & {} \big (\min _{m,\tau }\text{ SD}_{\text {DET}}(m,\tau ,p), \; \min _{m,\tau }\text{ SD}_{\text {TT}}(m,\tau ,p)\big )\nonumber \\{} & {} \text{ SD}_{\text {DET}}(m,\tau ,p)=\sqrt{\frac{1}{N_{p}^{w}-1}\sum _{t=1}^{N_{p}^{w}}(\text{ DET}_{t}-\mu _{\text {DET}})^2}\nonumber \\{} & {} \text{ SD}_{\text {TT}}(m,\tau ,p)=\sqrt{\frac{1}{N_{p}^{w}-1}\sum _{t=1}^{N_{p}^{w}}(\text{ TT}_{t}-\mu _{TT})^2}\nonumber \\{} & {} \mu _{\text {DET}}=\frac{1}{N}\sum _{t=1}^{N_{p}^{w}}\text{ DET}_{t}(m,\tau ,p)\nonumber \\{} & {} \mu _{\text {TT}}=\frac{1}{N}\sum _{t=1}^{N_{p}^{w}}\text{ TT}_{t}(m,\tau ,p)\nonumber \\{} & {} m, \tau \in \big \{2,3,\cdots ,20\big \},~ p\in \big \{5i: i=4,\cdots ,40\big \}\nonumber \\ \end{aligned}$$
(6)

where \(N_{p}^{w}\) is the total number of sliding windows for a given detrended time series, and \(\text{ DET}_t\) and \(\text{ TT}_t\) in Eq. (6) depend on \(m,\tau \) and p.

The rule that under a reasonable sampling rate recurrence plots yield a reliable dynamics is applied to define the objectives in Eq. (6). The reliability is quantified by the standard deviations of recurrence quantification measures as well. However, the dynamics can be represented by either diagonal or vertical lines. The reason to take the rule is that the diagonal and the vertical lines represent different types of dynamics [32]. The optimal sampling rate should lead to a time series with the reliable type of dynamics, which is unrelated to the choices over the diagonal or the vertical lines. Therefore, Eq. (6) aims for an optimal value of \(p^*\) under which the minimum between the minimum of \(\text{ SD}_{\text {DET}}\) and that of \(\text{ SD}_{\text {TT}}\) is chosen.

Furthermore, the dataset from RideAustin [39] is assumed to be attributed to a Poisson process in the modeling of dynamic pricing problems [2]. We generate a new dataset to test the null hypothesis that demand satisfies a Poisson process. Following the assumption in Ref. [2], we randomly generate five transactions per minute. We then count the number of transactions every \(p^*\) minutes. Here, \(p^*\) is derived from Eq. (6) as the dataset from RideAustin [39] is applied with recurrence-based reconstruction (Fig. 1 and Eq. 5). A simulated Poisson demand is thus generated. The detrended algorithm (SI Sect. 3) is applied on the simulated Poisson demand. We call the detrended result a Poisson process in the following sections.

Finally, the paradigm of recurrence-based reconstruction (Eq. 5) is applied to six benchmarking systems (SI, Table S1) as well. They are the Rössler system [40] with periodic and chaotic dynamics, the Duffing system [24] with periodic and chaotic dynamics, the Duffing system where a stochastic resonance is achieved, the non-auto FitzHugh–Nagumo system [14], the multi-fractional Gaussian noise, and an autoregressive model of order 2. Stochastic resonance is a phenomenon taking place when a nonlinear signal is amplified and optimized by the presence of noise [3, 15]. More details about the six systems can be found in SI Sect. 1. Here, we utilize the Rösser system and the Duffing system to show the feature of deterministic dynamics, the non-auto FitzHugh-Nagumo model and the stochastic resonance to show that of deterministic dynamics contaminated by different levels of noise, and the multi-fractional Gaussian noise and the autoregressive model to show that of stochastic dynamics.

4 Results

SI Section 4 shows the results as the paradigm (Eq. 5 and Fig. 1) is applied on benchmarking systems. Here, we show the results as the paradigm is applied on empirical data [39], its three types of surrogates, and the Poisson process. We firstly get an optimal parameter \(p^*\) via Eq. (6) and then a time series of ride-sharing demand. We shuffle the ride-sharing demand by shuffle-based, Fourier-based, and truncated AAFT surrogates. Finally, the dynamics of ride-sharing demand is compared with its three surrogates and the Poisson process.

Fig. 4
figure 4

Differences in dynamics between the ride-sharing demand and the widely assumed Poisson process (\(p^{*}=100\)). A\(_1\) and A\(_2\). Pareto front and reordered front of the ride-sharing demand. The maximum of the local maxima corresponds to the global maximum. B\(_1\) and B\(_2\). Pareto front and reorder front of the Poisson process. No local maxima exists. C\(_1\) to C\(_3\). An original time series, a detrended time series, and a zoomed time series of ride-sharing demand. Two patterns exist: a slow and a fast dynamics. C\(_4\). A recurrence plot of ride-sharing demand (Fig. 4C\(_3\)). D\(_1\) to D\(_3\). An original time series, a detrended time series, and a zoomed time series of the Poisson process. D\(_4\). A recurrence plot of the Poisson process (Fig. 4D\(_3\)). Ride-sharing demand exhibits periodicity and organizations in recurrence plots (Fig. 4C\(_4\)), whereas the Poisson process fails to capture the dynamics in recurrence (Fig. 4D\(_4\))

Prior to show demand dynamics, we shall conclude the optimal sampling rate to process the point process data from RideAustin [39]. Figure 3E shows the four Pareto optimal solutions to Eq. (6), including \(p=80\), 85, 95, and 100. At \(p=100\), the minimum of \(\text{ SD}_{\text {DET}}\) is the second smallest, and the minimum of \(\text{ SD}_{\text {TT}}\) is the third smallest (Fig. 3E). The performances are reasonable for both \(\text{ SD}_{\text {DET}}\) and \(\text{ SD}_{\text {TT}}\). We thus aggregate transactions every \(p^*=100\) minutes and then get a time series of ride-sharing demand by the de-trending algorithm (SI, Sect. 3).

Fig. 5
figure 5

The dynamics of the surrogates of the ride-sharing demand. A The dynamics of the shuffle-based surrogate. B The dynamics of the Fourier-based surrogate. C The dynamics of the truncated AAFT surrogate. A\(_1\) to C\(_1\): Pareto front. A\(_2\) to C\(_2\): Reordered front. A\(_3\) to C\(_3\): Time series. A\(_4\) to C\(_4\): A zoomed plot of a segment of A\(_3\) to C\(_3\), respectively. A\(_5\) to C\(_5\): Recurrence plot of the time series shown in A\(_4\) to C\(_4\), respectively. The shuffle-based surrogate shows a feature consistent with the Poisson process (Figs. 4D and 5A). The Fourier-based surrogate has the Pareto optimal embedding dimension that clusters at \(m^*=2\) (Fig. 5B). Sword-like patterns [20] are shown in the recurrence plot of the Fourier-based and the truncated AAFT surrogates to indicate the slow and the fast dynamics (Fig. 5B\(_5\) and C\(_5\))

Fig. 6
figure 6

A statistics of \(\mu _{\text {DET}}\) and that of \(\mu _{\text {TT}}\). A The \(95\%\) and the \(5\%\) percentiles of DET among all sliding windows (Eq. 5) as \(l_{{\text {min}}}\) varies. The statistics of \(\mu _{\textrm{DET}}\) related to the ride-sharing demand has no overlaps with that of the Poisson process, the shuffle-based, the Fourier-based, and the truncated AAFT surrogates. B The \(95\%\) and the \(5\%\) percentiles of TT among all sliding windows (Eq. 5) as \(v_{\text {min}}\) varies. As \(v_{\text {min}}\) increases, \(\mu _{\text {TT}}\) goes to zero for the Poisson process and those three surrogates; however, \(\mu _{\text {TT}}\) is nonzero for the ride-sharing demand

4.1 Ride-sharing demand versus Poisson process

The dynamics of the ride-sharing demand is compared with that of the Poisson process in Fig. 4 and with that of three types of surrogates in Fig. 5. Difference in statistics between the ride-sharing demand, the Poisson process, and the three surrogates is shown in Fig. 6. The statistics are made over all sliding windows (Eq. 5) with respect to DET and TT as \(l_{\text {min}}\) and \(v_{\text {min}}\) change from 5 to 50 (Fig. 6), respectively.

The Poisson process fails to capture the dynamics of the ride-sharing demand, which is evidenced by several observations. In the reordered front, the ride sharing demand has multiple local maxima of which the maximum corresponds to the global maximum (Fig. 4A\(_2\)). In addition, m spans from 2 to 18 (Fig. 4A\(_2\)). Those two features are consistent with the feature of deterministic dynamics, such as the feature of Rössler systems (SI, Fig. S1A) and the Duffing systems (SI, Fig. S1C and S1D). However, for the Poisson process, no local maximum exists and m clusters at 2 in the reordered front (Fig. 4B\(_2\)), being consistent with the feature of the autoregressive model shown in SI, Fig. S1H. Figure 4C\(_4\) further indicates a high confidence in concluding deterministic dynamics of the ride-sharing demand, which contradicts the feature of the Poisson process (Fig. 4D\(_4\)). In recurrence plot, the ride-sharing demand has non-interrupted diagonals (Fig. 4C\(_4\)), being consistent with deterministic dynamics shown in SI, Fig. S3A\(_{2}\) to S3D\(_{2}\). However, recurrence plot of the Poisson process does not exhibit either the periodicity or the long diagonals (Fig. 4D\(_4\))

4.2 Ride-sharing demand versus surrogates

For the shuffle-based surrogate, its feature is consistent with that of a Poisson process, instead of the ride-sharing demand (Fig. 4A\(_2\) and C\(_4\)), with important observations listed in the following. (i) In the \((m, \text{ SD}_{\text {TT}})\)-plane, a local maximum is absent (Fig. 5A\(_2\)), and (ii) the recurrence plot exhibits isolated dots (Fig. 5C\(_5\)). Those two observations are different from the features of the ride-sharing demand (Fig. 4A\(_2\) and C\(_4\)). We therefore reject H\(_{0,1}\).

For the Fourier-based surrogate, the feature in the Pareto and the reordered fronts is similar to that of a Poisson process (Figs. 4B\(_1\), B\(_2\), 5B\(_1\), and B\(_2\)). For the truncated AAFT, a local maximum exists at \((m,\tau )=(6,15)\) in the reordered front; however, the change of \(\text{ SD}_{\text {TT}}\) is relatively small (Fig. 5C\(_2\)), which is similar to the feature of the non-auto FitzHugh-Nagumo model shown in Fig. S1F.

Moreover, recurrence plots of the Fourier-based and the truncated AAFT surrogates exhibit sword-like patterns along the diagonal line (Fig. 5B\(_5\) and C\(_5\)). The phenomenon is related to the slow and the fast dynamics within a time series [20]. Figure 5B\(_3\), B\(_4\) and C\(_3\), C\(_4\) further show a heterogeneity of dynamics in the corresponding surrogates. However, neither the Fourier-based nor the truncated AAFT shows the recurring long diagonals that the ride-sharing demand presents (Figs. 4C\(_4\) and 5B\(_5\), C\(_5\)). Different features between the ride-sharing demand and the surrogate data (Fourier-based and truncated AAFT) reject H\(_{0,2}\) and H\(_{0,3}\). This suggests that the nonlinearity in deterministic functions is responsible for the dynamics of the ride-sharing demand.

As \(l_{\text {min}}\) and \(v_{\text {min}}\) increase (Fig. 6), the changing patterns of \(\mu _{\text {DET}}\) and \(\mu _{\text {TT}}\) also indicate that deterministic dynamics is a constituent part of ride-sharing demand. The reasons for that are briefly discussed in the following. (i) At \(l_{\text {min}}=50\), the ride-sharing demand presents a nonzero \(\mu _{\text {DET}}\) (Fig. 6A), which is consistent with deterministic dynamics shown in SI, Fig. S5A\(_1\) and S5A\(_2\). (ii) A linear correlation exists between \(l_{\text {min}}\) and \(\mu _{\text {DET}}\), which is consistent with the Rössler system (SI, Fig. S5A\(_1\)), the Duffing system (SI, Fig. S5A\(_2\)), and the stochastic resonance (SI, Fig. S5A\(_3\)). (iii) A plateau in \(\mu _{\text {TT}}\) is observed in the middle as \(v_{min}\) increases (Fig. 6B), which is similar to the feature of the stochastic resonance (SI, Fig. S5B\(_3\)) where deterministic dynamics is contaminated by a low level of noise (SI, Table S1).

The statistical tests of \(\text{ DET }\) and \(\text{ TT }\) further reject H\(_{0,1}\) to H\(_{0,3}\) that the three types of surrogates correspond to from the following observations (Fig. 6A and B). For neither the \(95\%\) nor the \(5\%\) percentile of \(\text{ DET }\), no overlapping between the ride-sharing demand and the three types of surrogate data can be observed (Fig. 6A). This indicates statistically significant differences between the ride-sharing demand and its surrogates. For \(\text{ TT }\), the \(5\%\) percentile of the ride-sharing demand goes to zero (Fig. 6B), which is indicative for a contamination of noise. For the three types of surrogate data, \(\mu _{\text {TT}}\) goes to zero at \(v_{\text {min}}=15\) (Fig. 6B). For the ride-sharing demand, however, \(\mu _{\textrm{TT}}\) does not tend to zero (Fig. 6B).

Fig. 7
figure 7

A reconstruction of an on-demand attractor. A A time series covers one week. The ride-sharing demand exhibits the slow and the fast dynamics. B An on-demand attractor is reconstructed and shows five inner and two outer circles. C An outline of the on-demand attractor further indicates the dynamics and the period-7 limit cycle oscillations. D The Poisson process is incapable of capturing the dynamics of the ride-sharing demand shown in Fig. 7A

4.3 Reconstructed attractor

Finally, a reconstructed attractor confirms that the ride-sharing demand is consistent with deterministic dynamics (Fig. 7B and C). The attractor is reconstructed under \((m^{*},\tau ^{*})=(13,3)\). The calculation is from the recurrence-base reconstruction (Fig. 1 and Eq. 5) and an observation of Fig. 4A\(_2\). The periodicity of the reconstructed attractor is around one week, cf. Figure 4C\(_4\). Figure 7A thus shows a time series that covers one week. Figure 7B shows the attractor reconstructed from the exemplified time series (Fig. 7A). Figure 7C is an outline of the reconstructed attractor to show a switching behavior. The following features are evident.

  1. (1)

    The system switches between the slow and the fast dynamics (Fig. 7A–C).

  2. (2)

    The slow dynamics takes the five inner circles, cf. Figure 7A–C. The fast dynamics takes the two outer circles, cf. Figure 7A–C. The oscillations produce a periodic-7 limit cycle. Here, a circle is not closed, cf. [28].

  3. (3)

    However, the oscillations take different times to complete an individual circle. For the time series we present, the seven circles take 0.1, 0.14, 0.15, 0.18, 0.16, 0.14, and 0.13 weeks (Fig. 7A), respectively.

Nevertheless, the Poisson process fails to preserve either periodic oscillations (Fig. 4D\(_4\)) or the slow and the fast dynamics (Fig. 7D). The comparison further confirms that the Poisson process is incapable of capturing the dynamics of the ride-sharing demand.

For benchmarking systems, In SI, Fig. S4 shows the efficiency of recurrence-based reconstruction to preserve the topology of the well-known attractors under the optimal embedding calculated via Eq. (5) and SI, Fig. S1. As the standard method based on mutual information to locate \(\tau \) becomes difficult (SI, Fig. S2), recurrence-based reconstruction opens a new way to find an optimal m and \(\tau \) by optimizing the recurrence quantifications (SI, Fig. S1).

A decision matrix is proposed in SI, Sect. 5. We compare the feature of ride-sharing demand with well-known dynamics from four categories. They are the Pareto front and the reordered front, recurrence plots, the statistics of DET and TT, and reconstructed attractors. More descriptions and results can be found in SI, Sect. 5. The comparison shows that while the Poisson process presents stochastic dynamics, the ride-sharing demand is consistent with deterministic dynamics (SI, Table S3).

5 Discussions

Dynamic pricing problems are widely modeled as stochastic systems where either Gaussian noise or a Poisson process can be assumed [7, 11, 37, 51, 61]. Here we have addressed the open question whether low-dimensional attractors can be responsible for the dynamics of a real-life demand process that implements dynamic pricing strategy. The paradigm (Fig. 1) we have proposed shows that neither the Poisson process nor the Gaussian noise is able to fit underlying dynamics of empirical data from RideAustin [39] (Figs. 4 and 5). However, a period-7 attractor fits the dynamics by irregularly switching the slow and the fast dynamics (Fig. 7). This challenges the three types of dynamic pricing approaches that utilize stochastic demand to fit uncertainty, namely a stochastic process, and parametric or nonparametric stochastic demand functions. Findings emphasize the importance of showing nonlinear dynamics of demand under uncertainty. The proposed paradigm pioneers the analysis of uncertain demand from the perspective of complex systems.

5.1 Recurrence-based reconstruction

Time delay embedding is silent on practical choices of an embedding dimension and a time delay for a reconstruction [25, 52]. The recurrence-based reconstruction we suggested extends the optimal embedding method that performs an optimization to find an embedding [48], providing practitioners an algorithmic way to find a desired embedding [25, 26, 48]. Existing methods rely on nearest neighbors or distances among reconstructed states in the definition of an optimal embedding [25, 26, 35, 47, 48, 52]. Recurrence-based reconstruction (Eq. 5 and Fig. 1), however, utilizes recurrence quantification measures and Pareto optimality together (Eq. 5) to achieve an optimal embedding. This allows a flexible definition to capture the desired dynamics that one cares about and extends the applicability of recurrence quantification analysis into a real-life setting as noise or non-stationarity is inevitable. Our results demonstrate that contemporary optimization algorithms can complement recurrence plots and boost their applicability.

Recurrence-based reconstruction can distinguish deterministic dynamics from stochastic dynamics (Figs. 4, 5, and 6, and SI, Figs. S1 to S5), for which we have proposed a decision matrix in SI, Table S3 and SI Sect. 5.3. For example, optimal solutions outline different reordered fronts in the \((m,\text{ SD}_{\text {TT}})-\)plane (Figs. 4 and 5 and SI, Fig. S1), providing an indicator of deterministic dynamics. Recurrence quantification measures are applied on S &P 500 returns [55], brake noise [36], and earth climate [58] to distinguish deterministic from stochastic dynamics in practical problems. Here, our paradigm (Fig. 1) provides a way to cross-check recurrence quantification measures, as suggested in Ref. [30] to avoid pitfalls of recurrence plots, and draw a conclusion of deterministic systems by scoring individual perspectives of dynamics (SI, Table S3).

The paradigm (Fig. 1) identifies the dynamics solely from a time series without knowing the governing equations, which is expected to be applicable for many engineering problems where the dynamics of uncertainty remains disputable. For example, Markovian stochastic process is assumed to model engineered vibrations [60], whereas Oberst and Lai [36] demonstrate that deterministic dynamics is responsible for many vibrations in engineering. Our paradigm can be extended to contribute to the debate by defining new optimization objectives that cover the desired dynamics in engineering.

The generality of optimizing recurrence quantification measures should be theoretically explored. There are several interesting topics that are needed to be explored. It could be interesting to compare \((m^*, \tau ^*)\) derived from Eq. (5) with that from the standard approach. It could also be interesting to investigate how the objective functions (Eq. 5) of Pareto optimality affects the choices for \((m^*, \tau ^*)\). For example, Eq. (5) could use three or more recurrence quantification measures, or replace \(\text{ DET }\) and \(\text{ TT }\) with other measures.

5.2 On-demand attractor

Traditionally, models that combine stochasticity with periodic trends are proposed to fit uncertainty of time series [8]. The most important dynamics is quantified by probability distributions [6, 10, 37, 51], and the problem is then reduced to a fitting of the periodicity of trends by equations [8]. Figures 4C\(_4\) and 7A–C, however, indicate that ride-sharing demand satisfies period-7 limit cycle oscillations. This suggests that deterministic dynamics is a constituent part of uncertainty. From a modeling perspective, the message is that period-7 limit cycle oscillations dominate and describe the dynamics of empirical data [39], instead of stochasticity.

The dynamics of uncertain demand is achieved in the following way. Within a week, the attractor underlies the slow dynamics by completing five inner circles with small amplitudes (off-peak) and then moves into the fast dynamics by completing two outer circles with significantly larger amplitude (on-peak), relating to findings on weekly traffic dynamics [22]. However, the ratio we observed between the slow and the fast dynamics is 5:2, rather than 4:3. The difference comes from the fifth circle (ordered from the left to the right in Fig. 7A). The circle represents a transient between the slow and the fast dynamics. The fifth circle can underlie either the fast or the slow dynamics, depending on individual weeks.

Our results explain the success of the application of nonlinear dynamics in a traffic system. Similar results have been presented previously, e.g., fitting the susceptible-infected-recovered (SIR) model into the dynamics of Melbourne’s (Australia) traffic systems [42], also cf. [1] for the use of Koopman mode decomposition to reconstruct the dynamics of the US-101 highway.

Our results confirm that a Poisson process fails to reflect the dynamics that a ride-sharing market underlies. In a ride-sharing market, consumers’ demand is inelastic because of fixed daily routines [45]. The findings demonstrate that a careful identification of demand dynamics becomes necessary for the modeling of dynamic pricing problems. Recurrence-based reconstruction allows finding an optimal sampling parameter \(p^*\) for processing raw data (Fig. 3 and Eq. 6), which enables the extraction of the on-demand attractor. This suggests that for point process data, such as a time series of transactions, an optimal sampling rate could benefit applications of the time delay embedding in dynamical systems.

Schröder et al. [45] introduce game theory and propose a theoretical model for identifying the dynamics that a time series of prices underlies in on-demand markets of different countries. Here, we reconstruct the on-demand attractor, further supporting the efficiency of the method [45] that separates price changes into a slow and a fast time scales for dynamic pricing problems. As an on-demand attractor has been extracted, a future study that utilizes deterministic chaotic information [28] as opposed to assuming a stochastic demand becomes critical for dynamic pricing. Applying the theory that studies a dynamical system to a dynamic pricing problem would be needed for better understanding and predicting the behavior of demand and prices.