# Portfolio-tools Library Documentation



This library provides tools for financial analysis, portfolio management, and market data visualization with comprehensive multi-currency support and FIFO cost calculation.
## 📚 Documentation
**[📖 Full Documentation](https://ggenzone.github.io/portfolio-toolkit/)** - Complete API reference, user guides, and examples
### Quick Documentation Links
- **[Getting Started](https://ggenzone.github.io/portfolio-toolkit/examples/basic_usage.html)** - Basic usage examples
- **[CLI Usage Guide](https://ggenzone.github.io/portfolio-toolkit/examples/cli_usage.html)** - Complete command-line interface reference
- **[Multi-Currency Support](https://ggenzone.github.io/portfolio-toolkit/examples/multi_currency.html)** - Working with multiple currencies
- **[Portfolio JSON Format](https://ggenzone.github.io/portfolio-toolkit/user_guide/portfolio_format.html)** - Complete format specification
- **[API Reference](https://ggenzone.github.io/portfolio-toolkit/api/modules.html)** - Full API documentation
### Building Documentation Locally
```bash
# Install documentation dependencies
pip install sphinx sphinx-rtd-theme
# Build documentation
./manage_docs.sh build
# Serve documentation locally
./manage_docs.sh serve
# Auto-rebuild on changes
./manage_docs.sh watch
```
## Code Quality
This project maintains high code quality standards using:
- **Black** - Code formatting
- **isort** - Import sorting
- **flake8** - Linting
- **pytest** - Testing
### Quick Quality Checks
```bash
# Run all quality checks
./check_quality.sh
# Auto-format code
./format_code.sh
# Individual tools
black portfolio_toolkit/ # Format code
isort portfolio_toolkit/ # Sort imports
flake8 portfolio_toolkit/ # Lint code
pytest tests/ # Run tests
```
### Configuration
Code quality tools are configured in `pyproject.toml` and `setup.cfg`:
- Line length: 88 characters
- Black and isort profiles: compatible
- flake8 ignores: E203, E501, W503
## Installation
Install from the project root (local development):
```bash
pip install .
```
Or in editable mode (recommended for development):
```bash
pip install -e .
```
To uninstall:
```bash
pip uninstall portfolio-toolkit
```
## Testing
### Running Tests
```bash
# Run all tests and checks
./run_tests.sh
# Run specific test suites
./run_tests.sh unit # Unit tests only
./run_tests.sh coverage # Tests with coverage report
./run_tests.sh examples # Validate example portfolios
./run_tests.sh cli # Test CLI commands
./run_tests.sh lint # Code quality checks
```
### Manual Testing
```bash
# Run unit tests directly
python -m pytest tests/ -v
# Validate example portfolios
python tests/validate_examples.py
# Test CLI commands
portfolio-tools print-positions -f tests/examples/basic_portfolio.json
# Or using the module directly
python -m cli.cli print-positions -f tests/examples/basic_portfolio.json
```
## Documentation
```bash
# Local development
./manage_docs.sh build # Build documentation
./manage_docs.sh serve # Serve locally
./manage_docs.sh watch # Auto-rebuild on changes
# Deploy
./manage_docs.sh deploy # Deploy to GitHub Pages
```
## To Do
- [x] Add unit and integration tests for all modules
- [x] Document all public methods with usage examples
- [x] Support multi-currency portfolios and automatic currency conversion
- [ ] Add support for more data providers (e.g., Alpha Vantage, IEX Cloud)
- [ ] Allow loading portfolios from Excel and ODS files natively
- [ ] Implement portfolio performance metrics (Sharpe, Sortino, drawdown, etc.)
- [ ] Add interactive visualizations (e.g., with Plotly or Dash)
- [ ] Document all public methods with usage examples
- [ ] Add export to PDF/Excel reports
- [ ] Allow portfolio rebalancing and optimization simulations
- [ ] Add risk analysis and Value at Risk (VaR)
- [x] Improve CLI interface for task automation (migrated to Click framework)
Raw data
{
"_id": null,
"home_page": null,
"name": "portfolio-toolkit",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "portfolio, finance, investment, analysis, toolkit",
"author": "Guido Genzone",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/05/89/708b004e5bc6940ba3c26a70c98f545e2c2108a50a2992af2e406443bd56/portfolio_toolkit-0.1.1.tar.gz",
"platform": null,
"description": "# Portfolio-tools Library Documentation\n\n\n\n\n\nThis library provides tools for financial analysis, portfolio management, and market data visualization with comprehensive multi-currency support and FIFO cost calculation.\n\n## \ud83d\udcda Documentation\n\n**[\ud83d\udcd6 Full Documentation](https://ggenzone.github.io/portfolio-toolkit/)** - Complete API reference, user guides, and examples\n\n### Quick Documentation Links\n\n- **[Getting Started](https://ggenzone.github.io/portfolio-toolkit/examples/basic_usage.html)** - Basic usage examples\n- **[CLI Usage Guide](https://ggenzone.github.io/portfolio-toolkit/examples/cli_usage.html)** - Complete command-line interface reference\n- **[Multi-Currency Support](https://ggenzone.github.io/portfolio-toolkit/examples/multi_currency.html)** - Working with multiple currencies\n- **[Portfolio JSON Format](https://ggenzone.github.io/portfolio-toolkit/user_guide/portfolio_format.html)** - Complete format specification\n- **[API Reference](https://ggenzone.github.io/portfolio-toolkit/api/modules.html)** - Full API documentation\n\n### Building Documentation Locally\n\n```bash\n# Install documentation dependencies\npip install sphinx sphinx-rtd-theme\n\n# Build documentation\n./manage_docs.sh build\n\n# Serve documentation locally\n./manage_docs.sh serve\n\n# Auto-rebuild on changes\n./manage_docs.sh watch\n```\n\n## Code Quality\n\nThis project maintains high code quality standards using:\n\n- **Black** - Code formatting\n- **isort** - Import sorting \n- **flake8** - Linting\n- **pytest** - Testing\n\n### Quick Quality Checks\n\n```bash\n# Run all quality checks\n./check_quality.sh\n\n# Auto-format code\n./format_code.sh\n\n# Individual tools\nblack portfolio_toolkit/ # Format code\nisort portfolio_toolkit/ # Sort imports\nflake8 portfolio_toolkit/ # Lint code\npytest tests/ # Run tests\n```\n\n### Configuration\n\nCode quality tools are configured in `pyproject.toml` and `setup.cfg`:\n- Line length: 88 characters\n- Black and isort profiles: compatible\n- flake8 ignores: E203, E501, W503\n\n## Installation\n\nInstall from the project root (local development):\n\n```bash\npip install .\n```\nOr in editable mode (recommended for development):\n```bash\npip install -e .\n```\n\nTo uninstall:\n```bash\npip uninstall portfolio-toolkit\n```\n\n## Testing\n\n### Running Tests\n\n```bash\n# Run all tests and checks\n./run_tests.sh\n\n# Run specific test suites\n./run_tests.sh unit # Unit tests only\n./run_tests.sh coverage # Tests with coverage report\n./run_tests.sh examples # Validate example portfolios\n./run_tests.sh cli # Test CLI commands\n./run_tests.sh lint # Code quality checks\n```\n\n### Manual Testing\n\n```bash\n# Run unit tests directly\npython -m pytest tests/ -v\n\n# Validate example portfolios\npython tests/validate_examples.py\n\n# Test CLI commands\nportfolio-tools print-positions -f tests/examples/basic_portfolio.json\n\n# Or using the module directly\npython -m cli.cli print-positions -f tests/examples/basic_portfolio.json\n```\n\n## Documentation\n\n```bash\n# Local development\n./manage_docs.sh build # Build documentation\n./manage_docs.sh serve # Serve locally\n./manage_docs.sh watch # Auto-rebuild on changes\n\n# Deploy\n./manage_docs.sh deploy # Deploy to GitHub Pages\n```\n\n## To Do\n\n- [x] Add unit and integration tests for all modules\n- [x] Document all public methods with usage examples\n- [x] Support multi-currency portfolios and automatic currency conversion\n- [ ] Add support for more data providers (e.g., Alpha Vantage, IEX Cloud)\n- [ ] Allow loading portfolios from Excel and ODS files natively\n- [ ] Implement portfolio performance metrics (Sharpe, Sortino, drawdown, etc.)\n- [ ] Add interactive visualizations (e.g., with Plotly or Dash)\n- [ ] Document all public methods with usage examples\n- [ ] Add export to PDF/Excel reports\n- [ ] Allow portfolio rebalancing and optimization simulations\n- [ ] Add risk analysis and Value at Risk (VaR)\n- [x] Improve CLI interface for task automation (migrated to Click framework)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A comprehensive toolkit for portfolio analysis and management",
"version": "0.1.1",
"project_urls": {
"Bug Tracker": "https://github.com/ggenzone/portfolio-tools/issues",
"Documentation": "https://ggenzone.github.io/portfolio-tools",
"Homepage": "https://github.com/ggenzone/portfolio-tools",
"Repository": "https://github.com/ggenzone/portfolio-tools.git"
},
"split_keywords": [
"portfolio",
" finance",
" investment",
" analysis",
" toolkit"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "cf5c50f47aa91dcde7ab1592a9365170891769aacb1b0526ff644808b7d978d9",
"md5": "a141be6a21c0335301f9ae5d9b8a394e",
"sha256": "c305f01f43c5b75377afd051ada4a7c22b78d15a6d795e735a12c63ce0d126c5"
},
"downloads": -1,
"filename": "portfolio_toolkit-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a141be6a21c0335301f9ae5d9b8a394e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 64913,
"upload_time": "2025-07-25T10:40:09",
"upload_time_iso_8601": "2025-07-25T10:40:09.325484Z",
"url": "https://files.pythonhosted.org/packages/cf/5c/50f47aa91dcde7ab1592a9365170891769aacb1b0526ff644808b7d978d9/portfolio_toolkit-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0589708b004e5bc6940ba3c26a70c98f545e2c2108a50a2992af2e406443bd56",
"md5": "3578d62fbc92fd69fdce1cb212d498fe",
"sha256": "086474fdfc5d4923942dabfc7a1a6e54af1ad6004b0977269d5a35a5b3a2a46b"
},
"downloads": -1,
"filename": "portfolio_toolkit-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "3578d62fbc92fd69fdce1cb212d498fe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 71442,
"upload_time": "2025-07-25T10:40:10",
"upload_time_iso_8601": "2025-07-25T10:40:10.234020Z",
"url": "https://files.pythonhosted.org/packages/05/89/708b004e5bc6940ba3c26a70c98f545e2c2108a50a2992af2e406443bd56/portfolio_toolkit-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 10:40:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ggenzone",
"github_project": "portfolio-tools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "pandas",
"specs": [
[
">=",
"2.0.0"
]
]
},
{
"name": "numpy",
"specs": [
[
">=",
"1.24.0"
]
]
},
{
"name": "matplotlib",
"specs": [
[
">=",
"3.7.0"
]
]
},
{
"name": "yfinance",
"specs": [
[
">=",
"0.2.0"
]
]
},
{
"name": "tabulate",
"specs": []
},
{
"name": "click",
"specs": [
[
">=",
"8.0.0"
]
]
},
{
"name": "pytest",
"specs": []
}
],
"lcname": "portfolio-toolkit"
}