WOLFRAM

Copy to clipboard.
TimeSeriesRescale[tseries,{tmin,tmax}]

rescales the times in time series tseries to run from tmin to tmax.

Copy to clipboard.
TimeSeriesRescale[tseries,{tmin,tmax,tu}]

rescales times in units of tu including "Month", "Quarter", or "Year".

Details

  • TimeSeriesRescale is used to expand or contract the time range for a time series while preserving the ratios of the distances between times.
  • The input tseries can be a list of values {x1,x2,}, a list of time-value pairs {{t1,x1},{t2,x2},}, a TimeSeries, an EventSeries, or TemporalData.
  • TimeSeriesRescale works on a multipath TemporalData as a whole, preserving the ratios of the distances between times across the paths.
  • The values tmin<tmax can be given as numbers or valid input to AbsoluteTime.
  • Time units tu can be any valid offset to DatePlus, as well as any purely numeric quantity.
  • The rescaled time series have time stamps , where and refer to time stamps of tseries and where is the distance between and in units of .
  • For numeric times, . For dates, is implicitly given by t_2=DatePlus[t_1,rho(t_1,t_2,t_u)t_u].

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Rescale a time series to run from 1 to 100:

Out[2]=2
Out[4]=4

Rescale to a 100-day span, starting at today's date:

Out[6]=6

Scope  (9)Survey of the scope of standard use cases

Basic Uses  (3)

Rescale a time series to run from 0 to 20:

Out[2]=2

Expand or contract the time range of a time series:

Out[4]=4

Rescale date-valued times to be numeric:

Out[1]=1
Out[2]=2

Number of days between the first and last points of a time series:

Out[3]=3

Rescale datevalued times to be integers:

Out[4]=4

Data Types  (6)

Rescale the times for a vector to run from 0 to 8:

Out[2]=2

Rescale the times for a series of time-value pairs to run from 10 to 50:

Out[2]=2

Rescale the times of a TimeSeries to run from 0 to 399:

Out[2]=2
Out[3]=3

Rescale the times of an EventSeries to run from 5 to 49:

Out[2]=2
Out[3]=3

Rescale the times of TemporalData to run from 10 to 100:

Out[1]=1
Out[2]=2
Out[3]=3

Rescale a time series involving quantities:

Out[3]=3

Applications  (2)Sample problems that can be solved with this function

Create a series with increasing variance and rescale to calendar time:

Out[2]=2
Out[4]=4

Rescale to begin on May 24, 1982, and step by week:

Out[6]=6

Rescale a time series with logical time stamps to calendar times in months:

Out[1]=1
Out[2]=2
Out[3]=3

Properties & Relations  (1)Properties of the function, and connections to other functions

TimeSeriesRescale rescales the time stamps in agreement with temporal regularity assumption:

Out[8]=8

Define a copy with assumed temporal regularity:

Out[9]=9
Out[10]=10

Rescale from 1 to 12 (where 12 is the length of the path):

Out[11]=11
Out[12]=12

TimeSeriesRescale preserves the proportional distances between the time stamps:

Out[13]=13
Out[14]=14
Wolfram Research (2014), TimeSeriesRescale, Wolfram Language function, https://reference.wolfram.com/language/ref/TimeSeriesRescale.html.
Copy to clipboard.
Wolfram Research (2014), TimeSeriesRescale, Wolfram Language function, https://reference.wolfram.com/language/ref/TimeSeriesRescale.html.

Text

Wolfram Research (2014), TimeSeriesRescale, Wolfram Language function, https://reference.wolfram.com/language/ref/TimeSeriesRescale.html.

Copy to clipboard.
Wolfram Research (2014), TimeSeriesRescale, Wolfram Language function, https://reference.wolfram.com/language/ref/TimeSeriesRescale.html.

CMS

Wolfram Language. 2014. "TimeSeriesRescale." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TimeSeriesRescale.html.

Copy to clipboard.
Wolfram Language. 2014. "TimeSeriesRescale." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TimeSeriesRescale.html.

APA

Wolfram Language. (2014). TimeSeriesRescale. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TimeSeriesRescale.html

Copy to clipboard.
Wolfram Language. (2014). TimeSeriesRescale. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TimeSeriesRescale.html

BibTeX

@misc{reference.wolfram_2025_timeseriesrescale, author="Wolfram Research", title="{TimeSeriesRescale}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/TimeSeriesRescale.html}", note=[Accessed: 15-March-2025 ]}

Copy to clipboard.
@misc{reference.wolfram_2025_timeseriesrescale, author="Wolfram Research", title="{TimeSeriesRescale}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/TimeSeriesRescale.html}", note=[Accessed: 15-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_timeseriesrescale, organization={Wolfram Research}, title={TimeSeriesRescale}, year={2014}, url={https://reference.wolfram.com/language/ref/TimeSeriesRescale.html}, note=[Accessed: 15-March-2025 ]}

Copy to clipboard.
@online{reference.wolfram_2025_timeseriesrescale, organization={Wolfram Research}, title={TimeSeriesRescale}, year={2014}, url={https://reference.wolfram.com/language/ref/TimeSeriesRescale.html}, note=[Accessed: 15-March-2025 ]}