# 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 portfolio_toolkit.cli.cli portfolio print performance-summary 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/40/67/45215a8611f91880dc9e664acdd5d99ff4b0a75ad4ca3aa4a9af8a56acd1/portfolio_toolkit-0.1.4.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 portfolio_toolkit.cli.cli portfolio print performance-summary tests/examples/basic_portfolio.json\n\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": null,
"summary": "A comprehensive toolkit for portfolio analysis and management",
"version": "0.1.4",
"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": "8bc7c1e5a75086f1af81257273fca3c7dfa92558cc9b1ea8403c9006dcb81dc9",
"md5": "f7b63ef9b95ae55b59fb0f1f14d6b21d",
"sha256": "74e1248961740390c72fef15deabaaa6d3ce7978a380665e8b4709099bf8b025"
},
"downloads": -1,
"filename": "portfolio_toolkit-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f7b63ef9b95ae55b59fb0f1f14d6b21d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 86902,
"upload_time": "2025-08-06T14:49:44",
"upload_time_iso_8601": "2025-08-06T14:49:44.200613Z",
"url": "https://files.pythonhosted.org/packages/8b/c7/c1e5a75086f1af81257273fca3c7dfa92558cc9b1ea8403c9006dcb81dc9/portfolio_toolkit-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "406745215a8611f91880dc9e664acdd5d99ff4b0a75ad4ca3aa4a9af8a56acd1",
"md5": "fe1d8e79a6895707d3fdd817e8a5b03c",
"sha256": "82c89c8cb99bb9e172265f58ad9830a48dc7b54657b5c693789d4ac61c6522d3"
},
"downloads": -1,
"filename": "portfolio_toolkit-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "fe1d8e79a6895707d3fdd817e8a5b03c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 85511,
"upload_time": "2025-08-06T14:49:45",
"upload_time_iso_8601": "2025-08-06T14:49:45.333198Z",
"url": "https://files.pythonhosted.org/packages/40/67/45215a8611f91880dc9e664acdd5d99ff4b0a75ad4ca3aa4a9af8a56acd1/portfolio_toolkit-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-06 14:49:45",
"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": "scipy",
"specs": [
[
">=",
"1.10.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"
}