A step-by-step guide to prepare Excel to analyze stock portfolios.
  1. Why a Spreadsheet? - Discuss Excel for data analysis, including advantages and disadvantages of spreadsheets.
  2. Versions of Excel - Review Excel setup and discuss appropriate versions.
  3. Add-Ins - Install the Data Analysis ToolPak and Solver Add-In.
  4. Data set - Download a free sample data set.
  5. Why not Programming? - Touch on what happens beyond the spreadsheet.
  6. Next: Return calculations - Learn the three methods for calculating return.

The program is available for free and is actually included in later versions of Microsoft's Excel spreadsheet program for Mac. Solver for Excel 2011 for Mac downloads and installs directly onto the Excel program without any problems or user input required. After opening Excel, the user must go to the add-in area and select the Solver program. Excel free download mac. Productivity downloads - Microsoft Excel by Microsoft and many more programs are available for instant and free download. Solver for Excel 2011 for Mac has the same new features and user interface as Solver for Excel 2010 for Windows -. Solver for Excel 2011 for Mac has. This wikiHow teaches you how to install and enable the Data Analysis tool in your Data toolbar on Microsoft Excel, using a computer. Open the Excel file you want to analyze. Find the Excel file you want to edit on your computer, and open. Download Excel Solver For Mac. Not all add-ins are compatible with Microsoft Excel 2019 on the Mac. This can be done through the installation of a virtual machine.

If you'd like to support FreeLearning Please Consider donating To: Subscribe and hit the bell to see a new video each W.

by Paul Alan Davis, CFA, March 25, 2018
System setup is often a stumbling block, so press on for answers.

~/ home / finance / quant 101 / system setup

Learn to get your Excel system set up for data analysis

Beginner

Watch the Video

Install Excel Data Analysis ToolPak and Solver Add-In (17:27)

Videos are available at one organized Quant 101 Playlist on YouTube (opens in a new browser window).

Video Script

Welcome. Today's goal is to set up our Excel system and cover other helpful topics related to using a spreadsheet for data analysis.

I'm Paul, and I get frustrated by how long it takes to get systems ready before you can get to the fun part, analyzing data.

So here we will walk through the considerations for different operating systems and Excel versions, going step-by-step, to save you time.

If this is your first time with us, this tutorial sits within a series of 30 financial modeling tutorials, called Quant 101. The way it works is I ask you to duplicate all of these models on your system as a way to learn fairly advanced Excel skills and to learn about modeling stocks. So if you are sticking around for that, I will also cover how to download and import a free data set used throughout the series.

For those watching the video on YouTube, if you want to slow all of this down and see the instructions in print, everything I say here is duplicated on a web page. The first link in the video's Description section goes straight to it.

Overview

Let's start with an overview.

First, we will run through advantages and disadvantages of spreadsheets for financial modeling.

Second, we review my setup and cover appropriate versions of our spreadsheet of choice, Excel, for Windows and Mac users.

Third, we will install the Data Analysis ToolPak for statistical analysis and the Solver Add-in for optimization.

Fourth, we cover the one dataset we use throughout the playlist and how to freely download it so you can get started right away.

Fifth, I'll quickly discuss what institutional investors use instead of spreadsheets, meaning statistical programming software and their advantages and disadvantages.

And in our next episode we will review the three methods for calculating returns on stocks.

Step 1 - Why a Spreadsheet?

Before we get started with the technical part, let's take a moment to cover the advantages and disadvantages of spreadsheets which will help us later in our discussion of comparisons with the programming world.

How To Get Solver On Excel

a. Advantages of Spreadsheets

First, for advantages, spreadsheets are:

  1. Pervasive - They are cheap or free and many people in Finance have already memorized many of the functions.
  2. Easy to learn - The grid and cell format, with columns named with letters, and rows named with numbers, make it easy to draw relationships and make quick calculations, even on modestly large data sets, without having to learn programming.
  3. Easy to visualize - The ability to visualize and customize tables, charts, and fonts make spreadsheets a viable tool for creating presentations. After all, there is a comfort level with being able to see, touch and edit the data.
  4. Built-in functionality - Most beginner and intermediate-level financial and statistical operations can be performed in a spreadsheet. In later tutorials you will see how conditional logic can be written in cells. Also Visual Basic for Applications, or VBA, can be programmed to automate common tasks. It is also easy to update cells in a spreadsheet live, like security prices with links to financial data providers.
