# 2 – L4 02 What Is Optimization V2

Previously, we studied the set of all portfolios and we know we’re particularly interested in portfolios with the highest possible return given the volatility in returns. How do we find the highest returns then? Well, this is a type of problem known as an Optimization Problem, you may have encountered this before. Intuitively optimization means making something the best possible right? So, what we’re trying to do is find the maximum or minimum of a function. In fact, we can always turn a maximization problem into a minimization one by optimizing the negative of the function. So, we can say that optimization involves, trying to find the minimum of a function. First, let’s look at a simple example of a type you may have seen before, here we’re looking at the function Y equals X minus one squared plus one. This is a quadratic function of one variable X so we know it looks like an upside down U shape a Parabola. We can see that all we have to do to find the location of that minimum is to find the value of X that makes Y the smallest. We will find that point by observing that the graph has a special property at that point. At every other point on the line seems to be either going down or going up, but at that point the line looks basically horizontal. What I’m saying is that every other point the instantaneous slope of the line is some positive or negative number, but at that minimum the instantaneous slope of the line is 0. That is how we will find the point. Now, let’s remember that we know how to get an equation that represents the instantaneous slope of the function, the derivative. So, what we can do to solve for the value of X at this point mathematically, is to take the derivative of the function, set it equal to 0 and solve for X, so let’s do that now. And check it out we got that x equals one, this is one very basic type of optimization problem that can be solved exactly. Later on, we’ll see that there are many complexities we can add to an optimization problem and we’ll require many more methods to solve them. Stay tuned.