Set 6: Interpolation Part 2
Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Piecewise Polynomial Interpolation
Use local interpolants of lower order rather than one global polynomial
Set 1: Basics
David Kopriva and Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Finite Precision
All discussions so far have assumed we can compute with elements
of R and by extensi
Spring 2014
Introduction to Computational Finance
MAP 5611
Details
Time and Place : 11:15 12:05 , 201 Love Building
Instructor: K. A. Gallivan (5-0306, 318 Love Building, gallivan@math.fsu.edu)
Homepage http:/www.math.fsu.edu/~gallivan
Oce Hours: 8:00
Set 17: Options and PDE Methods
David Kopriva and Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Scaling
Recall the generic advection diffusion equation:
ut + aux = uxx
and consider
Set 14: Ordinary Differential Equations:
Stiffness
Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Stiffness: Stability vs. Accuracy
A-stable methods are neither always effective no
Set 16: Numerical PDE Basics
David Kopriva and Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
A Simple Example
The diffusion equation
ut = uxx , x (, ),
u(0, x) = g(x)
is an initial
Set 13: Ordinary Differential Equations Part
2
Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Quadrature Approach Backward Euler
Using right rectangle rule quadrature, i.e., a const
Set 8: Newton-Cotes Quadrature
Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Numerical Quadrature
Let f (x) C[a, b]. Numerical quadrature approximates the denite
integral
b
In (f )
Set 11: Monte Carlo Quadrature
David Kopriva and Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Probability
A random variable, X, is a real number assigned to random event E.
The
Set 12: Ordinary Differential Equations Part
1
David Kopriva and Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Sources and References
U. Ascher and L. Petzold, Computer Methods fo
Set 9: Composite and Adaptive Quadrature
Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Newton-Cotes Composite Formulas
When b a is large or n is too large to trust a Newton-Cotes
Set 15: Partial Differential Equations
David Kopriva and Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Partial Differential Equations
An unknown function u is specied in terms of
Set 10: Differentiation
Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Derivatives
Given samples of an unknown function y(x)
(x0 , y0 ), (x1 , y1 ), . . . , (xn , yn )
estimate y (
Set 7: Least Squares
Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Discrete Interpolation and Approximation
Given discrete values of f (x) and possibly some of its derivatives
ex
Set 3: Solving Nonlinear Equations Part 1
David Kopriva and Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Value of an Account with Simple Interest
Dene a time interval to be T tim
Set 5: Interpolation Part 1
David Kopriva and Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Motivation
Volatility, , is a derived quantity.
It is inferred from stock prices.
van
Set 4: Solving Nonlinear Equations Part 2
David Kopriva and Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Order of a Method
We would like to do much better than the bisection metho
Set 2: Stability
David Kopriva and Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2014
1
Stability
Conditioning is a property of a problem that is independent of the
algorithm used to sol
Solutions for Homework 4 Optimization
Spring 2012
Problem 4.1
Problem 26 on page 260 of the textbook.
Solution:
For Steepest Descent we have the result
e(k+1)
A
1 (k)
e
+1
A
1
+1
k+1
e(0)
A.
6 places accuracy implies relative error of 106 if the size of
Solutions for Homework 3 Optimization
Spring 2012
Problem 3.1
Problem 15 on page 259 of the textbook.
Solution: We have for > 0
xk+1 = xk + k rk , (1 )k k (1 + )k
k =
T
rk rk
T
rk Ark
First note that if = 1 then = 0 and there is no progress toward x = A1
Solutions for Homework 2 Optimization
Spring 2012
Problem 2.1
Let A Rnn be a symmetric positive denite matrix, C Rnn be a symmetric nonsingular
matrix, and b Rn be a vector. The matrix M = C 2 is therefore symmetric positive denite.
Also, let A = C 1 AC 1
Homework 5 Optimization
Spring 2012
The solutions will be posted on Monday, 3/26/12
Problem 5.1
Problem 1 on page 28 of the textbook.
Solution: Using slack and surplus variables yields the conversion
min x + 2y + 3z
subject to
x+y 2
x+y 3
x+z 4
x+z 5
x0
y
Homework 1 Optimization
Spring 2012
Problem 1.1
Let f (x) = x3 3x + 1. This polynomial has three distinct roots.
(1.1.a) Consider using the iteration function
1
1 (x) = (x3 + 1)
3
Which, if any, of the three roots can you compute with 1 (x) and how would
Solutions Homework 5 Introduction to Computational
Finance Spring 2013
Answers to the homework problems should be sent via email to gallivan@math.fsu.edu
before 11:59 PM on the due date. For problems with written solutions you may scan handwritten solutio
Homework 4 Introduction to Computational Finance Spring
2013
Solutions due Friday, 4/5/13
Solutions to the programming tasks should be sent via email to gallivan@math.fsu.edu
before 11:59 PM on the due date. For problems with written solutions you may sca
Study Questions;Introduction to Computational Finance
Spring 2013
These are some additional questions to study before the Midterm Exam.
Problem 2.1
Suppose to solve for a root of f (x), i.e., f (x ) = 0, we use the iteration
xk+1 = (xk )
where (x) is a gi
Solutions for Homework 2 Introduction to Computational Finance Spring 2013
Problem 2.1
Your programming task requires the use of an interpolatory cubic spline to solve a problem
concerning bonds.
A bond is purchased discounted from their value at maturity
Solutions for Homework 1 Introduction to Computational Finance Spring 2013
Problem 1.1
1.1.a
1.1.b
Explain why one should never test for oating point equality. Instead, one should test if two
numbers are almost equal. The basic test for two oating point n
Set 16: Options and PDE Methods
David Kopriva and Kyle A. Gallivan
Department of Mathematics
Florida State University
Introduction to Computational Finance
Spring 2013
1
Scaling
Recall the generic advection diffusion equation:
ut + aux = uxx
and consider
A Note on Reporting Programming Assignment Results
When reporting your results for a programming assignment the following format is recommended. It comprises seven sections each of which provide a dierent level of detail of the
problem and its solution. Y