feature: introducing pricing predictors (pricers)

This commit is contained in:
2025-11-28 17:38:38 +01:00
parent 8fae7851a6
commit c8a69f0e3b
4 changed files with 141 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
from abc import ABC, abstractmethod
import numpy as np
import pandas as pd
class PricingFunction(ABC):
"""
Abstract base for pricing functions.
Defines the mapping f: StateSpace -> prices
"""
@abstractmethod
def fit(self, historical_data: pd.DataFrame):
"""Train/calibrate the pricing function on historical data"""
pass
@abstractmethod
def predict(self, state_space) -> np.ndarray:
"""
Generate prices given current state space.
Args:
state_space: StateSpace object containing demand, prices, session features
Returns:
prices: price vector P_{t+1} in R^n
"""
pass