b. Disadvantages of Spreadsheets

Now, for the disadvantages, spreadsheets are:

  1. Error prone - By many estimates, as many as 80% of all spreadsheets contain errors. Adding rows and columns can invalidate cell references, requiring significant modifications. On top of this, many firms do not train users of spreadsheets even when mission-critical functions reside in their work.
  2. Rarely Audited - Auditing spreadsheets is difficult. The cell-by-cell structure requires a review of each cell to be 100% certain of accuracy. Many large financial organizations build elaborate spreadsheets because the users do not have traditional programming expertise. The programming concept of version control is difficult to maintain with spreadsheets, especially in those used by several people.
  3. Difficult for complex models - While many tables can be stored in a spreadsheet, the relationships and enforcing referential integrity as is done in a database is not as robust here. So complex models can break down in a spreadsheet. There have been several high-profile examples of public firms who incurred large trading losses as a result. In addition, faulty reports from academia have led to similarly embarrassing situations.
  4. Formatting is slow - As you will see, the added flexibility associated with making data look pretty in a spreadsheet can get in the way of being able to quickly generate a chart to visualize statisticial relationships, for example.
c. Why Excel?

So why are we using Excel?

First, a spreadsheet is helpful for organizing and visualizing our analysis, and for learning the concepts before moving on to programming, should that be the path you choose.

Microsoft Excel still leads in market share over Google Sheets and Apple Numbers, however the lead is narrowing.

Any search for technical jobs in the field of Finance will generally require some Excel experience, so this is our spreadsheet of choice.

Step 2 - Versions of Excel

Let's move on to the versions of Excel and operating systems.

a. My setup

On my end, I have a Windows 7 operating system with a local installation of Excel 2010. This obviously isn't the latest version, but any later version should suffice.

b. Versions of Excel for Windows and Mac

For the Mac, common Excel versions include 2011 and 2016. For Windows, currently the versions are named 2010, 2013 and 2016.

Some of the functionality across versions may not be exactly the same, but will be close. Other popular spreadsheet options, like Apple Numbers and Google Sheets are available, but here we won't take the time to translate functions from one to the other.

Step 3 - Excel Add-Ins

Okay, let's get these Add-Ins installed.

a. Set up your spreadsheet

Everyone should run through steps one to four, and if you don't have the necessary Add-Ins installed already, then we will move to Step 3b.

  1. Run Excel locally - First off, run a locally-installed version of Excel, meaning one installed on your hard drive. This will allow you to work while away from the Internet. Also, some advanced functionality, like Solver, is only available on the locally-installed version, as of the time of this recording. So the version of Excel included with online Office 365 may not work for all of your data analysis needs.
  2. Create a working directory - Next, create a working directory for your files. The name doesn't matter, but short names are preferred. Personally, I stay away from spaces and use the underscore character instead.
  3. Create a spreadsheet file for Chapter 2 - Third, a quick comment for those looking to complete our series, I use the convention Quant_101_01_Getting_Started for the name of this Excel spreadsheet file for Chapter 1, but yours doesn't have to be as descriptive. In future tutorials name the tabs the same as mine as it will save time and will help to keep cell references to other tabs straight. It will be much easier to mimic what I'm doing. Also, it is a good idea to use the same columns and rows as me, if you want to make this go a whole lot quicker. You don't need to style your pages with colors and different backgrounds like mine, but it is a good idea to spend some time making it look nice as some day you may want to show off your project to a potential employer.
  4. See which Add-Ins are already running - Fourth, see which Add-Ins are already running. To do this, click on the Data menu and if you see Data Analysis and Solver you are good to go.
b. Install Add-Ins

Now, let's move on to step 3b, and a quick note, the Add-In name for the Data Analysis menu item is called Analysis Toolpak. It provides a variety of statistical functions; including, analysis of variance, correlation, random number generation, regression, t-tests and a z-test.

