Financial Information Management Stefano Grazioli.

Slides:



Advertisements
Similar presentations
Sep-05 Slide:1 VBA in Excel Walter Milner. Sep-05 Slide:2 VBA in Excel Introduction VBA = Visual Basic for Applications Enables end-user programming In.
Advertisements

Modeling using VBA. Covered materials -Userforms -Controls -Module -Procedures & Functions -Variables -Scope.
QUME 185 File Management. 2 Where did I save it? Managing files and folders is one of the most important computer skills The essential skills: Create*
Chapter 41 Sub Procedures, Part II (Continue). Chapter 42 Local Variable A variable declared inside a Sub procedure with a Dim statement Space reserved.
Visual Basic: An Object Oriented Approach 4: Simple Programming in VB.
Promoting Code Reuse Often in programming, multiple procedures will perform the same operation IN OTHER WORDS – the same piece of code will do the same.
VB – Core III Functions Sub-routines Parameter passing Modules Scope Lifetime.
Adding Automated Functionality to Office Applications.
Financial Information Management Managing Financial Information Critical Thinking Business Process Modeling WINIT Control Structures Homework.
Using Data Active Server Pages Objectives In this chapter, you will: Learn about variables and constants Explore application and session variables Learn.
Financial Information Management DBMS and Operations, BI, and Analytics Stefano Grazioli.
Financial Information Management Stefano Grazioli.
Scott Marino MSMIS Kean University MSAS5104 Programming with Data Structures and Algorithms Week 10 Scott Marino.
A First Book of C++: From Here To There, Third Edition2 Objectives You should be able to describe: Function and Parameter Declarations Returning a Single.
Lecture Set 5 Control Structures Part D - Repetition with Loops.
Procedures and Functions Computing Module 1. What is modular programming? Most programs written for companies will have thousands of lines of code. Most.
Chapter 9: Writing Procedures Visual Basic.NET Programming: From Problem Analysis to Program Design.
Financial Information Management Putting VB & SQL To Work Stefano Grazioli.
Financial Information Management Portfolio-level Delta Hedging Stefano Grazioli.
Introduction to VB.NET 2005 Dr. McDaniel IDS4704 Spring 2005.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (there is an audio component to this eLesson) © Dr.
Creating Macros in Excel Adding Automated Functionality to Excel & Office Applications.
ME 142 Engineering Computation I Using Subroutines Effectively.
# 1# 1 Using Procedures and Functions What is a procedure? What is a sub procedure (subroutine)? Built-in functions in your code What is a function? CS.
Lecture 10: Modular Programming (functions) B Burlingame 13 April 2015.
CS241 PASCAL I - Control Structures1 PASCAL Control Structures Modified Slides of Philip Fees.
ME 142 Engineering Computation I Using Subroutines Effectively.
Programming with Microsoft Visual Basic th Edition
Created by Alia Al-Abdulkarim 2008 Visual Basic Vs. Java.
Scope: What’s in a Name? CMSC Introduction to Computer Programming October 16, 2002.
Controlling Program Flow with Decision Structures.
Financial Information Management FIM: Databases Stefano Grazioli.
1 CS 106 Computing Fundamentals II Chapter 28 “Scope” Herbert G. Mayer, PSU CS Status 7/14/2013 Initial content copied verbatim from CS 106 material developed.
More on Variables and Subroutines. Introduction Discussion so far has dealt with self- contained subs. Subs can call other subs or functions. A module.
© Stefano Grazioli - Ask for permission for using/quoting: Stefano Grazioli.
FILE MANAGEMENT NOTES. ACCESSING FLASH DRIVE  Put Flash Drive in the Computer  Start – Computer– Select it.
© Stefano Grazioli - Ask for permission for using/quoting: Source: Excel VBA Programming by John Walkenbach.
Scope. Scope of Names In a small program written by one person, it is easy to be sure that each variable has a unique name In a large program, or one.
Sub Procedures Chapter 6-Part 1. Chapter 6 Part 12 Event Procedures Code that occurs based upon event. Mouse click Got focus Repetitive code that might.
Financial Information Management Options Stefano Grazioli.
Databases Stefano Grazioli.
Control Structures (part II)
Process Automation The Technology
Process Automation The Technology
File Management.
Dynamic SQL Queries Stefano Grazioli.
Procedures Stefano Grazioli.
Exploring Microsoft Office Access 2007
Creating Macros in Excel
Control Structures (part II)
File Management.
Dynamic SQL Queries Stefano Grazioli.
CS285 Introduction - Visual Basic
Process Automation: From models to code
Loops, Subs, & Functions Stefano Grazioli.
Procedures: Functions and Subroutines
Loops, Subs, & Functions Stefano Grazioli.
File Management.
Dynamic SQL Queries Stefano Grazioli.
The structure of programming
Trading Stock and Options in Athens
Dynamic SQL Queries Stefano Grazioli.
File Management.
Implicit Volatility Stefano Grazioli.
Trading Stock and Options in Athens
Hedging Strategies Stefano Grazioli.
Implicit Volatility Stefano Grazioli.
Hedging Strategies Stefano Grazioli.
Functions, Procedures, and Abstraction
Preprocessor Directives and Macros Chapter 21
Presentation transcript:

