Git Product home page Git Product logo

microgrid-dispatch-with-spo's Introduction

Portfolio Optimization using Smart "Predict, then Optimize" Framework with Machine Learning Techniques

This repository experiments with Smart "Predict, then Optimize" framework in the context of portfolio optimization. This project was created as a part of Master Thesis for a program named Data analytics and Decision science in RWTH Aachen University.

Motivation for this Project

Portfolio optimization is an essential part of modern finance, aimed at maximizing returns while minimizing risk. Traditional approaches often treat the prediction and optimization processes as sequential steps, lacking a coherent methodology to integrate them. This project uses the Smart "Predict, then Optimize" (SPO) framework to tackle both steps jointly, thereby improving the effectiveness of portfolio optimization strategies.

Approach

The research aims to use machine learning techniques to predict stock returns and optimize an investment portfolio based on these predictions. Unlike traditional approaches that handle prediction and optimization as separate stages, the SPO framework leverages the optimization problem structure—objectives and constraints—to guide prediction. Given the computational expense of using SPO loss, a convex surrogate loss function, SPO+ loss, is utilized in model training. The study also delves into feature importance in predictive modeling.

Results

  • The model trained on the SPO framework showed comparable performance to models trained on Huber loss and MSE loss but did not outperform them.
  • Interpretability experiments using Shapley values illustrated a marked difference in decision-making between the SPO model and those trained on Huber loss, MSE loss, and MAE loss.

Project Structure

The project is organized into the following folder structure:

  • data: This folder contains all data sets required for the experiments.
  • src: Houses essential files for data evaluation and model training based on the SPO framework.
  • entrypoint: Includes individual Jupyter notebooks detailing each experiment conducted.
  • models: Contains the final saved models.
  • config: Consists of a YAML file containing all static data needed for the project.

To run this project several python packages needs to be installed which are mentioned in the requirements.txt file

To install these packages simply write below command in by opening the command prompt in the directory containing requirements.txt file: pip install -r requirements.txt

The complete data to run this repo can be downloaded from Zhong and Hitchcock (2021)

microgrid-dispatch-with-spo's People

Contributors

tejas-choudekar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.