The menu item Solver is installed using the Add-In named Solver Add-in. We will use it to find a spot on a curve, with x-and-y coordinates, that maximizes the ratio of return over risk, for a portfolio through a technique called optimization.

Now if you don't have these pre-installed on your version of Excel, follow these steps.

  1. See which Add-Ins are running - Click File, Options and Add-Ins.
  2. Manage Add-Ins - Click Manage: with the dropdown Excel Add-Ins, then the Go... button.
  3. Select both Add-Ins - Check boxes for Analysis ToolPak and Solver Add-In, then hit the OK button.
  4. If Solver doesn't show up - Locate and navigate to a directory with the file solver.xlam and click OK.
  5. Validate that Add-Ins are running - Click on the Data menu item and you should see them.

Step 4 - Data set

Let's move on to Step 4 to get that 61-row and 7-column data set.

a. We will use the Returns tab for every chapter

Here, we need to download the data file and create a data tab called Returns. The goal will be to include this data tab with each Chapter file. So basically, you will carry it along with you, attaching the same tab to each spreadsheet, which will prevent us from having long references to other files. Also, creating links and troubleshooting will be much easier.

I should mention this is an available data set with four stocks already selected. Later, in Chapter 2, I will show you how to generate returns should you want to customize your own data set.

b. Download data and create the Returns tab

For now, to get the sample data set, follow these steps:

  1. Navigate to factorpad.com - First, navigate to factorpad.com and follow any of the links to the Quant 101 page which includes descriptive information, some Q&A, download instructions and a link to the outline of the videos.
  2. Review instructions - Where it says Download Data Here review the instructions. You can examine the returns.txt text file with a left-click, and you can see it is a tab-delimited text file, which can be easily imported to Excel.
  3. Save the file - Right-click on the file and all browsers give you the option to Save File As..., which may be worded differently depending on your browser.
  4. Create a Returns tab - Click on the last tab and double-left-click on the name and give it the name Returns and now you have a blank tab.
  5. Open returns.txt - Click File, then Open and then select the file returns.txt to open the Text Import Wizard.
  6. Text Import Wizard - The Text Import Wizard shows the first rows of data and if it is jumbled we need to let Excel know it is delimited so select Delimited and then the Next> button.
  7. Tab-delimited - Excel identified that the file was tab-delimited, so you can now see how it properly aligned the columns for the import, seven in total, the date and six columns of data for each date. If it doesn't say so already, make sure to select Tab-delimited and then click Next>.
  8. Select date format - For the final step, we can instruct Excel to import the first column as a date by changing the toggle to Date and the format MDY identifies the month, day and year. Then click Finish. This creates a new file that you can save using File, then Save As in case there is a problem later.
  9. Copy data to Returns tab - Select the whole range of data and hit the shortcut Ctrl-c, then navigate to the newly created tab, going to cell B6, then use the shortcut Ctrl-v to paste the data. Starting at B6 is important because as you follow along with what I'm doing it will save you time to keep the same cell numbers. Okay, we're all set.
  10. Create a template - As mentioned earlier, we will create a new spreadsheet for each Chapter and carry over that Returns tab for each spreadsheet file. One way to do this is to make a copy of this whole file, calling it template.xlsx. So each time we start a new Chapter, we can just make a copy and the Returns tab is already there for us. This saves us from having links across multiple spreadsheets, which I have found to be more difficult to manage, plus we will run some unique calculations on the tab depending on which Chapter file we are working on.
c. Use decimal place convention

One more note about this data. If you noticed, all returns are in decimal notation. We have to be consistent, or down the road our math will get messy. So we will always keep the data in decimal format, and use cell formatting to present it. So a return that looks like 0.01, is the same as 1%, but we'll always keep it as 0.01. In Excel, you can always visualize it how you like.

Step 5 - Why not programming?

Next, I want answer a question that comes up. Why not teach the series with programming instead of a spreadsheet?

Earlier we covered advantages and disadvantages of spreadsheets. This series intentionally uses a small data set so we can benefit from several of those advantages from earlier. This means we can visualize and work with the data to learn the concepts, without having to write code.

In the real world this is done with a statistical analysis package like MatLab, R and Stata, or straight in traditional programming languages like Python, Java or C.

