Skip to main content

Forecasting utilities, time-series preprocessing, rolling back-test and ensemble forecasting from model selection

Project description

fcst

Publish Tag to PyPI

Package repo on PyPI: fcst - PyPI

Installation

uv add fcst

Features

This package provides you with these sub-modules

  1. automation

    This automatically runs back-test, select the best models, and forecast for you. You can customise whether or not to run in parallel, how many top models to select, etc.

  2. forecasting

    This provides you with the basic functionality of fit() and predict(), given that you pass in the model.

  3. evaluation

    This provides you with back-test and model selection functionalities.

  4. preprocessing

    This allows you to prepare your dataframes, preprocess the time-series data, fill in the missing dates automatically.

  5. horizon

    This is an API for dealing with future horizon from sktime. But in some modules, it will also do this automatically.

  6. models

    Gives you the base models for you to work with. Provides you with the basic models, default (fallback) and zero predictor.

  7. metrics

    Our own implementation of forecasting performance metrics.

  8. common

    Other common functionalities, e.g., types.

Usage

Examples

from fcst.automation import run_forecasting_automation
from fcst.preprocessing.dataframe import prepare_forecasting_df
from fcst.models import base_models
import pandas as pd


df_input = pd.read_csv("path-to-your/file.csv")

data_period_date = pd.Period("2025-02", freq="M")

df_forecasting = prepare_forecasting_df(
    df_raw=df_input,
    min_cap=0,  # Cap the value to not go under 0
    freq="M",
)

df_forecasting_results = run_forecasting_automation(
    df_forecasting,
    value_col="net_amount",
    data_period_date=data_period_date,
    backtest_periods=3,
    eval_periods=2,
    top_n=2,
    forecasting_periods=2,
    return_backtest_results=True,
    parallel=True,
)

# Do something with the results
def format_and_upload_results(df_results):
    ...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fcst-0.3.0.tar.gz (86.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fcst-0.3.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file fcst-0.3.0.tar.gz.

File metadata

  • Download URL: fcst-0.3.0.tar.gz
  • Upload date:
  • Size: 86.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for fcst-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7953feddee87165bdabd9f67854c2c85801d393558e5c74bc03d9044bf539534
MD5 89a7932116c52c8d75c2ccbc0bd3ade3
BLAKE2b-256 3ae06986c6dca010b9fa290340750e4f4b79c148ab8ea8b37a718ea59b0b9e73

See more details on using hashes here.

File details

Details for the file fcst-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: fcst-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for fcst-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ac996b7e296235b5a956a1bf0e2db742d74c96ffc54fc06013b0846b13803f1
MD5 0f793442d91e792221edc1be101630c4
BLAKE2b-256 ec5d4479e3aa7dbeaa5cb33c3159ecdc23306c6300415dd8ebe13de97c38bd74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page