Power
Price Forward Curve
- class rivapy.marketdata.EnergyPriceForwardCurve(id, refdate: datetime | date, pfc: DataFrame = None, **kwargs)[source]
Bases:
objectEnergy Price Forward Curve object. It is recommended to initialze this object via the class methods
from_existing_pfc,from_existing_shapeorfrom_scratch.- Parameters:
id (_type_) – ID for the PFC object
refdate (Union[datetime, date]) – Reference date
pfc (pd.DataFrame, optional) – This object can be initialized with an existing pfc. Defaults to None.
- classmethod from_existing_pfc(id, refdate: datetime | date, pfc: DataFrame) EnergyPriceForwardCurve[source]
Initialization of the
EnergyPriceForwardCurvegiven an existing PFC.- Parameters:
id (_type_) – ID for the PFC object
refdate (Union[datetime, date]) – Reference Date
pfc (pd.DataFrame) – Existing Pfc
- Returns:
EnergyPriceForwardCurveobject- Return type:
- classmethod from_existing_shape(id, refdate: datetime | date, pfc_shape: DataFrame, future_contracts: List[EnergyFutureSpecifications]) EnergyPriceForwardCurve[source]
Initialization of the
EnergyPriceForwardCurvegiven an existing PFC shape. The shape is then shifted in order to match the future contracts defined in thefuture_contractslist.- Parameters:
id (_type_) – ID for the PFC object
refdate (Union[datetime, date]) – Reference Date
pfc_shape (pd.DataFrame) – Existing PFC shape
future_contracts (List[EnergyFutureSpecifications]) – List of future contracts (
EnergyFutureSpecificationsobjects)
- Returns:
EnergyPriceForwardCurveobject- Return type:
- classmethod from_scratch(id, refdate: datetime | date, apply_schedule: SimpleSchedule, pfc_shaper: PFCShaper, future_contracts: List[EnergyFutureSpecifications]) EnergyPriceForwardCurve[source]
Initialization of the
EnergyPriceForwardCurvefrom scratch. First a shape is created using thepfc_shaper. Afterwards, shape is shifted in order to match the future contracts defined in thefuture_contractslist.- Parameters:
id (_type_) – ID for the PFC object
refdate (Union[datetime, date]) – Reference Date
apply_schedule (SimpleSchedule) – Schedule to apply the
pfc_shaperon, in order to obtain shape values for future time pointspfc_shaper (PFCShaper) – PFC shaper
future_contracts (List[EnergyFutureSpecifications]) – List of future contracts (
EnergyFutureSpecificationsobjects)
- Returns:
EnergyPriceForwardCurveobject- Return type: