Portfolio optimization - integer constraints and non-convex functions - Python

Job ID: 33375374

Budget: €80 – €130 EUR

I need someone with past experience in portfolio management to write a python optimization script for a portfolio of futures contracts.

The script will need to optimize 2 functions:

Optimization 1 --> Maximize Sharpe ratio (expected return net of transaction costs / Portfolio volatility), given constraints in terms of portfolio risk (within a specified range).

Optimization 2 --> Maximize the following function: DR - a*cost
where:
- DR is the diversification ratio, ie the weighted average volatility of the instruments, divided by the portfolio risk.
- a is constant
- cost is the percentage transaction costs needed to implement the target portfolio
given constraints in terms of portfolio risk (within a specified range) and minimum sharpe ratio.

In both cases, the output variable is the optimal number of contracts to hold for each of the around 300 available instruments. Since we are talking about futures, the variable needs to be integer and can be either positive or negative.

The script shall use a free solver (CPLEX Community free Edition or similar).

I will provide additional details and sample data.