pastas.stressmodels.LinearTrend#

class pastas.stressmodels.LinearTrend(tstart: pandas.Timestamp | str | None = None, tend: pandas.Timestamp | str | None = None, name: str = 'trend', start: pandas.Timestamp | str | None = None, end: pandas.Timestamp | str | None = None)#

Stressmodel that simulates a linear trend.

Parameters:
  • tstart (str or Timestamp) – String with a date to start the trend (e.g., “2018-01-01”), will be transformed to an ordinal number internally.

  • tend (str or Timestamp) – String with a date to end the trend (e.g., “2018-01-01”), will be transformed to an ordinal number internally.

  • name (str, optional) – Name of the stressmodel. Default is “trend”.

Notes

While possible, it is not recommended to vary the parameters for the start and end time of the linear trend. These parameters are usually hard or even impossible to estimate from the data.

property stresses: tuple#

Return the stresses used by the stress model.

property nsplit: int#

Determine in how many time series the contribution can be split.

Methods#

set_init_parameters(→ None)

Set the initial parameters (back) to their default values.

simulate(→ pandas.Series)

Simulate the trend.

to_dict(→ dict)

Export the stress model to a dictionary.