Investment Report Generator example for Upsonic framework.
This advanced example shows how to build a sophisticated investment analysis system that combines market research, financial analysis, and portfolio management. The workflow uses a three-stage approach:
- Comprehensive stock analysis and market research
- Investment potential evaluation and ranking
- Strategic portfolio allocation recommendations
Key capabilities:
- Real-time market data analysis
- Professional financial research
- Investment risk assessment
- Portfolio allocation strategy
- Detailed investment rationale
Example companies to analyze:
- “AAPL, MSFT, GOOGL” (Tech Giants)
- “NVDA, AMD, INTC” (Semiconductor Leaders)
- “TSLA, F, GM” (Automotive Innovation)
- “JPM, BAC, GS” (Banking Sector)
- “AMZN, WMT, TGT” (Retail Competition)
- “PFE, JNJ, MRNA” (Healthcare Focus)
- “XOM, CVX, BP” (Energy Sector)
- Python 3.12 or higher
- uv package manager
- Make (optional, for using Makefile commands)
Using HTTPS:
git clone https://github.com/mertssmnoglu/upsonic-investment-report-generator.git
cd upsonic-investment-report-generatorUsing SSH:
git clone git@github.com:mertssmnoglu/upsonic-investment-report-generator.git
cd upsonic-investment-report-generatorPrepare the environment
uv venv --python 3.12Activate the virtual environment.
source .venv/bin/activateInstall the dependencies
# Sync the dependencies according to the uv.lock file
uv sync# Required
OPENAI_API_KEY=your_openai_api_key
# Optional, default is false
DEMO=true/falseYou can copy .env.example as .env and fill in the required values.
cp .env.example .envThis project includes a Jupyter Notebook for interactive exploration and analysis of investment data. You can find the notebook in the notebooks directory.
Demo app introduces a command line investment report generator that generates detailed investment reports based on the provided company symbols(tickers).
Run the demo and see it in action:
make demoThere is a server that can be used to run the investment report generator as a web service.
It saves the generated reports in the reports directory.
make runuvicorn main:app --host 0.0.0.0 --port 8000 --app-dir srcYou can run the investment report generator server as a Docker container.
docker pull mertssmnoglu/upsonic-investment-report-generatordocker run -p 8000:8000 --detach --env-file .env mertssmnoglu/upsonic-investment-report-generatordocker build -t upsonic-investment-report-generator .docker run -p 8000:8000 --detach --env-file .env upsonic-investment-report-generator:latestPlease see DEPLOYMENT.md for more details on deploying the investment report generator server.
This project is licensed under the MIT License.