# Multivariable optimization books

I have some economic data in hand, and I would like to make forecasting out of it (e.g., consumer demand, price elasticity and so on). As far as I understand, these characteristics can be (to some extent) approximated by polynomials. I know about Lagrange interpolation. If there were some data of input variable X and output F(x) I would easily interpolate by Lagrange, and predict F(x) for the future values. But there is a lot of input variables in my data, and I am not sure where to start. How should I analyze this data? Maybe fix some input variables and try to interpolate the rest? Maybe I have not enough data to make these predictions?

So I would like to get some directions on where to start. If you could suggest some books or articles on this subject (preferrably focused on practice), that would be perfect. I know basic algebra and calculus, but haven't worked with optimization and prediction on real data.

UPD. When I asked this on mathoverflow, it was suggested to ask it here, so I apologize for multiple postings. Folks there recommended Ken Judd's Numerical Methods in Economics book, but as far as I get out of Google Books, it is too theoretical for me, because what I want is to solve a practical problem. Ideally, I would like the examples in the books to be solved with Matlab/Mathematica/Excel.

Thank you.

UPD2. Ok, answering a clarification, I would be more specific. I have a data of a production and trade company for some period. It is monthly-tabulated and contains money spent for advertisement in that month (in journals and Internet, let's denote A1 and A2 respectively), good price P for that month, number of good units sold for that month S (filled post-factum). In fact, S = S(A1, A2, P) is a multivariable function. In reality, number of input variables is slightly larger (seasonal changes that affect customers' demand, competitors prices that are also tabulated, let's say up to 6 input variables). What I want to do is to predict S(A1, A2, P) for the coming month given A1, A2, P, i.e. to predict sales.

• The number of existing forecasting methods is huuuuuuuuuge. Even the number of schemes for classifying forecasting methods is huuuuuge. E.g., there are univariate (one series at a time) and multivariate (more than one series) forecasting methods, there are unconditional and conditional forecasting methods, one-step-ahead and multi-step-ahead methods, model-free and model-based methods, methods suitable for discrete-time and continuous-time processes, etc etc. In short, please be a bit more specific as to what you're looking to forecast. – Mico Feb 16 '14 at 7:39
• @Mico, thank you for the comment. I've added some clarification. Does it make more sense now? – George Feb 16 '14 at 13:11

Let me make a couple of observations up front: You're facing two standard problems in forecasting the sales volume of a product.

• First, you probably don't have much information as to whether past fluctuations in sales were due to shifts in the demand curve or the supply curve (or, gasp, both!). E.g., while you appear to have data on the quantity sold and the average selling price of the product -- as well as on two types of advertising expenditures; more on that below -- you probably don't know why prices were low in a given month: Was it because of a deliberate decision by the company to boost the quantities sold by reducing the price at which the product was offered, or was there some slump in overall demand to which the company reacted by reducing the price (or risk losing even more sales). The former case would represent a shift of the supply curve, resulting in a movement along the consumers' demand curve, while the latter case would represent a shift of the demand curve (to which the firm reacts by changing the price, or else risk losing even more sales). This lack of information as to what drove prices and quantities in any given time period is called the Identification problem in econometrics: You observe quantities and prices ex post, but you probably don't know whether any fluctuations were brought about by shifts of the supply curve or the demand curve (or both). Put differently, you're not working with $S=S(A1,A2,P)$, but with $(S,P)=f(A1,A2,\text{many other factors})$, where the "many other factors" are the ones that shift the supply and demand curves.

• Second, you probably can't be sure whether the two advertising expenditure variables are exogenous or not: Are decisions regarding the amounts of advertising to be undertaken each month arrived at independently of the ongoing sales figures, or is advertising done in part to either capitalize on unexpectedly good sales (e.g., do you suddenly find you have an unexpectedly good product and thus want to shift the demand curve out by increasing your advertising expenditures on your hot product?) or to offset some bad publicity about the product (e.g., there may be news about bad side effects about your products, and you need to rush out some PR and other material to keep sales from plummeting)? A moment's reflection will reveal that, ex post, increased advertising is entirely compatible with either increased sales, constant sales, or even declining sales. This is called the endogeneity problem in econometrics. In math notation, instead of $(S,P)=f(A1,A2,\dots)$, you may be dealing with a situation where $(A1,A2)=g(S,P,\dots)$.

In short, if you don't have enough information to solve the identification and endogeneity problems, you need to be aware that any forecasts you make about future quantities and prices are likely to be conditioned on untestable assumptions. This warning does not, of course, mean that you should not engage in forecasting. It does mean, though, that you should try to be as aware as possible regarding any simplifying assumptions you must make (and, hopefully, have a ballpark idea as to what can go wrong if these assumptions turn out to be incorrect).

Assuming you somehow know that the demand function moves little from month to month (a retailer's nirvana!!), you could start by estimating the responsiveness of sales volumes to advertising and price by running a multiple regression with sales as the dependent variable and the two advertising variable and prices as the independent variable. If the coefficients on the first two variables are positive and the coefficient on the price variable is negative, you just may have a reasonably well specified demand equation. If that's the case (a big if...), you could then forecast future sales by plugging in projected advertising expenditures and the target selling price into the demand equation.

Still assuming that this basic demand equation is well specified, you could probably spruce it up by considering the possibility that advertising works non only instantaneously but also with a lag, i.e., that one month's sales depend not only on current but also on lagged advertising expenditures. You could also test whether the coefficients on the two advertising variables are the same or not, i.e., if they have the same marginal effect on sales; if you can't reject the null that the coefficients are the same, some gains in estimation efficiency and correctness of the standard errors of the forecasts will likely be achieved.

Happy forecasting!

• Hi @Mico! Many thanks for the detailed answer! About identification and endogeneity I would say that I am sure about variable dependencies as I have the data logged by the same company I am predicting sales for. So luckily I know how the management responded to consumer demand. According to your suggestion, I did exactly what you told - built a multiple regression. Yep, I got a negative coefficient on advertisement :) And yep, I used difference % in advertisement and price as input variable. I expect it more likely reflects consumers' demand (depending on price/adv changes not absolute value). – George Feb 17 '14 at 8:50
• What I want to try next: 1. Try different time frames. 2. Consider another input variables, maybe find frames where their influence is neglected. – George Feb 17 '14 at 8:55
• 3. Consider lagged advertisement expenditures. What else can I do? Essentially, what I was looking for in the initial question is book where the process of finding a real solution described in practice on real economic data (excluding this var, including this). The book <i>Essential Mathematics for Economic Analysis</i> listed below is anyways too theoretical. I know about linear algebra, etc, but applying it on real data is another story than on a toy problem. – George Feb 17 '14 at 9:10
• Well, you seem to possess the happy combination of adequate math skills and a good grasp of the economics of the situation, which should give you a chance of making sense of the results you're getting. :-) Another thing you may want to consider doing is investigating if the data are nonstationary, by which I mean that they possess either a time trend (a "unit root" in the moving average representation of the series) or a strong seasonal component ("seasonal unit root"). If they do, you may be able to find cointegration among the series either in the long-run or at seasonal frequencies. – Mico Feb 17 '14 at 10:30
• thank you for the encouragement :) I am sorry I cannot upvote you as I don't have enough reputation yet. I will try to advance further on this and show the results in some form. – George Feb 19 '14 at 17:24

You seem to need a grounding in mathematics for economics. for The following book gives that, with emphasize on optimization: http://www.amazon.com/Essential-Mathematics-Economic-Analysis-Edition/dp/0273760688/ref=sr_1_4?ie=UTF8&qid=1392567198&sr=8-4&keywords=mathematics+for+economics

Essential Mathematics for Economic Analysis (4th Edition) by Knut Sydsæter, Peter Hammond, Arne Strøm.

For a more advanced, but still practical, book, have a look at " Convex Optimization " by Stephen Boyd (Department of Electrical Engineering Stanford University)

and

Lieven Vandenberghe (Electrical Engineering Department University of California, Los Angeles)

This last one is currently used as a basis for Stanfords MOOC in convex analysis. It is very practical, but assumes that you master , let us say, all the material in the first referenced book, very well.