Forecast Revenue with Machine Learning
Design a machine learning revenue forecasting model with production pipeline and integrated monitoring.
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
You are a data scientist specializing in financial forecasting. Design a revenue forecasting model for [company name] using machine learning.
Data and context:
- Available revenue history: [number of years, monthly/weekly granularity]
- Revenue sources: [subscriptions, one-off sales, services, licenses]
- Available explanatory variables: [marketing spend, seasonality, customer base, sales pipeline]
- Technical infrastructure: [Python, R, cloud, existing BI tools]
- Required accuracy: [acceptable margin of error in %]
- Forecast horizon: [1 month, 3 months, rolling 12 months]
Structure the project in five phases:
-
Data preparation:
- Identify and collect internal variables (revenue by product, active customer count, churn rate, average order value) and external variables (macroeconomic indicators, seasonality, weather if relevant)
- Clean data: handle missing values, outliers and changes in scope
- Create derived features: moving averages, growth rates, lag variables, interactions
- Decompose time series into trend, seasonality and residuals
- Build training, validation and test sets using a time-based strategy (no data leakage)
-
Model selection and training:
- Baselines: naive model (last known value) and moving average
- Statistical models: ARIMA/SARIMA to capture trend and seasonality
- ML models: Random Forest, XGBoost, LightGBM to use explanatory variables
- Deep learning models: LSTM or Transformer if data volume warrants it
- Ensemble approach: combine predictions from multiple models (stacking or blending)
- For each model: hyperparameter tuning with time-series cross-validation
-
Evaluation and selection:
- Evaluation metrics: MAE, RMSE, MAPE, directional bias
- Compare performance on the test set (a recent, unseen period)
- Analyze errors by segment (product, region, customer type)
- Assess prediction stability (variance across cross-validation folds)
- Select the final model or optimal ensemble according to [criterion: accuracy, interpretability, simplicity]
-
Interpretability and confidence:
- Analyze feature importance and SHAP values
- Generate 80% and 95% prediction intervals
- Identify conditions where the model is least reliable
- Create forecast vs. actual charts for past periods
- Document model assumptions and limitations
-
Production deployment and maintenance:
- Automated pipeline: data collection, inference and report generation
- Monitoring dashboard: forecasts vs. actuals, drift alerts
- Periodic retraining process (monthly or quarterly)
- Response steps to take if accuracy drops
- Technical documentation and user guide for the finance team
Provide the complete project plan with technical specifications, schedule and resources.
Personalize this prompt with Léa · AI assistant
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Why this prompt works
This prompt structures a complete ML project applied to financial forecasting. It covers data preparation, algorithm selection, rigorous evaluation and production deployment. The emphasis on interpretability and confidence intervals meets finance team expectations.
Use Cases
Expected Output
An ML project plan with model architecture, performance metrics, production pipeline and maintenance guide.
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
Be the first to comment on this prompt.
Glossary Terms
📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Go further
Improve this prompt with the Optimizer
Analyze the prompt, strengthen the context and get a more precise version.
Prompt Engineering
Cross-model principles for writing more reliable prompts.
AI prompts for accountants and finance teams
Financial analysis and client summaries on anonymized data.
Security, GDPR & Business Plans
ChatGPT Business, Claude Team, Gemini Workspace and Mistral Vibe compared from vendor sources: training, EU hosting and a GDPR checklist.