CalculateCallExerciseValue and and calculatePutExerciseValue

CalculateCallExerciseValue and and calculatePutExerciseValue should each take two double parameters: spot and strike. They should return the exercise value (possibly 0) for the given spot and strike. In other words, the \"signature\" for the functions should look like this: Remember, the exercise value (or intrinsic value) of options are: Call-maximum of 0 and spot-strike Put - maximum of 0 and strike - spot

Solution

Please include #include<algorithm> header file.

double calcCallExerciseValue(double spot, double strike){
   return std::max(0,spot-strike);
}

double calcPutExerciseValue(double spot, double strike){
   return std::max(0,strike-spot);
}

 CalculateCallExerciseValue and and calculatePutExerciseValue should each take two double parameters: spot and strike. They should return the exercise value (po

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site