Skip to main content

A Python framework for hierarchical B2B sales quota cascading and pipeline reconciliation.

Project description

B2B Revenue Forecasting (b2b_revenue_forecasting)

PyPI version License: MIT

An open-source Python framework designed mathematically for Enterprise RevOps and Data Strategy teams.

Unlike traditional bottom-up time-series libraries (which are strictly built for B2C retail/inventory forecasting and rely on mathematical averages), this package is explicitly architected to handle the realities of B2B enterprise sales: Hierarchical Quotas, Managerial Cascading, and "Sandbagging" Biases.

🚀 Features

  • QuotaCascader: Distribute massive macro-targets down complex top-down org charts using rolling 4-quarter capacity models. Automatically enforce "Managerial Hedges" (e.g. VPs overassigning by 5%) to create safe mathematical buffers recursively down the DAG.
  • CommitReconciler: Reconcile mathematical pipeline probabilities with human logic. Automatically calculate an individual manager's historical Bias Quotient to detect sandbagging or "happy ears", and auto-adjust their current commits back to reality.
  • Flexible Organization DAGs: Ingest standard flattened dataframes mapping out jagged corporate reporting lines automatically using networkx.

📦 Installation

pip install b2b-revenue-forecasting

💻 Quickstart

1. The Quota Cascader (Target Setting)

Mathematically cascade an Enterprise target downwards, while enforcing a 5% safety hedge at every level based on 4 rolling quarters of node-capacity.

import pandas as pd
from b2b_revenue_forecasting.hierarchy import SalesHierarchy
from b2b_revenue_forecasting.quota_cascader import QuotaCascader

df = pd.read_csv('your_crm_data.csv')

# Build the Org Hierarchy (Dynamically scales to 5, 8, or 10 nodes deep)
hierarchy = SalesHierarchy()
hierarchy.from_dataframe(
    df, 
    path_cols=['Global', 'Region', 'RVP', 'Director', 'Manager', 'IC'], 
    metrics_cols=['Q1_Attainment', 'Q2_Attainment', 'Q3_Attainment', 'Q4_Attainment']
)

# Cascade $100M with a 5% managerial hedge to create commit safety
cascader = QuotaCascader(hierarchy)
quotas = cascader.cascade_quota('Global_Corp', 100_000_000.0, hedge_multiplier=1.05)

2. The Commit Reconciler (Removing Human Bias)

Use historical CRM data to fix bad managerial forecasting in real-time.

from b2b_revenue_forecasting.commit_reconciler import CommitReconciler

reconciler = CommitReconciler(historical_dataframe)

# Manager A historically closes 1.5x what they commit (A "Sandbagger")
# If they commit $100k today, our algorithm automatically corrects it to $150k.
adjusted_forecast = reconciler.reconcile_forecast(
    manager_id='Manager_A', 
    current_commit=100_000, 
    machine_forecast=120_000
)

🤝 Contributing

Built explicitly for RevOps analysts, Data Scientists, and VP Revenue Operations executing scaling go-to-market strategies. Contributions, issues, and pull requests are warmly welcomed!

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

b2b_revenue_forecasting-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

b2b_revenue_forecasting-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file b2b_revenue_forecasting-0.1.0.tar.gz.

File metadata

  • Download URL: b2b_revenue_forecasting-0.1.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for b2b_revenue_forecasting-0.1.0.tar.gz
Algorithm Hash digest
SHA256 299b2c385b49ab3449c23cd8e6a0eb7ac110105c73f1a43804c9a168d777193e
MD5 b72afde4b0eecc342c2e38f43ffa5ff3
BLAKE2b-256 551a9190094894a3f3bf20851fa02d756cc1279bc74a9047fda0912f3e5ba29c

See more details on using hashes here.

File details

Details for the file b2b_revenue_forecasting-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for b2b_revenue_forecasting-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5928508453dc465bee8c98a004f1b7e920f455f3ee652f9edeed97049d857d75
MD5 859e86f41983e0f98cd2549c6aebf48b
BLAKE2b-256 703f935c831806ff84736c394132d9aefdf26a90ac257671551c09fc8e48067e

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