Comp_Fin_HW4

Comp_Fin_HW4 - Jaime Frade Computational Finance: Dr....

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Jaime Frade Computational Finance: Dr. Kopriva Homework #4 0. Executive Summary 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
1. Statement of Problem 2
Background image of page 2
2. Description of the Mathematics 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3. Description of the Algorithm 4
Background image of page 4
4. Results 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5. Conclusion 6
Background image of page 6
APPENDIX: 1 Main file #include <iostream> using namespace std; #include <iomanip> using namespace std; #include <math.h> #include <vector> using namespace std; #include <algorithm> using namespace std; #include "tridiag2.h" int solveTridiagonal(double *, double *, double *, double *, double *, int); void coeffcubepoly(double *y, double *d, double *z, double *t, int n, int x); int main() { tridiag2 t1; const int n=8; double t[8] = {0.5, 1, 2, 4, 5,10, 15, 20}; double y[8] = {0.0552, 0.060, 0.0682, 0.0801, 0.0843,0.0931, 0.0912, 0.0857}; double array[n] ={0}; double array2[n] ={0}; double array3[n] ={0}; double array4[8]; for (int i=0; i<=n-1; i++) { array[i] = t[i+1] - t[i]; array2[i] = 2*(array[i+1]-array[i]); array3[i] = 6*(y[i+1]-y[i])/(array[i]); array4[i] = array3[i] - array3[i-1];
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/14/2011 for the course MAP 5611 taught by Professor Staff during the Fall '10 term at FSU.

Page1 / 11

Comp_Fin_HW4 - Jaime Frade Computational Finance: Dr....

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online