Our sample data set covers returns for four stocks, an index and Treasury Bills over monthly periods for five years. Imagine how large the data set would be if you covered 5,000 stocks and daily returns, and this leads us to a discussion of the advantages and disadvantages of programming, because if you want to take your knowledge further, to the Institutional level, then understanding how this is done at scale is important.

a. Advantages of programming

Programming has the follow advantages.

  1. Higher pay - Learning these same concepts in a programming language might double your salary versus what you could do in a spreadsheet. Institutional-level firms are willing to pay for this.
  2. Version control - Programming allows you to hold everything constant, roll-back updates and maintain all of the code in one working state called a release. Similar to when those Apps on your phone update. Rather than code being in a constant state of change, version control allows for a clean version to be published, then another round of work can be started on another version, which helps to isolate bugs.
  3. User input validation - Programming also allows you to validate the data input by the user. Think about how Excel was written to protect users from coding. Everything you do in Excel – a drop down menu, a dialog box, a formula bar – sits on code. Almost every communication device you use – a phone, a tablet, a computer – is built in code that prevents you from making mistakes. Your brokerage accounts, bank accounts and social media Apps are all written to ensure that everyone follows the rules.
  4. Speed - Speed is a factor as well as statistical programming languages can help you analyze big data quickly.
  5. Repetition - Through looping, like in a monte carlo simulation, you can run hundreds, or thousands, of cases through automation.
b. Disadvantages of programming

Of course programming also has disadvantages.

  1. Steep learning curve - It can take years to learn and implement these concepts in a programming language.
  2. Less standardization - There are a variety of programs, versions and interfaces people use in programming so there are fewer experts to focus on the improvement of one program. This is especially the case with open-source software.
  3. Cost - The cost associated with an implementation using programming is much higher when you consider the cost of retaining talent, planning and rolling out releases, versus ad-hoc analysis performed in a spreadsheet.
  4. No GUI - Giving up the graphical user interface is a major hurdle for most people and focusing instead on learning the ins-and-outs of a programming language by editing text files is a reason Data Scientists and Financial Engineers are in such high demand.
Summary

So to summarize, we discussed spreadsheets and why they're well-suited for our first exploration of quantitative equity portfolio management.

Download Solver Add In Excel

We discussed Excel, set up the required Add-Ins then imported a sample data set and created a template for future chapters.

Excel

Then we closed with what our next steps could be, with programming, should you have a passion for portfolio management and want to take your career to the next level.

How To Download Solver For Mac Excel

Step 6 - Next: System Setup

In the next episode we will start Chapter 2, with our Returns tab in place and start walking through 3 methods for calculating return: arithmetic, geometric and logarithmic.

Feel free to join us at any time, and have a nice day.

What's Next?

This text was written to be used in conjunction with freely-accessible videos on YouTube.

I encourage you to check out our YouTube Channel. Subscribe straight from here.

  • To access all tutorials, click Outline.
  • For the introduction to the series, click Back.
  • For return calculation methods, click Next.

~/ home / finance / quant 101 / system setup

Introduction: How to Use the Solver Tool in Microsoft Excel

The purpose of this guide is to introduce people to the computer program Microsoft Excel. We will specifically be focusing on the solver tool aspect of the program and how users can use it to their advantage. This guide will cover all parts of the solver tool function and a step-by-step guide on how to use it. In Microsoft Excel, Solver is part of a category of commands called what-if analysis tools. The Solver is an add-in for Microsoft Excel which is used for the optimization and simulation of business and engineering models. It solves complex linear and non linear problems. With Solver, you can find an optimal (maximum or minimum) value for a formula in one cell. This is called the objective cell, which is subject to constraints, or limits, on the values of other formula cells on a worksheet. Solver works with a group of cells also called decision variable cells, that participate in figuring out the formulas in the objective and constraint cells. Solver adjusts the values in the decision variable cells to satisfy the limits on constraint cells and produce the result you want for the objective cell. Now lets open up Excel and get started!

Step 1: How to Download & Enable Solver Add-in in Excel.

