Skip to content

Financial forecasting project using Python time series analysis with 12-month revenue and expense forecasts, Excel report, and visual projections.

Notifications You must be signed in to change notification settings

Debraj25roy/financial-forecasting-time-series

Repository files navigation

Financial Forecasting

Objective

Use historical financial data to predict future revenue and expenses and generate forecast reports with visual projections for future growth.

Tools Used

  • Python (pandas, statsmodels, matplotlib)
  • Excel (for viewing and simple analysis of the CSV files)

Dataset

File: data/financials_monthly.csv

Columns:

  • Date – Month (from Jan 2020 to Dec 2024)
  • Revenue – Monthly revenue
  • Expenses – Monthly expenses

The data is synthetic but follows a realistic upward trend with seasonality and noise.

Methodology (Time Series Analysis)

  1. Data Preparation

    • Load the dataset and set Date as a time index.
    • Visualize historical revenue and expenses.
  2. Model Selection

    • Use ARIMA (1,1,1) models separately for:
      • Revenue time series
      • Expenses time series
  3. Forecasting

    • Generate forecasts for the next 12 months.
    • Save results to data/financials_forecast.csv.
  4. Visualization

    • Plot:
      • Historical vs forecasted Revenue
      • Historical vs forecasted Expenses
    • Save plots to:
      • images/revenue_forecast.png
      • images/expenses_forecast.png

Files in This Project

  • data/financials_monthly.csv – Input historical data
  • data/financials_forecast.csv – (Generated after running the script/notebook) 12‑month forecasts
  • financial_forecasting.py – Python script to run the full pipeline
  • financial_forecasting_notebook.ipynb – Jupyter Notebook with step‑by‑step analysis
  • images/historical_revenue.png – Historical revenue plot
  • images/historical_expenses.png – Historical expenses plot
  • images/revenue_forecast.png – Forecast plot for revenue (generated when you run the script)
  • images/expenses_forecast.png – Forecast plot for expenses (generated when you run the script)

How to Run (Script Version)

  1. Make sure you have Python 3 installed.
  2. Install dependencies:
    pip install pandas matplotlib statsmodels
  3. Navigate to this project folder (where financial_forecasting.py is located).
  4. Run:
    python financial_forecasting.py
  5. Check the outputs:
    • data/financials_forecast.csv
    • images/revenue_forecast.png
    • images/expenses_forecast.png

How to Run (Jupyter Notebook)

  1. Install Jupyter:
    pip install notebook
  2. Start Jupyter:
    jupyter notebook
  3. Open financial_forecasting_notebook.ipynb and run all cells.

Outcome

  • Built a time series model (ARIMA) to forecast revenue and expenses.
  • Produced 12‑month ahead forecasts for both metrics.
  • Visualized growth trends and compared historical vs forecasted values.
  • Demonstrated how forecasting can support budgeting and strategic planning.

About

Financial forecasting project using Python time series analysis with 12-month revenue and expense forecasts, Excel report, and visual projections.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published