jankrepl / jankrepl/deepdow

Rescale allocation layer

Open
#102 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.2k
Forks
170
PR merge metrics
No merged PRs in 30d

Description

Numerical allocation layers (e.g. `NumericalMarkowitz`) might generate weights that do not satisfy the constraints. There are the following reasons for it
* small floating point differences (e.g. w_i=-1e-8 with **w>=0** constraint)
* algorithm did not converge and the underlying solver did not raise any exception

It can become an issue when using a loss that is not defined for certain values of **w**.

The cleanest solution would be to have a new allocation layer that would be called after the original allocation layer. Ideally,
it would do the following
* Perform checks and potentially raise exception
* Rescale weights to satisfy the original constraints

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the allocation-layer entry point and the NumericalMarkowitz implementation mentioned in the issue, then inspect how constraints and solver convergence are currently handled. Done means a post-allocation layer checks constraint violations, handles unconverged results, and rescales weights where possible without accepting invalid values.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
fintech-quant
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.