cleverly.datasets.price_rise#

cleverly.datasets.price_rise(factor: float, label: str | None = None) → DynamicRegimen[source]#

Return the plan that raises each price by factor and keeps the price in the band.

At each month the plan multiplies the engine’s price \(a\) by factor where the raised price stays below that month’s band ceiling \(u_t\), that is, where \(a < u_t / \text{factor}\). Elsewhere it keeps the engine’s price. The map is piecewise smooth and invertible, so the plan is a modified treatment policy. A ceiling at \(u_t\) would put a point mass there, and its map would not be invertible.

Parameters:
factorfloat

The price factor, greater than 1.

labelstr or None, default=None

The name a fit reports for the plan. None gives "price_up" for the factor 1.12 and "up_<percent>" for any other factor, such as "up_25" for 1.25.

Returns:
DynamicRegimen

One policy for each of the three months, each reading engaged_<month>.

See also

PRICE_PLANS

The three plans of the tutorial.

PRICE_BANDS

The band each month’s price must stay in.

pricing_truth

The exact truth of a plan with this factor.

Examples

>>> from cleverly.datasets import price_rise
>>> plan = price_rise(1.25)
>>> plan.label
'up_25'
>>> len(plan.plan)
3