Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portfolio optimization with discrete constraints #9

Closed
rluce opened this issue Jul 20, 2022 · 0 comments · Fixed by #44
Closed

Portfolio optimization with discrete constraints #9

rluce opened this issue Jul 20, 2022 · 0 comments · Fixed by #44

Comments

@rluce
Copy link
Member

rluce commented Jul 20, 2022

Why this Nup?
Many practical aspects of asset allocation are of discrete nature: Minimum buy-in, maximum number of allowed trades per period, market segmentation, etc.

Does it fall under an existing category?

  • Other: finance

What will the API be?

asset_allocs = nupstup.portfolio_optimization(
    factor_matrix=H  # H.T@H is the variance-covariance matrix
    covariance=Sigma  # Sigma is the variance-covariance matrix
    mu=mu  # estimated first moments of return function
    maxnum_transactions=20  # No more than 20 trades
    maxnum_allocations=50  # No more than 50 allocations at a time (e.g., online problem)
    min_invest_long=0.05  # For long allocations, need at least 5% of total investment
    min_invest_short=0.01  # For short allocations, need at least 1% of total investment
    max_total_short=0.1  # Maximum 10% short selling
    [...]

Here the objective function would be min x.T @ H.T @ H @ x - mu @ x

Note that we focus here on the model

min x.T @ H.T @ H @ x - mu @ x
s.t. something

and another NUP should cover the model

max  mu @ x
s.t. something
    x.T @ H.T @ H @ x <= omega^2

Both Nups can share most code and documentation.

Other random thoughts:

@rluce rluce changed the title Portfolio optimization with discrete cosntraints Portfolio optimization with discrete constraints Aug 5, 2022
@rluce rluce transferred this issue from another repository Nov 22, 2022
@simonbowly simonbowly added this to the First public release milestone May 8, 2023
@rluce rluce linked a pull request May 17, 2023 that will close this issue
7 tasks
@rluce rluce closed this as completed in #44 May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants