Comp_Fin_HW4

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

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

Jaime Frade Computational Finance: Dr. Kopriva Homework #4 0. Executive Summary 1

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

View Full Document
1. Statement of Problem 2
2. Description of the Mathematics 3

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

View Full Document
3. Description of the Algorithm 4
4. Results 5

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

View Full Document
5. Conclusion 6
APPENDIX: 1 Main ﬁle #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];

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

View Full Document
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
Ask a homework question - tutors are online