report¶
duallens_analytics.report
¶
Generate a downloadable Markdown report summarising the analysis.
The report includes:
- The list of analysed companies.
- A formatted financial-metrics table.
- The AI-initiative composite ranking (if generated).
- The full Q&A chat log from the session.
generate_report(companies, metrics_df, ranking_text, chat_history=None)
¶
Compile session artefacts into a Markdown report string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
companies
|
list[str]
|
Ticker symbols included in the analysis. |
required |
metrics_df
|
DataFrame
|
Financial-metrics DataFrame rendered via
:meth: |
required |
ranking_text
|
str
|
Raw LLM ranking output. Pass an empty string if no ranking has been generated yet. |
required |
chat_history
|
list[dict] | None
|
Optional list of |
None
|
Returns:
| Type | Description |
|---|---|
str
|
A complete Markdown document ready for download. |