A graduate course in the Mathematics in Finance program
at the Courarant Institute of Mathematical
Sciences of New York University.
Comments and hints on assignments.
- In C and C++, include files that you wrote for the assignment are part
of your program. You should include them in what you hand in.
- Don't expect floating point computations to round exactly as you want.
For example, if you have a time step dt = .2 and a tfinal
= 30, then the statement: nsteps = tfinal/dt (assuming dt
and tfinal are floats while nsteps
is an int, this will automatically compute the quotient in floating
point and truncate the result to get an integer. You might get 120
(presumable the intended answer) or 119 (if rounding errors
in the division lead to a result less than 120 in floating point,
a distinct possibility.
- Comment on the running time of the program. Be sure to say what computer
- Comment on the checks for correctness you did. For example, in assignment
1, it is easy to compute the total payments if no refinancing is allowed.
The result with refinancing cannot be more. Does the result have to be
greater than 1?
- Don't cut down trees to make mind numbing printouts that I won't have
time to read. Do think carefully about how to present the results graphically
whenever possible. Try to present several results on the same graph if
- A note on C++ programming: C++ is (claimed to be) a good language for
medium to large scale software projects. The programming and debugging
overhead of defining classes may not pay off for small coursework assignments.
- Remember to give the answer, for example, "total cost = ...".
- Always put in comments saying what the program is doing. For example,
the assignment 1 program would have a section:
|/* Compute the new cost go value. */
........... code .......
/* Compute the expected cost if you don't refinance now */
....cost_without = .....
/* Compute the expected cost if you do refinance now. */
....cost_with = ........
/* The cost to go from here is the smaller of these numbers. */
f(...) = min(cost_without, cost_with);
Send email to Jonathan Goodman
Back to Jonathan
Goodman's home page.
Back to the Mathematics Department home
Back to the Courant Institute home page.
Back to the home page or the NYU Graduate
School of Arts and Sciences