# Trying to figure out whether a problem is a regression problem, an optimization problem, a time series problem or a hybrid of all three?

I have the following problem:

My business consists of $n$ different departments $D_{1,...,n|Y}$. I want to decide how much money $A_{i|Y}$ I should allocate to each department $D_{i|Y}$ to maximize profit $P_Y$, given that I have decided what my overall budget $B_Y$ for the year is fixed.

I also have historical data of budgets, allocations for each department and profits from past years $1,...,Y-2,Y-1$:

$A_{1|1},...A_{n|1}$, $B_1$, and $P_1$

$A_{1|2},...A_{n|2}$, $B_2$, and $P_2$

....

$A_{1|Y-1},...A_{n|Y-1}$, $B_{Y-1}$, and $P_{Y-1}$

My questions: How to solve this problem? Is this a regression problem, an optimization problem, or some combination of both? and how to account for the times series element from the fact that I am using historical actuals?

Off the top of my head, this looks like an optimization problem:

Given $B_Y$, find the optimal set of allocations $A_{1|Y},...A_{n|Y}$ that maximizes $P_Y$, with the constraint that $\sum{A_{i|Y}}=B_Y$.

Except that I don't have any way of calculating $P_Y = f(A_{1|Y},...A_{n|Y})$.

So finding $f$ is a regression/supervised learning problem.

I'm thinking I might be able to use GLM to find $P_Y = f(A_{1|Y},...A_{n|Y})$ from the historical data, then use Linear Programming to find the optimal $A_{1|Y},...A_{n|Y}$ that maximizes $P_Y$.

1. Is it safe to assume that the relationship between profit and allocations is linear ? How would I know if I can use a linear model?
2. If assume that a linear model doesn't work, and that I have a to use some non linear or non parametric model, then what method can I use to perform the optimization part? Is gradient descent applicable in this case? What other methods are possible?
3. Even if I've answered 1) and 2), I'm still not accounting for the time series factor involved - that I don't a have static regression problem, but a set of values co-varying over time and that time might be a factor in determining $P_Y = f(A_{1|Y},...A_{n|Y})$. How do I account for the effect of time in my model?

Additional thought: How is this related to portfolio optimization in Finance, in the sense that do they share the same mathematical structure?

How would one account for risk in my problem?