
Title: A Parallel Implementation of the Bisection Algorithm to Optimize Yield to Maturity Calculations for a Portfolio of Bonds
Name: Anjali Smith
UNI: as6467

My program reads in a file of bond values and test yields and approximates the yield to maturity for each bond using the bisection algorithm. The output of each program is the sum of the squared errors for every yield calculation. 

The data subdirectory contains one data file: "bonds.txt" which contains data for a total of 55,000 bonds

To compile my program, please run:
stack ghc -- -O2 -Wall ytm-project-test.hs -threaded -rtsopts -eventlog

To run my program, please specifiy a file and mode:
./ytm-project-test <filepath> <mode> 

where <mode> can be {seq, parMap, parChunk} with seq as default

For convenience, you can copy and paste the following commands:

To run my sequential program with the dataset of 55K bonds please run:
./ytm-project-test ./data/bonds.txt seq +RTS -N1 -s -lf


To run the parallel program with parMap in the main function, with the dataset of 55K bonds please run:
./ytm-project-test ./data/bonds.txt parMap +RTS -N2 -s -lf


To run the parallel program with parListChunk in the main function, with the dataset of 55K bonds please run:
./ytm-project-test ./data/bonds.txt parChunk +RTS -N2 -s -lf