The solver add-in is included by default in Microsoft Excel but is disabled until the user enables it for use. There are a few easy steps required to enable solver. To enable it, you fist need to click on the file menu and then go to the options tab. Next, the excel options box will come up, click on the solver add-in located under the add-ins heading and make sure it is highlighted in blue. Now, click the go box, which is located in the manage excel add-ins at the bottom of the excel options screen. After you have clicked go the add-ins box will come up. In the add-ins box check the box next to solver add-in, which is located under the add-ins available heading, and then click the okay button. Now that solver has been enabled you will need to know how to locate it for use. Open up excel and go to the data tab and click it, and all the way to the right solver is located under analysis.

Step 2: Example Function

Excel Solver is used by engineers and mathematicians to solve a large variety of mathematical equations and systems. Solver is equipped with functions that allow users to find the root/solution of an equation. A simple function is given below as an example problem where someone would wish to find the root of the function. The function is: y = 2x^2 + 3x – 4. Solver will solve the equation for 0, i.e. 2x^2 + 3x -4 = 0, as anyone would normally do by hand. In the following illustration, the first step of all excel solutions is to properly define the function that is being solved. The second step is to assign the variable of the function to one specific cell. Assign the variable x to the cell B1 by typing x= in cell A1 and typing nothing in cell B1. Define the function in cell B2 by typing f(x)= in cell A2 and typing =2*B1^2+3*B1-4 in cell B2. Cell B1 plays the part of x in the formula, and by changing the values in cell B1, you will notice that the results of the function will change. The goal is to have cell B1 vary the value of x until the cell B2 (the function) is 0.

Step 3: Understanding the Solver Parameters Box

Once you click the Solver option, the Solver Parameters dialogue box will appear. Once here, you will need to specify the parameters in order to run the solver. These parameters will vary depending upon your problem. The Set Target Cell box should contain the cell location of the objective function for the problem under consideration. Max or min may be selected for finding the maximum or minimum of the set target cell. If value is selected, the Solver will attempt to find a value of the target Cell equal to whatever value is placed in the box just to the right of this selection. The Cells box should contain the location of the decision variables for the problem. Finally, the constraints must be specified in the Subject to the Constraints box by clicking on Add. Change allows you to modify a constraint already entered and delete allows you to delete a previously entered constraint. Reset all clears the current problem and resets all parameters to their default values. Options brings up the Solver options dialogue box. The guess selection is not particularly useful for our purposes and will not be discussed here.

Step 4: Setting the Target Cell and Equal To

With Solver, you can find an optimal values or solutions for a formula in one cell. This cell is called the target cell. The target cell will represent the objective or goal. If a scenario in which the production manager of a firm would presumably want to maximize the profitability of the Product during each month, the target cell would be used. Now, back to the example function problem given in step 2: y = 2x^2 + 3x – 4.
Set Target Cell: Solver is asking you to identify the position of the function you wish to solve. In this example the function was placed in the cell B2. After step 2 has been completed go to solver and click on it. The solver parameters dialogue box will pop up. To set the target cell you must use the proper symbols that excel understands, you cannot type in B2. To set the target cell correctly you must type in $B$2.
Set Equal To: The equal to option allows you to identify the operation you wish to carry out with your chosen function. The options that equal to gives are max, min, value. Max would be if you were looking for the maximum value of a function, and min would be used to find the minimum value of a function. The Value option if for you to select the value you want the equation to be solved for. In the given example from step 2, the function is meant to take on the value of 0. Go to equal to, then select value of: and type 0 in the box next to it.

Step 5: Setting the Changing Cells and Solving

Set By Changing Cells: Changing cells can also be called variable cells, because their main purpose is to identify the cells that contain the variables of the function. In the given example from step 2, B1 is the cell containing the value of the variable x. Go to the box under by changing cells and type in $B$1, do not forget the $ symbols or excel will not understand. Finally, click solve at the bottom of the solve parameters dialogue box and click solve. Solver will now perform the operation you asked it to and will give you the solution x=0,850781. The solution will appear in cell B1.

Be the First to Share

Recommendations

7 194
Retro Analog Audio VU Meter From Scratch! in Audio
OPA Based Alice Microphones: a Cardioid and a Figure 8 in Audio
34 2.2K
  • The 1000th Contest

  • Battery Powered Contest

  • Hand Tools Only Challenge