tst_approximate.cc

来自「Financial Recipes」· CC 代码 · 共 30 行

CC
30
字号
// tst_approximate.cc void tst_quadratic_approximation(){    cout << " testing quadratic approximation " << endl;    double X = 100;    double r = 0.08;    double sigma = 0.20;    double time = 0.25;    double b = -0.04;    double S=100;    cout << " call "	 << option_price_american_call_approximated_baw(S,X,r,b,sigma,time)	 << endl;    cout << " put " 	 << option_price_american_put_approximated_baw(S,X,r,b,sigma,time)	 << endl;    cout << "done test of approximation " << endl;}; void tst_geske_johnson(){    cout << "TESTING geske johnson american put approximation " << endl;    cout << " not done " << endl;    cout << "DONE TESTING geske johnson american put approximation " << endl;};void test_approximate(){    tst_quadratic_approximation();}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?