Skip to content

Latest commit

 

History

History
70 lines (58 loc) · 2.99 KB

README.md

File metadata and controls

70 lines (58 loc) · 2.99 KB

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!