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.2.0.tar.gz (17.2 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.2.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: b2b_revenue_forecasting-0.2.0.tar.gz
  • Upload date:
  • Size: 17.2 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.2.0.tar.gz
Algorithm Hash digest
SHA256 fdd4ba6e0923a0a808323725859c96b0acc9b9c811e90c94f19a460e85b1e108
MD5 ac82a9e49bbf4922ec85a52daaa07575
BLAKE2b-256 ccd1482ab06f286b2790af3344dae8ad6497f16dc572e184a3e2f780eac106f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for b2b_revenue_forecasting-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb2221b8cf7e73ee5599452da6a573e34a30df860634d8f8d389c4f28232313f
MD5 e47e9631483bf3775879b67714e72190
BLAKE2b-256 b6478732408835a813c3dcc8663445401eaa3696aaf77a7421053ece5787ec7f

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