by Güney Kıymaç
🌟 Highlights
- Combine Modern Portfolio Theory (MPT) with machine learning to optimize portfolios.
- Select the best portfolio from a given market.
- Auto-generate detailed, shareable HTML reports summarizing portfolio performance.
ℹ️ Overview
NeoPortfolio extends Modern Portfolio Theory (MPT) with NLP and ML features. The package is geared to reduce the friction in portfolio selection and management by maintaining simplicity in its user-facing interface. Optimize a pre-determined portfolio or let the package automatically select the best portfolio; either way, the results are one function call away!
✍️ Authors
Güney Kıymaç
I'm a Finance student and data science enthusiast! I developed NeoPortfolio to demonstrate my expertise through a project with real-world applications, as opposed to pre-designed portfolio projects often found in courses.
🚀 Usage
As mentioned, the package is designed for simple use. Define your investment preferences on class declaration, and make a single function call to get the results.
from NeoPortfolio import nCrOptimize
opt = nCrOptimize(
market="^GSPC", # S&P 500
n=5, # Number of assets in the portfolio
target_return=0.1,
horizon=21,
lookback=252,
max_pool_size=100, # Maximum number of portfolios to consider
api_key_path="path/to/your/api/key.env", # NewsAPI key (has free tier)
api_var_name="YOU_KEY_VAR"
)
opt.optimize_space(bounds=(0.05, 0.7))
⬇️ Installation
NeoPortfolio is available on PyPI, so you can access it with pip. Python 3.12+ is required for NeoPortfolio.
python -m pip install NeoPortfolio
Dependencies are installed during the pip installation process but PyTorch can cause errors depending on your system and
environment. If you encounter any issues, please refer to the PyTorch installation guide.
You only need the CPU compute platform and torchvision or torchaudio are not required for this package.
(The commands copied from the guide will install all 3 packages unless you remove them.)
💭 Feedback and Contributing
Feel free to use the Discussions and Issues tabs for feedback and suggestions. As NeoPortfolio is a small scale project, there aren't guidelines for contributing. Shoot your suggestions and we'll work on them!
Metadata
Release files for NeoPortfolio 1.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| neoportfolio-1.3.3.tar.gz | 60.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| NeoPortfolio-1.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 111.2 kB
Release files / neoportfolio-1.3.3.tar.gz
| Download URL | neoportfolio-1.3.3.tar.gz |
|---|---|
| Size | 60.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42cd7d52fca21ef1d1f64ac0bc03be4dc589aead66d59ca64470bb5150a54f40
|
|
BLAKE2b-256 checksum How to use checksums |
5bc961e28a23fb07b415deac007ab6379bccc0071842356277e2bbeb92ef4af2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / NeoPortfolio-1.3.3-py3-none-any.whl
| Download URL | NeoPortfolio-1.3.3-py3-none-any.whl |
|---|---|
| Size | 51.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5eff4c7c95301f148b6ac763e4e3b9d457870fefac6cc57e38fdfe72e3c11c0
|
|
BLAKE2b-256 checksum How to use checksums |
b22993ee69cd9d23d4923b40379684db416c5a4293343b4bd07a8e529d28ef84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|