Skip to content

[Feature Request] Save Portfolio Summary Button #48

@husainm97

Description

@husainm97

Currently, the tool provides visual feedback via the GUI, but users lack a way to "export" their findings for offline review or record-keeping. I am looking to implement a "Generate PDF Report" button that creates a professional, modular summary of the current portfolio analysis.

Proposed Functionality The goal is to create a report_generator.py module that pulls data from the existing analysis engines (FF5 Regression, Monte Carlo, Portfolio Optimization) and formats them into a clean PDF document.

Key Components to Include in the PDF:

  1. Header: Portfolio Name, Date of Analysis, and "Quant Lab Alpha" branding.
  2. Summary Table: Key metrics like CAGR, Sharpe Ratio, Max Drawdown, and Volatility.
  3. Factor Exposure Block: A table or chart showing the Fama-French Five-Factor coefficients (SmB, HmL, etc.).
  4. Visuals: Exporting current Matplotlib plots (Efficient Frontier or Monte Carlo paths, P16/50/84 values) directly into the PDF.
  5. Disclaimer: A standard "Not Financial Advice" footer.

Technical Requirements:

  1. Library: Preferably ReportLab or fpdf2.
  2. Modular Design: The generator should be a standalone class/function where we can pass a dictionary of results. This ensures that as we add new models (like Carbon risk or Trend), we can easily add new "sections" to the PDF.
  3. GUI Integration: A "Save as PDF" button added to the main dashboard or results window.

Helpful Resources:

  1. Existing data structures can be found in simulations/portfolio_module.py, which could generally keep a pre-computed copy of all the analyses.
  2. We should ensure the PDF is saved using a standard filedialog to let the user pick the destination.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions