• No results found

Data Analysis with Microsoft Excel and Access. FRE Lecture 1

N/A
N/A
Protected

Academic year: 2021

Share "Data Analysis with Microsoft Excel and Access. FRE Lecture 1"

Copied!
32
0
0

Loading.... (view fulltext now)

Full text

(1)

Data Analysis with Microsoft

Excel and Access

(2)

Outline

1. Introduction to Excel and Access capabilities

2. Key features for Economic Analysts, MFRE

3. Excel : Forms (input) and Graphics (output)

4. Excel : VBA and Simulations

5. Access : Demo of Queries

6. Summary

(3)

1.Introduction and Background

Share Background

Excel and Access are tools – learn through practice,

like riding a bike

(4)

Capabilities - Excel

Spreadsheet software for performing calculations and analyzing data

Heavily used everywhere: corporates, govts, non-profits, schools

> 1 million rows and > 16,000 columns, can handle large data sets

Specialized programs such as MatLab, STATA, SAS, SPSS, etc. exist for more

complex analysis

Most people only use a fraction of excel’s full suite of functions

Not unlike using a swiss army knife as a paper-weight

(5)

Capabilities - Access

Relational database software w graphical interface

Most useful for storing huge amounts of data

Data can be ‘accessed’ in a variety of ways

We interact with databases everyday:

Amazon (one of the largest databases in the world)

Google (probably the largest)

Blogs

(6)

Sample

Database

(7)

Excel vs. Access

EXCEL ACCESS A d v a n ta g e

s Easy to learn and use Scalability

Calculations and Analysis Maintaining Data integrity

Variety of Graphical Outputs Versatility of data outputs (reports)

D is a d v a n ta g e

s Difficult to scale w volume Takes more training

Maintenance quickly becomes difficult Overkill if the task is simple or one-time Ranges, Formulas need updating

(8)

2. MFRE-Economic Analysts

You are likely to interact heavily with Excel and to a lesser extent,

Access in your professional career

MS Word, Excel and Powerpoint :

“Tools of the trade” in the professional world

More complex analysis might be done in other programs, but finishing touches usually done in office Suite

MS Access:

• Basic understanding is important as you will download lots of economic data

• Useful when you need to manipulate large datasets

• Crucial if you are an entrepreneur – regardless of whether a brick n mortar establishment or a blogshop

(9)

3. Excel – Inputs

Apart from monkeys typing, Excel can import data (and

even auto-refresh) from a variety of sources:

Databases like MS Access

Web sources

Text files (eg .csv)

Live prices/data from financial databases –

Bloomberg, Reuters, Capital IQ

(10)

Excel – Inputs (Forms)

Helps monkeys input data when there are many columns / fields

Excel’s in-built forms are fairly intelligent

High degree of customization

Formula cells are automatically greyed out (formulas copied down)

Easy to cycle through records

My first excel form in 2006 to track portfolio trades/performance

(11)

Excel – Outputs (Graphics)

Presentation matters – helps to get the message across

Some Tips:

Avoid MS Excel default templates – they look amateurish

Make sure data / lines are in the right sequence

Remove outlines from graphs/charts

Always label axes (plural of axis) and data

(12)

Line Charts: Great for displaying trends

0 200 400 600 800 1000 1200 1400 EUR/MT Rapeseed Oil Gasoil (Diesel) US commissions corn-bioethanol EU commissions vegoil-biodiesel

(13)
(14)

Column Charts good for comparing ‘magnitudes’

0

0.5

1

1.5

2

2.5

3

3.5

4

(15)

Columns: comparing magnitudes across time

5

10

15

20

25

30

35

40

45

50

Top 3 Vegetable Oils World Supply

Rapeseed Oil

Palm Oil

Soybean Oil

(16)

Stacked Columns

10% 20% 30% 40% 50% 60% 70% 80% 90% 100%

Oil/Meal Share by Weight

Waste Meal Oil But 25% less protein than Soy protein 78% 18% 60% 40% $100 $200 $300 $400 $500 $600 $700

Oil/Meal Share by Value

Meal Oil 36% 76% 64% 24% Crush Me for Oil Crush Me for Protein

(17)

4% 6% 8% 10% 12% 14% 16% 40 60 80 100 120 140 160 Biodiesel Share (%) Mil MT Biofuel %

World Oil Production World Biofuel

Biodiesel Share of World Vegetable Oil Demand

(18)

Stacked Area Charts emphasize change in

magnitude over time

(19)

Scatter Plots great for examining relationships

between variables (X and Y)

20 30 40 50 60 Part B

Summer Prep Exam 2 Scores

Preference for T/F

Preference

Long Answer

(20)

4.Excel-Analytics and Simulations

Most crucial functions for the Economic Analyst:

Mathematical

functions

Logical

functions

Lookup/Reference

functions

Statistical

functions

Pivottables

(21)

Excel Upgrades

Data Analysis Toolpak

[File-> Options -> Add-ins]

ASAP Utilities

(good to have) [http://www.asap-utilities.com/]

FRED

(Fed Reserve Bank St Louis) [http://research.stlouisfed.org/fred-addin/] 140,000 + free data series from various sources (e.g. BEA, BLS, Census, OECD)

Developer Tab

(VBA, advanced) [File->Options->Customize Ribbon]

(22)

Excel: Analysis Toolpak

DESCRIPTIVE STATISTICS

Histogram

Descriptive Statistics

Rank and Percentile

HYPOTHESIS TESTING

T-tests

F-test

Z-test: 2 samples for means

Anovas (analysis of variance)

Regression and Correlation

Covariance

Correlation

Regressions:

single and multi- variable

Time Series Forecasting

Moving Average

(23)

Correlations in price movements

Pre vs Post-biofuel legislation

R² = 0.1698

5.00

5.50

6.00

6.50

Ln (RSO)Ln(Rapeseed Oil) vs Ln(Gasoil (Diesel)) 1999-2004

R² = 0.8035

6.00

6.50

7.00

7.50

Ln (RSO) Ln (RSO) vs Ln (GO) 2005-2011

Toolpak: Easy to run regressions

(24)

Rapeseed Oil vs GO and Wheat

(Fuel) (Food) R² = 0.9143 6.00 6.20 6.40 6.60 6.80 7.00 7.20 Regression Predicted

Ln (RSO) = 0.40ln(GO) + 0.385ln(Wheat) +2.0

Jan 05 - Oct 12 Daily data

(25)

Toolpak: Histograms

40 60 80 100 120 140 160 180 200

(26)

Developer Tab - VBA

Excel can interact with Visual Basic programming

Programs are lines of code written to execute repetitive tasks

Excel with VBA allow you to fully leverage the power of a

computer to perform hundreds of thousands of calculations in

the time that you take to write your name

Examples of common repetitive tasks:

Reformatting a large dataset that was downloaded somewhere

Resetting all the sheets in a workbook to a particular template/style

Quick and Dirty Way is to “Record Macro” – which records your

set of actions so that you can repeat them quickly later.

(27)

VBA: Simulations

Monte Carlo Simulations – just a slightly more complex version of the above loops

(28)

Powerpivot

“Don’t Just Crunch Numbers. Crush Them.”

Kinda like a Hybrid between Excel and Access

Computational Power of Excel with Relational Abilities of Access

Unlimited records vs. 1,048,576 for excel

Combine data from multiple tables (like access)

Calculations / Formulas as easy as in excel

Graphing capabilities as in excel

(29)
(30)

5. Access: demo (at end)

Demonstrations:

1. Import Data into table

2. Use Query design to create new table

3. Export table

(31)

6. Summary

Access will help you retrieve and store data from

databases, and help you to manipulate datasets

when necessary

Excel will help you to analyze your data and create

outputs for presentation

List of excel/access resources are available for you at

blogs.ubc.ca/mliew

(32)

Where Excel and Access are not useful

References

Related documents

If you want to convert Excel documents to Microsoft Access you can import the Excel files into Access using its easy to use Spreadsheet Wizard feature.. Transform query result in

With Excel Services Web- enabled access, you can limit what users can view, protecting the underlying data and models.. Excel Services Create fully interactive web

After you create your query and return the data to Excel, Query retrieves the data and provides the Excel workbook with both the query and data source information so you can

a) Identify Ms Excel tools used for data analysis b) Analyze data using the tools.. Ms Excel for Data Analysis.. • Ms Excel provides powerful tools that for data analysis

Before creating an advanced filter, insert at least three rows above your data range and type the column headings you wish to include in your filtered list and the criteria from

In the Create PivotTable dialog box, under Choose the data that you want to analyze section, do the following:.  Select Use an external data source

To print a listing of the contents of your entire database and definitions of any database object -- choose Tools, Analyze, Documentor. This will open a dialog box where you can

Select the column you want to sort by, the value to sort by and the sort order for the first level of sorting6. Click