Skip to content

About

This repository contains the solutions to the exercises in Chapter 16: "Deep Learning Portfolios" from the book Portfolio Optimization: Theory and Application by Daniel P. Palomar (2025).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Deep Learning Portfolios - Exercise Solutions

This repository implements the solutions of the exercises on Chapter 16: Deep Learning Portfolios (link to exercises) of the book Palomar, D. P. (2025). Portfolio Optimization: Theory and Application. Cambridge University Press (available online at portfoliooptimizationbook.com).

Installation

To run these exercises, you'll need Python and several libraries. Follow these steps to set up your environment:

  1. Clone this repository:

    git clone [repository-url]
    cd [repository-directory]
  2. Create and activate a virtual environment (optional but recommended):

    python -m venv .venv
    # On Windows
    .venv\Scripts\activate
    # On macOS/Linux
    source .venv/bin/activate
  3. Install the required packages using the requirements.txt file:

    pip install -r requirements.txt

Contents

The repository contains Python scripts implementing solutions to the exercises from Chapter 16:

  • exercise_16_1.py: Classification of spam in emails
  • exercise_16_2.py: Regression of housing prices
  • exercise_16_3.py: Image classification with CNNs
  • exercise_16_4.py: Object detection with Faster R-CNN
  • exercise_16_5.py: Language translation with sequence-to-sequence models
  • exercise_16_6.py: GANs for image synthesis
  • exercise_16_7.py: Handwritten Digit Recognition with CNNs
  • exercise_16_8.py: Linear regression for stock prices
  • exercise_16_9.py: Decision trees for default prediction
  • exercise_16_10.py: Random forests for default prediction
  • exercise_16_11.py: SVMs for stock direction forecast
  • exercise_16_12.py: Comparison of LSTMs vs. transformers with synthetic data
  • exercise_16_13.py: Predicting stock prices using deep learning
  • exercise_16_14.py: Portfolio optimization using deep learning

Each script can be run independently.

About

This repository contains the solutions to the exercises in Chapter 16: "Deep Learning Portfolios" from the book Portfolio Optimization: Theory and Application by Daniel P. Palomar (2025).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages