Black Scholes Pricing Model European Option on Dividend paying Stock

Size: px
Start display at page:

Download "Black Scholes Pricing Model European Option on Dividend paying Stock"

Transcription

1 Black Scholes Pricing Model European Option on Dividend paying Stock This is a C++ implementation of the famous Black Scholes options pricing model for a European option on a dividend paying stock. The model calculates the price, as well as the hedging parameters ( the Greeks ). The price for a call option is calculated as, For a put option, where, S is the price of the underlying stock, K is the strike price, q is the dividend yield, T is the time until maturity (in years), σ is the volatility of the underlying stock, r is the risk-free interest rate, and N(z) represents the cumulative standard normal probability distribution function and is given by, and N (z) is given by, The hedge parameters, also known as the Greeks, are given by Delta Theta Call Put Gamma Vega Rho

2 The interface file for the class EuropeanOption //EuropeanOption.h #ifndef EuropeanOption_h #define EuropeanOption_h #include<string> using namespace std; class EuropeanOption public: EuropeanOption(); EuropeanOption(const double& _S0, const double& _K, const double& _r, const double& _q, const int& _T, const double& vol, const string& type); EuropeanOption(const EuropeanOption& euroopt2); virtual ~EuropeanOption(); EuropeanOption& operator = (const EuropeanOption& euroopt2); //cumulative normal distribution functions double N(double z) const; double Nprime(double z) const; //helper functions double callprice() const; double putprice() const; //helper functions for sensitivities double calldelta() const; double putdelta() const; double calltheta() const; double puttheta() const; double Gamma() const; double Vega() const; double callrho() const; double putrho() const; //functions that contain price, sensitivities double NPV() const; double delta() const; double theta() const; double gamma() const; double vega() const; double rho() const;

3 ; private: double S0; double K; double r; double q; int T; double sigma; string opttype; //underlying stock price //strike price //risk-neutral interest rate; //dividend yield //time to maturity (in years) //volatility //option type (call, put) #endif The implementation of the class EuropeanOption. //EuropeanOption.cpp #ifndef EuropeanOption_cpp #define EuropeanOption_cpp #include<string> #include<math.h> #include "EuropeanOption.h" using namespace std; EuropeanOption::EuropeanOption() S0 = 50.0; K = 50.0; r = 0.04; q = 0.1; T = 2; sigma = 0.35; opttype = "call"; EuropeanOption::EuropeanOption(const double& _S0, const double& _K, const double& _r, const double& _q, const int& _T, const double& vol, const string& type) : S0(_S0), K(_K), r(_r), q(_q), T(_T), sigma(vol), opttype(type) EuropeanOption::EuropeanOption(const EuropeanOption& eopt2) S0 = eopt2.s0; K = eopt2.k;

4 r = eopt2.r; q = eopt2.q; T = eopt2.t; sigma = eopt2.sigma; opttype = eopt2.opttype; EuropeanOption::~EuropeanOption() EuropeanOption& EuropeanOption::operator = (const EuropeanOption& euroopt2) if (this == &euroopt2) return *this; S0 = euroopt2.s0; K = euroopt2.k; r = euroopt2.r; q = euroopt2.q; T = euroopt2.t; sigma = euroopt2.sigma; opttype = euroopt2.opttype; return *this; double EuropeanOption::N(double z) const if (z > 6.0) return 1.0; if (z < -6.0) return 0.0; double b1 = ; double b2 = ; double b3 = ; double b4 = ; double b5 = ; double p = ; double c = ; double a = fabs(z); double t = 1.0/(1.0+a*p); double b = c*exp((-z)*(z/2.0)); double n = ((((b5*t+b4)*t+b3)*t+b2)*t+b1)*t; n = 1.0-b*n; if (z < 0.0) n = n; return n;

5 double EuropeanOption::Nprime(double z) const return (1.0/sqrt(2* ))*exp((pow(-z,2))/2); double EuropeanOption::callPrice() const return S0*exp(-q*T)*N(d1)-K*exp(-r*T)*N(d2); double EuropeanOption::putPrice() const return K*exp(-r*T)*N(-d2)-S0*exp(-q*T)*N(-d1); double EuropeanOption::callDelta() const return exp(-q*t)*n(d1); double EuropeanOption::putDelta() const return exp(-q*t)*(n(d1)-1); double EuropeanOption::callTheta() const return (-(S0*Nprime(d1)*sigma*exp(-q*T))/(2*sqrt(T)))+ (q*s0*n(d1)*exp(-q*t))-(r*k*exp(-r*t)*n(d2)); double EuropeanOption::putTheta() const

6 return (-(S0*Nprime(d1)*sigma*exp(-q*T))/(2*sqrt(T)))- (q*s0*n(-d1)*exp(-q*t))+(r*k*exp(-r*t)*n(-d2)); double EuropeanOption::Gamma() const return (Nprime(d1)*exp(-q*T))/(S0*sigma*sqrt(T)); double EuropeanOption::Vega() const return S0*sqrt(T)*Nprime(d1)*exp(-q*T); double EuropeanOption::callRho() const return K*T*exp(-r*T)*N(d2); double EuropeanOption::putRho() const return -K*T*exp(-r*T)*N(-d2); double EuropeanOption::NPV() const return callprice(); return putprice(); double EuropeanOption::delta() const return calldelta();

7 return putdelta(); double EuropeanOption::theta() const return calltheta(); return puttheta(); double EuropeanOption::gamma() const return Gamma(); double EuropeanOption::vega() const return Vega(); double EuropeanOption::rho() const return callrho(); return putrho(); #endif

Lecture 8. Xiaoguang Wang. February 13th, 2014 STAT 598W. (STAT 598W) Lecture 8 1 / 47

Lecture 8. Xiaoguang Wang. February 13th, 2014 STAT 598W. (STAT 598W) Lecture 8 1 / 47 Lecture 8 Xiaoguang Wang STAT 598W February 13th, 2014 (STAT 598W) Lecture 8 1 / 47 Outline 1 Introduction: C++ 2 Containers 3 Classes (STAT 598W) Lecture 8 2 / 47 Outline 1 Introduction: C++ 2 Containers

More information

Joint Default Probability using the Gaussian Copula Method

Joint Default Probability using the Gaussian Copula Method Joint Default Probability using the Gaussian Copula Method Below is an implementation of the Gaussian Copula function in C++. The bivariate Gaussian Copula is used to model the dependence and joint behavior

More information

NAG Library Function Document nag_bsm_greeks (s30abc)

NAG Library Function Document nag_bsm_greeks (s30abc) s Approximations of Special Functions s30abc 1 Purpose NAG Library Function Document nag_bsm_greeks (s30abc) nag_bsm_greeks (s30abc) computes the European option price given by the Black Scholes Merton

More information

NAG Library Function Document nag_bsm_price (s30aac)

NAG Library Function Document nag_bsm_price (s30aac) s Approximations of Special Functions s30aac NAG Library Function Document nag_bsm_price (s30aac) 1 Purpose nag_bsm_price (s30aac) computes the European option price given by the Black Scholes Merton formula.

More information

NAG Library Function Document nag_asian_geom_greeks (s30sbc)

NAG Library Function Document nag_asian_geom_greeks (s30sbc) 1 Purpose NAG Library Function Document nag_asian_geom_greeks () nag_asian_geom_greeks () computes the Asian geometric continuous average-rate option price together with its sensitivities (Greeks). 2 Specification

More information

Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Fall 2017 Instructor: Dr. Sateesh Mane.

Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Fall 2017 Instructor: Dr. Sateesh Mane. 1 Project Part 1 1.1 Abstract base class Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Fall 2017 Instructor: Dr. Sateesh Mane Let us begin our grand adventure!

More information

CSE 303 Lecture 23. Inheritance in C++ slides created by Marty Stepp

CSE 303 Lecture 23. Inheritance in C++ slides created by Marty Stepp CSE 303 Lecture 23 Inheritance in C++ slides created by Marty Stepp http://www.cs.washington.edu/303/ 1 Case study exercise Represent a portfolio of a person's financial investments. Every asset has a

More information

CS 1337 Computer Science II Page 1

CS 1337 Computer Science II Page 1 Source File: ~/1337/65/lab65.(C CPP cpp c++ cc cxx cp) Input: Under control of main function Output: Under control of main function Value: 3 The purpose of this assignment is to add to the implementation

More information

R/QuantLib Integration

R/QuantLib Integration A free/open-source library for quantitative finance R/QuantLib Integration Klaus Spanderen, R/Finance 2013 The QuantLib Project Overview A free/open source library for quantitative finance under a very

More information

NAG Library Function Document nag_asian_geom_price (s30sac)

NAG Library Function Document nag_asian_geom_price (s30sac) s Approximations of Special Functions s30sac 1 Purpose NAG Library Function Document nag_asian_geom_price (s30sac) nag_asian_geom_price (s30sac) computes the Asian geometric continuous average-rate option

More information

FREE CONCERTS IN PAVILIO N.

FREE CONCERTS IN PAVILIO N. - 8 -» * /«>»*? - - * 6 * * - > 8< * * 77 < * * ««* ( 7 98 * «9 «8 [ 6 8 - «(» «* z-- < * ( * -»- «-?-- - * ]«-

More information

Lab 2: ADT Design & Implementation

Lab 2: ADT Design & Implementation Lab 2: ADT Design & Implementation By Dr. Yingwu Zhu, Seattle University 1. Goals In this lab, you are required to use a dynamic array to design and implement an ADT SortedList that maintains a sorted

More information

Shahram Rahatlou. Static Data Members Enumeration std::pair, std::vector, std::map. Computing Methods in Physics

Shahram Rahatlou. Static Data Members Enumeration std::pair, std::vector, std::map. Computing Methods in Physics Static Data Members Enumeration std::pair, std::vector, std::map Shahram Rahatlou Computing Methods in Physics http://www.roma1.infn.it/people/rahatlou/cmp/ Anno Accademico 2018/19 Class Datum Use static

More information

Introduction to Matlab GPU Acceleration for. Computational Finance. Chuan- Hsiang Han 1. Section 1: Introduction

Introduction to Matlab GPU Acceleration for. Computational Finance. Chuan- Hsiang Han 1. Section 1: Introduction Introduction to Matlab GPU Acceleration for Computational Finance Chuan- Hsiang Han 1 Abstract: This note aims to introduce the concept of GPU computing in Matlab and demonstrates several numerical examples

More information

UEE1303(1070) S12: Object-Oriented Programming Constant Pointer and Class

UEE1303(1070) S12: Object-Oriented Programming Constant Pointer and Class UEE1303(1070) S12: Object-Oriented Programming Constant Pointer and Class What you will learn from Lab 4 In this laboratory, you will learn how to use const to identify constant pointer and the basic of

More information

COP4530 Data Structures, Algorithms and Generic Programming Recitation 4 Date: September 14/18-, 2008

COP4530 Data Structures, Algorithms and Generic Programming Recitation 4 Date: September 14/18-, 2008 COP4530 Data Structures, Algorithms and Generic Programming Recitation 4 Date: September 14/18-, 2008 Lab topic: 1) Take Quiz 4 2) Discussion on Assignment 2 Discussion on Assignment 2. Your task is to

More information

Spring 2017 FRE-GY 6883 Financial Computing Song Tang, Ph.D

Spring 2017 FRE-GY 6883 Financial Computing Song Tang, Ph.D Spring 2017 FRE-GY 6883 Financial Computing Song Tang, Ph.D. st290@nyu.edu, 646-283-4578 Overview: This course covers programming applications to financial engineering, including C++ and Java and the various

More information

Checklist for member using Empanelled Vendor CTCL

Checklist for member using Empanelled Vendor CTCL Checklist for member using Empanelled Vendor CTCL Vendor/Member: Product Name: Version:- Module Validation Checklist CTCL IBT/STWT Status General All transactions must be secure (using SSL encryption)

More information

17 pages 1. Option_Eqd * option_eqd_create_forwardstart(int am_,int product_,int product_type_, double S0_, double K_, double T_, double t_start_

17 pages 1. Option_Eqd * option_eqd_create_forwardstart(int am_,int product_,int product_type_, double S0_, double K_, double T_, double t_start_ 17 pages 1 Help #include #include #include #include #include #include #include "finance_tool_box.h" #include "pnl/pnl_finance.h" #include "pnl/pnl_mathtools.h"

More information

CS 225. Data Structures

CS 225. Data Structures CS 5 Data Structures 1 2 3 4 5 6 7 8 9 10 11 #include using namespace std; int main() { int *x = new int; int &y = *x; y = 4; cout

More information

การทดลองท 8_2 Editor Buffer Array Implementation

การทดลองท 8_2 Editor Buffer Array Implementation การทดลองท 8_2 Editor Buffer Array Implementation * File: buffer.h * -------------- * This file defines the interface for the EditorBuffer class. #ifndef _buffer_h #define _buffer_h * Class: EditorBuffer

More information

PIC 10A. Lecture 17: Classes III, overloading

PIC 10A. Lecture 17: Classes III, overloading PIC 10A Lecture 17: Classes III, overloading Function overloading Having multiple constructors with same name is example of something called function overloading. You are allowed to have functions with

More information

CSCE 110 PROGRAMMING FUNDAMENTALS

CSCE 110 PROGRAMMING FUNDAMENTALS CSCE 110 PROGRAMMING FUNDAMENTALS WITH C++ Prof. Amr Goneid AUC Part 15. Dictionaries (1): A Key Table Class Prof. amr Goneid, AUC 1 Dictionaries(1): A Key Table Class Prof. Amr Goneid, AUC 2 A Key Table

More information

KBC Securities Trader

KBC Securities Trader KBC Securities Trader Welcome! This guide introduces you to the main functionality and possibilities of KBC Securities Trader. For more detailed information on each window, press F1 for Help or right-click

More information

Visual Identity Guidelines. Abbreviated for Constituent Leagues

Visual Identity Guidelines. Abbreviated for Constituent Leagues Visual Identity Guidelines Abbreviated for Constituent Leagues 1 Constituent League Logo The logo is available in a horizontal and vertical format. Either can be used depending on the best fit for a particular

More information

Market Tracker Quick reference Guide

Market Tracker Quick reference Guide Dear Customer, Thank you for Choosing Market Tracker. Congratulations! You have taken an important step in the right direction towards successful Investing. Market Tracker is a powerful and feature rich

More information

(1) (2) (3) (4) C32 := u^2 * d^2 * S; C10 := d^2 * S; C23 := u^3 * S; C22 := u^2 * d * S; C20 := d^3 * S; C34 := u^4 * S; C33 := u^3 * d * S;

(1) (2) (3) (4) C32 := u^2 * d^2 * S; C10 := d^2 * S; C23 := u^3 * S; C22 := u^2 * d * S; C20 := d^3 * S; C34 := u^4 * S; C33 := u^3 * d * S; ud:=proc(r,h,del,sig) global u,d; u:=evalf(exp((r-del)*h+sig*sqrt(h))); d:=evalf(exp((r-del)*h-sig*sqrt(h))): end proc; ud := proc r, h, del, sig global u, d; u := evalf exp r del * h sig * sqrt h ; d

More information

MATH49111/MATH69111 Mini Projects Part 1

MATH49111/MATH69111 Mini Projects Part 1 MATH49111/MATH69111 Mini Projects Part 1 ii Contents Guidelines Deadlines v vii 1 Ordinary Differential Equations 1 1.1 Solving ODE Boundary Value Problems....................... 1 1.1.1 The initial value

More information

We learned how to use

We learned how to use User-dened types We learned how to use vector, string, fstream, stringstream. Using these new types has made as much more productive C++ programmers. Writing our own types is the next step. The

More information

Lecture 7. Log into Linux New documents posted to course webpage

Lecture 7. Log into Linux New documents posted to course webpage Lecture 7 Log into Linux New documents posted to course webpage Coding style guideline; part of project grade is following this Homework 4, due on Monday; this is a written assignment Project 1, due next

More information

Defining Class Functions.

Defining Class Functions. Defining Class Functions Definition and Use //fraction.h #ifndef FRACTION_H #define FRACTION_H class Fraction public: void readin(); void print(); Fraction reciprocal(); void unreduce(const int m); private:

More information

CS 225. Data Structures. Wade Fagen-Ulmschneider

CS 225. Data Structures. Wade Fagen-Ulmschneider CS 225 Data Structures Wade Fagen-Ulmschneider 5 6 7 8 9 10 11 int *x; int size = 3; x = new int[size]; for (int i = 0; i < size; i++) { x[i] = i + 3; delete[] x; heap-puzzle3.cpp Upcoming: Theory Exam

More information

Project structure - working with multiple les

Project structure - working with multiple les Project structure - working with multiple les Declaration and denition Recall the dierence between declaration... double max( double a, double b ); and denition... double max( double a, double b ) { if

More information

CS 225. Data Structures. Wade Fagen-Ulmschneider

CS 225. Data Structures. Wade Fagen-Ulmschneider CS 225 Data Structures Wade Fagen-Ulmschneider 11 15 16 17 18 19 20 21 22 23 24 /* * Creates a new sphere that contains the exact volume * of the volume of the two input spheres. */ Sphere joinspheres(const

More information

1 >> Lecture 4 2 >> 3 >> -- Graphics 4 >> Zheng-Liang Lu 184 / 243

1 >> Lecture 4 2 >> 3 >> -- Graphics 4 >> Zheng-Liang Lu 184 / 243 1 >> Lecture 4 >> 3 >> -- Graphics 4 >> Zheng-Liang Lu 184 / 43 Introduction ˆ Engineers use graphic techniques to make the information easier to understand. ˆ With graphs, it is easy to identify trends,

More information

this Pointer, Constant Functions, Static Data Members, and Static Member Functions this Pointer (11.1) Example of this pointer

this Pointer, Constant Functions, Static Data Members, and Static Member Functions this Pointer (11.1) Example of this pointer this Pointer, Constant Functions, Static Data Members, and Static Member Functions 3/2/07 CS250 Introduction to Computer Science II 1 this Pointer (11.1) functions - only one copy of each function exists

More information

recruitment Logo Typography Colourways Mechanism Usage Pip Recruitment Brand Toolkit

recruitment Logo Typography Colourways Mechanism Usage Pip Recruitment Brand Toolkit Logo Typography Colourways Mechanism Usage Primary; Secondary; Silhouette; Favicon; Additional Notes; Where possible, use the logo with the striped mechanism behind. Only when it is required to be stripped

More information

Appendix 1 Object-oriented Fundamentals

Appendix 1 Object-oriented Fundamentals Appendix 1 Object-oriented Fundamentals A1.1 INTRODUCTION AND OBJECTIVES In this appendix we give a short introduction to the object-oriented programming model (also known as the object-oriented paradigm).

More information

Lecture 14. Xiaoguang Wang. March 11th, 2014 STAT 598W. (STAT 598W) Lecture 14 1 / 36

Lecture 14. Xiaoguang Wang. March 11th, 2014 STAT 598W. (STAT 598W) Lecture 14 1 / 36 Lecture 14 Xiaoguang Wang STAT 598W March 11th, 2014 (STAT 598W) Lecture 14 1 / 36 Outline 1 Some other terms: Namespace and Input/Output 2 Armadillo C++ 3 Application (STAT 598W) Lecture 14 2 / 36 Outline

More information

Program template-smart-pointers-again.cc

Program template-smart-pointers-again.cc 1 // Illustrate the smart pointer approach using Templates 2 // George F. Riley, Georgia Tech, Spring 2012 3 // This is nearly identical to the earlier handout on smart pointers 4 // but uses a different

More information

Binomial pricer (1.1)

Binomial pricer (1.1) 1 Binomial pricer 1.1 Program shell 1.2 Entering data 1.3 Functions 1.4 Separate compilation 1.5 CRR pricer 1.6 Pointers 1.7 Function pointers 1.8 Taking stock In the binomial model the prices of assets

More information

Inheritance and Polymorphism

Inheritance and Polymorphism Inheritance and Polymorphism 1 Inheritance extending a clock to an alarm clock deriving a class 2 Polymorphism virtual functions and polymorphism abstract classes MCS 360 Lecture 8 Introduction to Data

More information

Excellence in Community Service & Philanthropy

Excellence in Community Service & Philanthropy Excellence in Community Service & Philanthropy 2013-2014 Excellence in Community Service & Philanthropy The chapter provides members with opportunities to learn about the importance of civic engagement

More information

Fraternity and Sorority Leadership Change Form

Fraternity and Sorority Leadership Change Form Fraternity and Sorority Leadership Change Form Fraternity and sorority outgoing presidents: Please complete this form within 48 hours of chapter elections or if your organization has any officer changes.

More information

Growing Our Own Through Collaboration

Growing Our Own Through Collaboration NWI INITIATIVE NUCLEAR WORKFORCE Growing Our Own Through Collaboration BRAND STANDARDS reference guide Brand Standards 2011 SRS Community Reuse Organization. All rights reserved. Version 1.0-02.10.2011

More information

Investnet User Manual INVESTNET USER MANUAL. Powered by FLIP 1

Investnet User Manual INVESTNET USER MANUAL. Powered by FLIP 1 INVESTNET USER MANUAL Powered by FLIP 1 Powered by FLIP 2 CONTENTS Investnet User Manual 1 SYSTEM OVERVIEW... 4 1.1 GENERAL LAYOUT... 4 2 FILE MENU... 5 2.1 CHANGE PASSWORD... 5 2.2 LOGIN HISTORY... 6

More information

OBJECT ORIENTED PROGRAMMING USING C++

OBJECT ORIENTED PROGRAMMING USING C++ OBJECT ORIENTED PROGRAMMING USING C++ 1 Slide 2 Chapter 9 Separate Compilation and Namespaces Created by David Mann, North Idaho College Slide 3 Overview Separate Compilation (9.1) Namespaces (9.2) Slide

More information

Part of the Picture: Simulation

Part of the Picture: Simulation Part of the Picture: Simulation Random Number Generators The RandomInt Class The Part of the Picture: Simulation section in Chapter 5 referred to a class RandomInt, which can be used to conveniently generate

More information

Global Variables. ˆ Unlike local variables, global variables are available to all functions involved.

Global Variables. ˆ Unlike local variables, global variables are available to all functions involved. Global Variables ˆ Unlike local variables, global variables are available to all functions involved. ˆ Use global to declare x as global. ˆ For example, the universal constant, say,. 1 ˆ However, it is

More information

2. It is possible for a structure variable to be a member of another structure variable.

2. It is possible for a structure variable to be a member of another structure variable. FORM 1(put name, form, and section number on scantron!!!) CS 162 Exam I True (A) / False (B) (2 pts) 1. What value will the function eof return if there are more characters to be read in the input stream?

More information

Due Date: See Blackboard

Due Date: See Blackboard Source File: ~/2315/45/lab45.(C CPP cpp c++ cc cxx cp) Input: under control of main function Output: under control of main function Value: 4 Integer data is usually represented in a single word on a computer.

More information

For fine ti.ito vvt* have hcen in IS PUBLISHED EVERY. OF LOWELL. n t m r n T i l t " ^ n a i I Howk & White, CAPITAL, ,000.

For fine ti.ito vvt* have hcen in IS PUBLISHED EVERY. OF LOWELL. n t m r n T i l t  ^ n a i I Howk & White, CAPITAL, ,000. G G 7 87 - G G * - -» *» - - -8 6 8 ( - * - - - [- -- ( G - ( X * ( - --» - ( - - G» # - - - x- G»»» * 6 q q 6» - * 6 76 G» q 6 * - Q * /» q ** - X - * (( G» - * * * 8 8» * * X - - - (»-» * - - G - - G

More information

C C C C++ 2 ( ) C C++ 4 C C

C C C C++ 2 ( ) C C++ 4 C C # 7 11 13 C 4 8 11 20 C 9 11 27 C++ 1 10 12 4 C++ 2 11 12 11 C++ 3 12 12 18 C++ 4 C++ 5 13 1 8 ( ) 14 1 15 C++ 15 1 22 2 (D) ( ) C++ 3 6 Hello C++ 4 5 1. make Makefile.c (arithmetic.c) main main arithmetic

More information

static int init_matrix(double dx,double dt,double ss, double aux,double r,int Nspace) {

static int init_matrix(double dx,double dt,double ss, double aux,double r,int Nspace) { 19 pages 1 Help #if defined(premiacurrentversion) && PremiaCurrentVersion < (2008+2) //The "#else" part of the code will be freely av ailable after the (year of creation of this file + 2) #else #include

More information

C++11 Move Constructors and Move Assignment. For Introduction to C++ Programming By Y. Daniel Liang

C++11 Move Constructors and Move Assignment. For Introduction to C++ Programming By Y. Daniel Liang C++11 Move Constructors and Move Assignment For Introduction to C++ Programming By Y. Daniel Liang C+11 provides move constructors and move assignment to improve performance by moving a large rvalue object

More information

Interest Rate and Credit Modeling on GPU s Thalesian s Talk 2011

Interest Rate and Credit Modeling on GPU s Thalesian s Talk 2011 Interest Rate and Credit Modeling on GPU s Thalesian s Talk 2011 2 The opportunity 3 But Monte Carlo implementation of bgm is embarrassingly parallel problem: - Looking for infinite computations - Independent

More information

LOADING LIBRARY FILES IN C++

LOADING LIBRARY FILES IN C++ LOADING LIBRARY FILES IN C++ This article demonstrates how to load shared or dynamic library files in programs written in C++, which is not as straightforward as in C. Device drivers and library files

More information

B-Trees. nodes with many children a type node a class for B-trees. an elaborate example the insertion algorithm removing elements

B-Trees. nodes with many children a type node a class for B-trees. an elaborate example the insertion algorithm removing elements B-Trees 1 B-Trees nodes with many children a type node a class for B-trees 2 manipulating a B-tree an elaborate example the insertion algorithm removing elements MCS 360 Lecture 35 Introduction to Data

More information

COMP Logic for Computer Scientists. Lecture 23

COMP Logic for Computer Scientists. Lecture 23 COMP 1002 Logic for Computer cientists Lecture 23 B 5 2 J Admin stuff Assignment 3 extension Because of the power outage, assignment 3 now due on Tuesday, March 14 (also 7pm) Assignment 4 to be posted

More information

C++ Programming Assignment 3

C++ Programming Assignment 3 C++ Programming Assignment 3 Author: Ruimin Zhao Module: EEE 102 Lecturer: Date: Fei.Xue April/19/2015 Contents Contents ii 1 Question 1 1 1.1 Specification.................................... 1 1.2 Analysis......................................

More information

All Greek Women: All UGA: All Panhellenic: All NPHC: All Greek Men: 3.01

All Greek Women: All UGA: All Panhellenic: All NPHC: All Greek Men: 3.01 Sprg Grade Reportt Fraternities & Sororities at Washgton State Universityy All Greek: Chapter Acacia Alpha Chi Omega All Greek Women:. Rank All Greek Men:... Alpha Pi Alpha Gamma Alpha Gamma Rho Alpha

More information

Due Date: See Blackboard

Due Date: See Blackboard Source File: ~/2305/lab06.(C CPP cpp c++ cc cxx cp) Input: Under control of main function Output: Under control of main function Value: 2 Extend the IntegerSet class from Lab 04 to provide the following

More information

Comp151. Generic Programming: Container Classes

Comp151. Generic Programming: Container Classes Comp151 Generic Programming: Container Classes Container Classes Container classes are a typical use for class templates, since we need container classes for objects of many different types, and the types

More information

LGS: C++ QuickStart. Introduction

LGS: C++ QuickStart. Introduction LGS: C++ QuickStart Introduction The idea of this lecture is to get you from possibly knowing nothing about the language to being able to work out the Black-Scholes model in C++. This presentation is of

More information

Using the NAG C Library in C/C++

Using the NAG C Library in C/C++ Using the NAG C Library in C/C++ Making it Easier to Write Financial Applications Jacques du Toit, NAG Experts in numerical algorithms and HPC services OVERVIEW OF NAG Experts in numerical algorithms and

More information

C++ TEMPLATES EXPLAINED IN COLOR

C++ TEMPLATES EXPLAINED IN COLOR C++ TEMPLATES EXPLAINED IN COLOR REVISION 0 HAWTHORNE-PRESS.COM C++ Templates Explained In Color Published by Hawthorne-Press.com 10310 Moorberry Lane Houston, Texas 77043, USA 2013-2014 by Hawthorne Press.com.

More information

for (int outercounter = nums.length - 1; outercounter > 0 && swappedthatturn; outercounter --

for (int outercounter = nums.length - 1; outercounter > 0 && swappedthatturn; outercounter -- /* * A small set of sorting algorithms, written in Java and C++ * Note that they are written by a C++ beginner, may contain mistakes * Or bad habits that have to be avoided * @author Kadir Can Çelik */

More information

Due Date: See Blackboard. {a n+1 b 2n n 0}

Due Date: See Blackboard. {a n+1 b 2n n 0} Source File: ~/4301/06/lab06.(C CPP cpp c++ cc cxx cp) Input: Under control of main function Output: Under control of main function Value: 1 For Σ = {a,b}, construct a pushdown automata that accepts the

More information

CSC 344 Algorithms and Complexity

CSC 344 Algorithms and Complexity S 44 lgorithms and omplexity Lecture #1 Graphs (Extended) What is a Graph? graph consists of a set of nodes (or vertices) and a set of arcs (or edges). Each arc in a graphs is specified by a pair of nodes.

More information

Unit Testing. Contents. Steven Zeil. July 22, Types of Testing 2. 2 Unit Testing Scaffolding Drivers Stubs...

Unit Testing. Contents. Steven Zeil. July 22, Types of Testing 2. 2 Unit Testing Scaffolding Drivers Stubs... Steven Zeil July 22, 2013 Contents 1 Types of Testing 2 2 6 2.1 Scaffolding................. 7 2.1.1 Drivers............... 7 2.1.2 Stubs................ 13 3 Integration Testing 17 1 1 Types of Testing

More information

BRAND GUIDELINES UPDATED NOVEMBER 2018

BRAND GUIDELINES UPDATED NOVEMBER 2018 BRAND GUIDELINES UPDATED NOVEMBER 2018 National Industries for the Blind Brand Guidelines i 19nI2-1921 TABLE OF CONTENTS 01. Introduction 02. Logo Alignment 03. NIB Logo Specifications 04. NIB Logo Usage

More information

Implementing an ADT with a Class

Implementing an ADT with a Class Implementing an ADT with a Class the header file contains the class definition the source code file normally contains the class s method definitions when using Visual C++ 2012, the source code and the

More information

EECE.3220: Data Structures Spring 2017

EECE.3220: Data Structures Spring 2017 EECE.3220: Data Structures Spring 2017 Lecture 14: Key Questions February 24, 2017 1. Describe the characteristics of an ADT to store a list. 2. What data members would be necessary for a static array-based

More information

Unit Testing. Steven Zeil. July 22, Types of Testing 2. 2 Unit Testing Scaffolding Drivers Stubs...

Unit Testing. Steven Zeil. July 22, Types of Testing 2. 2 Unit Testing Scaffolding Drivers Stubs... Steven Zeil July 22, 2013 Contents 1 Types of Testing 2 2 Unit Testing 4 2.1 Scaffolding............ 4 2.1.1 Drivers.......... 4 2.1.2 Stubs........... 9 3 Integration Testing 12 1 1 Types of Testing Testing

More information

Relational Model, Relational Algebra, and SQL

Relational Model, Relational Algebra, and SQL Relational Model, Relational Algebra, and SQL August 29, 2007 1 Relational Model Data model. constraints. Set of conceptual tools for describing of data, data semantics, data relationships, and data integrity

More information

The Legacy Continues GREEK LETTERS AND EMBLEMS

The Legacy Continues GREEK LETTERS AND EMBLEMS The Legacy Continues GREEK LETTERS AND EMBLEMS HOW TO BUY AN EMBLEM OR GREEK LETTER The BRICK legacy INSCRIPTION continues These instructions are specific for ordering a brick inscription where the donor

More information

Abstract Data Types (ADTs) 1. Legal Values. Client Code for Rational ADT. ADT Design. CS 247: Software Engineering Principles

Abstract Data Types (ADTs) 1. Legal Values. Client Code for Rational ADT. ADT Design. CS 247: Software Engineering Principles Abstract Data Types (ADTs) CS 247: Software Engineering Principles ADT Design An abstract data type (ADT) is a user-defined type that bundles together: the range of values that variables of that type can

More information

Tranont Mission Statement. Tranont Vision Statement. Change the world s economy, one household at a time.

Tranont Mission Statement. Tranont Vision Statement. Change the world s economy, one household at a time. STYLE GUIDE Tranont Mission Statement Change the world s economy, one household at a time. Tranont Vision Statement We offer individuals world class financial education and training, financial management

More information

PracticeAdmin Identity Guide. Last Updated 4/27/2015 Created by Vanessa Street

PracticeAdmin Identity Guide. Last Updated 4/27/2015 Created by Vanessa Street PracticeAdmin Identity Guide Last Updated 4/27/2015 Created by Vanessa Street About PracticeAdmin Mission At PracticeAdmin, we simplify the complex process of medical billing by providing healthcare professionals

More information

This page intentionally left blank

This page intentionally left blank This page intentionally left blank C++ DESIGN PATTERNS AND DERIVATIVES PRICING 2nd edition Design patterns are the cutting-edge paradigm for programming in object-oriented languages. Here they are discussed

More information

CS 216 Fall 2007 Midterm 1 Page 1 of 10 Name: ID:

CS 216 Fall 2007 Midterm 1 Page 1 of 10 Name:  ID: Page 1 of 10 Name: Email ID: You MUST write your name and e-mail ID on EACH page and bubble in your userid at the bottom of EACH page including this page and page 10. If you do not do this, you will receive

More information

Quadratic Functions Date: Per:

Quadratic Functions Date: Per: Math 2 Unit 10 Worksheet 1 Name: Quadratic Functions Date: Per: [1-3] Using the equations and the graphs from section B of the NOTES, fill out the table below. Equation Min or Max? Vertex Domain Range

More information

Review: C++ Basic Concepts. Dr. Yingwu Zhu

Review: C++ Basic Concepts. Dr. Yingwu Zhu Review: C++ Basic Concepts Dr. Yingwu Zhu Outline C++ class declaration Constructor Overloading functions Overloading operators Destructor Redundant declaration A Real-World Example Question #1: How to

More information

The Mathematics of Banking and Finance By Dennis Cox and Michael Cox Copyright 2006 John Wiley & Sons Ltd

The Mathematics of Banking and Finance By Dennis Cox and Michael Cox Copyright 2006 John Wiley & Sons Ltd The Mathematics of Banking and Finance By Dennis Cox and Michael Cox Copyright 2006 John Wiley & Sons Ltd Less than ( ), less than or equal to ( ) Appendix 281 A symbol meaning smaller or less than, for

More information

Due Date: See Blackboard

Due Date: See Blackboard Source File: ~/2315/06/lab06.(C CPP cpp c++ cc cxx cp) Input: Under control of main function Output: Under control of main function Value: 2 Extend the IntegerSet class from Lab 04 to provide the following

More information

PIC 10A Objects/Classes

PIC 10A Objects/Classes PIC 10A Objects/Classes Ernest Ryu UCLA Mathematics Last edited: November 13, 2017 User-defined types In C++, we can define our own custom types. Object is synonymous to variable, and class is synonymous

More information

CS 247: Software Engineering Principles. ADT Design

CS 247: Software Engineering Principles. ADT Design CS 247: Software Engineering Principles ADT Design Readings: Eckel, Vol. 1 Ch. 7 Function Overloading & Default Arguments Ch. 12 Operator Overloading U Waterloo CS247 (Spring 2017) p.1/17 Abstract Data

More information

FINCAD ANALYTICS SUITE 2009 FOR EXCEL User Guide

FINCAD ANALYTICS SUITE 2009 FOR EXCEL User Guide FINCAD ANALYTICS SUITE 2009 FOR EXCEL User Guide FINCAD ANALYTICS SUITE 2009 FOR EXCEL User Guide Software Version: 2009.2 FINCAD makes no warranty either express or implied, including, but not limited

More information

Financial computing with C++

Financial computing with C++ Financial Computing with C++, Lecture 16 - p1/24 Financial computing with C++ LG Gyurkó University of Oxford Michaelmas Term 2015 Financial Computing with C++, Lecture 16 - p2/24 Outline Abstract payoff

More information

USER MANUAL FOR SELFIE 3.7.0

USER MANUAL FOR SELFIE 3.7.0 USER MANUAL FOR SELFIE 3.7.0 Table of Contents 1. INTRODUCTION... 3 2. KEY FEATURES... 3 3. SECURE LOGIN... 3 4. WORKSPACES AND WIDGETS... 14 5. WIDGETS... 17 6. LEFT MENU... 24 7. ORDER WINDOWS... 37

More information

Finite differences and PDEs Estimating volas and correlations FFT and Moment generating functions. and Black Scholes. Carlo Methods in C++

Finite differences and PDEs Estimating volas and correlations FFT and Moment generating functions. and Black Scholes. Carlo Methods in C++ Overview Basics of Forwards, Futures, Greek Gee Letters es and Options Introduction to C++, basic facilities Properties of Stock Option Prices & trading strategies Classes in C++ Trees for Option Pricing

More information

Due Date: See Blackboard

Due Date: See Blackboard Source File: ~/2315/11/lab11.(C CPP cpp c++ cc cxx cp) Input: Under control of main function Output: Under control of main function Value: 1 The purpose of this assignment is to become more familiar with

More information

Tabella dei caratteri ASCII e UNICODE

Tabella dei caratteri ASCII e UNICODE Appendice 1: ausiliaria Tabella dei caratteri ASCII e UNICODE formato di stampa: A4 APP_1A_IT_R3.0.docx 1 di 9 Indice 1 TABELLE DEI CARATTERI... 3 Caratteri ASCII... 3 Lettere greche... -4 APP_1A_IT_R3.0.docx

More information

1 Short Answer (7 Points Each)

1 Short Answer (7 Points Each) 1 Short Answer (7 Points Each) 1. Given the following function, what operations will need to be overloaded in the class T for this code to compile? template T square(t n) { return n * n; } The

More information

1 Motivating Questions. 2 An Illustrating Example. 3 Software Quality. 4 An Example of OOP

1 Motivating Questions. 2 An Illustrating Example. 3 Software Quality. 4 An Example of OOP Qinghai Zhang An Introduction to Software Engineering for Mathematicians 2014-SEP-30 1 Motivating Questions Q1. What is math? Q2. Why do we care about math? Q3. What is software and software engineering?

More information

8 pages 1. Help. #include "bs1d_pad.h" #include "enums.h"

8 pages 1. Help. #include bs1d_pad.h #include enums.h 8 pages 1 Help /* Monte Carlo Simulation for Lookback option on minimum: Put Fixed Euro and Call Floating Euro. The program provides estimations for Price and Delta wit h a confidence interval (for MC

More information

BRAND BOOK. Copyright 2016 WashU Student Union Student Union Brand Guidebook 1

BRAND BOOK. Copyright 2016 WashU Student Union Student Union Brand Guidebook 1 BRAND BOOK 2019 2016 Copyright 2016 WashU Student Union Student Union Brand Guidebook 1 WHY THIS MATTERS While it is easy for the student body to see the hundreds of group events that take place every

More information

More Group HW. #ifndef Stackh #define Stackh. #include <cstdlib> using namespace std;

More Group HW. #ifndef Stackh #define Stackh. #include <cstdlib> using namespace std; More Group HW The following code is contained in the file ex1stck.h. Fill in the blanks with the C++ statement(s) that will correctly finish the method. Each blank may be filled in with more than one statement.

More information

Basic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable

Basic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable Basic C++ Overview C++ is a version of the older C programming language. This is a language that is used for a wide variety of applications and which has a mature base of compilers and libraries. C++ is

More information

Unified Modeling Language a case study

Unified Modeling Language a case study Unified Modeling Language a case study 1 an online phone book use case diagram encapsulating a file 2 Command Line Arguments arguments of main arrays of strings 3 Class Definition the filesphonebook.h

More information