Your book holds n assets with weights w0. Risk tracks k linear exposures of the book (net exposure, beta, sector exposures), written as A w with a k x n matrix A, and has told you where they have to be by end of day: a vector b of target exposures. The book is not there: A w0 != b.
Find the trade Delta that moves the book to the targets, A (w0 + Delta) = b, with the smallest possible risk Delta^T Sigma Delta, where Sigma is the covariance matrix of daily returns. Sigma is not disclosed; you are given T days of past returns of the n assets, drawn independently from a multivariate normal distribution with covariance Sigma.
The first line contains n, T and k. The second line contains the n weights w0. Each of the next k lines contains one exposure: the n entries of a row of A, followed by the corresponding target entry of b. Each of the next T lines contains the n returns of one day, with 6 digits after the decimal point.
n real numbers: the trade Delta, one value per asset.
An output is rejected (score 0) unless it has exactly n finite values and every target is met: |A (w0 + Delta) - b| <= 1e-6 in each row. Otherwise the case score is
score = V_min / V
where V = Delta^T Sigma Delta is the risk of your trade under the true Sigma and V_min is the smallest risk of any trade that meets the targets. The total score is the mean over the cases.
15 <= n <= 30
10 n <= T <= 15 n
2 <= k <= 4
The rows of A are linearly independent, and A w0 != b in every case.