This project implements various quantum computing approaches to optimize investment portfolios. It uses quantum algorithms such as Quantum Walk, Classical, Hadamard Test, and QAOA (Quantum Approximate Optimization Algorithm) measures to find optimal asset allocations.
The project is divided into two main parts:
- Backend (Python FastAPI)
- Frontend (Next)
-
Navigate to the backend directory:
cd final/working -
Install the required Python packages (it's recommended to use a virtual environment):
conda env create -f environment.yml -
Run the FastAPI server:
fastapi dev main.pyor
uvicorn main:app --reload
The API will be available at http://localhost:8000.
-
Navigate to the frontend directory:
cd final/frontend -
Install the required npm packages:
npm install -
Start the development server:
npm run dev
The frontend will be available at http://localhost:3000 (or another port if 3000 is already in use).
/optimize: Performs portfolio optimization using the specified method./stocks: Retrieves historical stock data./nifty: Retrieves Nifty index data.
- Start both the backend and frontend servers as described above.
- Open your web browser and navigate to the frontend URL (typically
http://localhost:3000). - Use the interface to select stocks, set investment amounts, and choose optimization methods.
- View the optimized portfolio allocations and performance metrics.
Check LICENSE for more details.
- This project uses Cirq for quantum circuit simulations.
- FastAPI is used for the backend API.
- Next.js is used for the frontend user interface.