Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need to find values of follwing functions which have two parameters in each F(x, , h) =( c(exp(x + h), ) c(exp(x h), )

i need to find values of follwing functions which have two parameters in each

F(x, , h) =( c(exp(x + h), ) c(exp(x h), ) )/2h

G(S, , k) =( c(S + k, ) c(S k, ) )/2k

below is the code in c++ and all necessary information

#include #include

using namespace std; double cum_norm(double x) { const double root = sqrt(0.5); return 0.5*(1.0 + erf(x*root)); } //Call option valuation function: int call_option(double S, double sigma, double & call, double & delta) { call = 0.0; delta = 0.0; if ((S < 0.0) || (sigma < 0.0)) return 1; // fail if (S == 0.0) { call = 0.0; delta = 0.0; return 0; // ok } if (sigma == 0.0) { if (S > 1.0) { call = S - 1.0; delta = 1.0; } else { call = 0.0; delta = 0.0; } return 0; // ok } double d1 = log(S)/sigma + 0.5*sigma; double d2 = d1 - sigma; double Nd1 = cum_norm(d1); double Nd2 = cum_norm(d2); call = S*Nd1 - Nd2; delta = Nd1; return 0; // ok }

int main() { double sigma=0.5, s=0.9,c,delta; call_option(s,sigma,c,delta); cout << "delta = " << delta<

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

What Is A Database And How Do I Use It

Authors: Matt Anniss

1st Edition

1622750799, 978-1622750795

More Books

Students also viewed these Databases questions

Question

=+ f. instituting laws against driving while intoxicated

Answered: 1 week ago