Financial Information Management Stefano Grazioli

Critical Thinking  Office hours posted on web site  Dreamspark on your Mac  9am on Thu.  VirtualLabs inaccuracies – extra credit  Easy meter

Renaming a Project 1.Unzip & Make a copy of the folder 2.Keep only the folder that contains the.vbproj file and all its contents. Delete the rest. 3.Change the name of that folder to the new name. 4.Click on.vbproj to start VS and change all filenames from inside VS.

You do the talking  Name, Major  Learning objectives  What you like about the class  What can be improved  Attitude towards the Tournament

Financial Information Management Procedures Lasagne and Tagliatelle

SUBroutines are Recipes

Procedures: Sub  A procedure is a named sequence of steps  Purpose: reusing & simplify existing code (reduce total cost)  Good practice:shorter than a single screen  Sometimes it takes arguments  Subs and Functions  “Macro” is an old name for procedure, and it is often used in industry to refer to procedures written for MS applications such as Excel.  A procedure is a named sequence of steps  Purpose: reusing & simplify existing code (reduce total cost)  Good practice:shorter than a single screen  Sometimes it takes arguments  Subs and Functions  “Macro” is an old name for procedure, and it is often used in industry to refer to procedures written for MS applications such as Excel. Public Sub MyProcedure(myNumber As Integer) Dim sum As Integer = 0 For i As Integer = 1 To myNumber sum = sum + i Next ShowTheUser(sum) End Sub Private Sub ShowTheUser(someNum As Integer) Application.ActiveCell.Value = _ "The result is " + someNum.ToString("N0") End Sub

Variables (data)  Variables are names for physical places in your computer memory  Variables have a lifecycle  Variables have a scope  Globals vs Locals  Find the vars in here Globals? Locals?  Variables are names for physical places in your computer memory  Variables have a lifecycle  Variables have a scope  Globals vs Locals  Find the vars in here Globals? Locals? Dim sum As Integer = 0 Public Sub MyProcedure(myNumber As Integer) For i As Integer = 1 To myNumber sum = sum + i Next ShowTheUser() End Sub Private Sub ShowTheUser() Application.ActiveCell.Value = _ "The result is " + sum.ToString("N0") End Sub

Procedures: Functions outputoutput Private Function CalcInterest(r As Double, principal As Double, t As Double) _ As Double Dim interest as Double = 0 interest = principal * ((((1 + r)^t) - 1) return interest End Function  Return a single value  Conceptually similar to the formulas in your worksheets  Return a single value  Conceptually similar to the formulas in your worksheets inputinput

Argument Binding ‘ A function Private Function CalcInterest(r As Double, principal As Double, t As Double) As Double … ‘ No binding myInt = CalcInterest(0.05, 1000, 10) ‘ With binding (typical use) myRate = 0.05 userPrincipal = 1000 years = 10 myInt = CalcInterest(myRate, userPrincipal, years) Often difficult to understand for beginners

Arguments vs. Globals  Arguments are considered a best practice  Arguments have shorter lifecycle -> more efficient  With arguments, changing variables is made more explicit -> less errors  A global is a variable defined outside of a Sub/Function  Use globals if variables have an extended life, are small, and are used by many procedures

Financial Information Management WINIT What Is New In Technology?

Financial Information Management Homework Using Subs & Functions