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$. 
But I have some doubts about this approach: 


*

*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? 

*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? 

*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?
 A: This is more a comment than a solution because, disclaimer, I don't know what the correct solution is. 
The two main approaches I would recommend trying are L2-penalisation LASSO and  dynamic linear models. 
L2-penalisation LASSO model in theory should find the optimal allocation of budget within a limit. In particular I think L2 would be better suited over L1 as L1 tends to result in more 0 coefficient parameters which I am assuming would not be an appropriate solution. The downside here is that it doesn't account for any time dependencies or non-linear relationships. 
Its been a long time since I studied dynamic linear models but my memory is telling me that they can essentially be thought of as a time varying regression model. This would help account for the time series nature but again doesn't help with the budget limits or non-linear relationships. 
Personally I would run both of the above and see if they provide similar solutions. If they do then great thats good evidence for a solution, if they don't then indeed there is a more complicated underlying process for which I personally don't know how to account for :) 
A: First of all you want to combine regression and arima to create a transfer function for each profit center as regression by itself is woefully inadequate to deal with temporal data. Then with a reasonable set of prediction equations that have incorporated latent variables proxied by pulses/level shifts/local time trends ( robust transfer function) you can set out an objective function for optimization given constraints.
