Script started on Sun Feb 3 09:52:54 2019 fc$ make tets make: don't know how to make tets. Stop make: stopped in /home/pi/m/finance/quantlib fc$ make tetsst ===> Testing for quantlib-1.14 /usr/bin/make -C Examples check-examples /usr/bin/make -C BasketLosses check-examples ./BasketLosses GLHP Expected 10-Yr Losses: 29.6265 Gaussian Binomial Expected 10-Yr Losses: 25.8297 T Binomial Expected 10-Yr Losses: 25.6508 G Inhomogeneous Expected 10-Yr Losses: 26.111 Random G Expected 10-Yr Losses: 26.1135 Random T Expected 10-Yr Losses: 28.2459 Random Loss G Expected 10-Yr Losses: 24.058 Random Loss T Expected 10-Yr Losses: 23.6476 Base Correlation GLHP Expected 10-Yr Losses: 29.6265 Run completed in 22 s /usr/bin/make -C BermudanSwaption check-examples ./BermudanSwaption G2 (analytic formulae) calibration 1x5: model 10.04552 %, market 11.48000 % (-1.43448 %) 2x4: model 10.51233 %, market 11.08000 % (-0.56767 %) 3x3: model 10.70500 %, market 10.70000 % (+0.00500 %) 4x2: model 10.83816 %, market 10.21000 % (+0.62816 %) 5x1: model 10.94390 %, market 10.00000 % (+0.94390 %) calibrated to: a = 0.050105, sigma = 0.0094504 b = 0.050109, eta = 0.0094505 rho = -0.76333 Hull-White (analytic formulae) calibration 1x5: model 10.62037 %, market 11.48000 % (-0.85963 %) 2x4: model 10.62959 %, market 11.08000 % (-0.45041 %) 3x3: model 10.63414 %, market 10.70000 % (-0.06586 %) 4x2: model 10.64428 %, market 10.21000 % (+0.43428 %) 5x1: model 10.66132 %, market 10.00000 % (+0.66132 %) calibrated to: a = 0.046414, sigma = 0.0058693 Hull-White (numerical) calibration 1x5: model 10.31185 %, market 11.48000 % (-1.16815 %) 2x4: model 10.54619 %, market 11.08000 % (-0.53381 %) 3x3: model 10.66914 %, market 10.70000 % (-0.03086 %) 4x2: model 10.74020 %, market 10.21000 % (+0.53020 %) 5x1: model 10.79725 %, market 10.00000 % (+0.79725 %) calibrated to: a = 0.055229, sigma = 0.0061063 Black-Karasinski (numerical) calibration 1x5: model 10.32593 %, market 11.48000 % (-1.15407 %) 2x4: model 10.56575 %, market 11.08000 % (-0.51425 %) 3x3: model 10.67858 %, market 10.70000 % (-0.02142 %) 4x2: model 10.73678 %, market 10.21000 % (+0.52678 %) 5x1: model 10.77792 %, market 10.00000 % (+0.77792 %) calibrated to: a = 0.043389, sigma = 0.12075 Payer bermudan swaption struck at 5.00000 % (ATM) G2 (tree): 14.111 G2 (fdm) : 14.113 HW (tree): 12.904 HW (fdm) : 12.91 HW (num, tree): 13.158 HW (num, fdm) : 13.157 BK: 13.002 Payer bermudan swaption struck at 6.00000 % (OTM) G2 (tree): 3.1943 G2 (fdm) : 3.1809 HW (tree): 2.4921 HW (fdm) : 2.4596 HW (num, tree): 2.615 HW (num, fdm): 2.5829 BK: 3.2751 Payer bermudan swaption struck at 4.00000 % (ITM) G2 (tree): 42.61 G2 (fdm) : 42.706 HW (tree): 42.253 HW (fdm) : 42.215 HW (num, tree): 42.364 HW (num, fdm) : 42.311 BK: 41.825 Run completed in 34 s /usr/bin/make -C Bonds check-examples ./Bonds Today: Monday, September 15th, 2008 Settlement date: Thursday, September 18th, 2008 ZC Fixed Floating ------------------------------------------------ Net present value 100.92 107.67 102.36 Clean price 100.92 106.13 101.80 Dirty price 100.92 107.67 102.36 Accrued coupon 0.00 1.54 0.56 Previous coupon N/A 4.50 % 2.89 % Next coupon N/A 4.50 % 3.43 % Yield 3.00 % 3.65 % 2.20 % Sample indirect computations (for the floating rate bond): ------------------------------------------------ Yield to Clean Price: 101.80 Clean Price to Yield: 2.20 % Run completed in 0 s /usr/bin/make -C CallableBonds check-examples ./CallableBonds Pricing a callable fixed rate bond using Hull White model w/ reversion parameter = 0.03 BAC4.65 09/15/12 ISIN: US06060WBJ36 roughly five year tenor, quarterly coupon and call dates reference date is : October 16th, 2007 sigma/vol (%) = 0.00 QuantLib price/yld (%) 96.47 / 5.48 Bloomberg price/yld (%) 96.50 / 5.47 sigma/vol (%) = 1.00 QuantLib price/yld (%) 95.64 / 5.67 Bloomberg price/yld (%) 95.68 / 5.66 sigma/vol (%) = 3.00 QuantLib price/yld (%) 92.31 / 6.49 Bloomberg price/yld (%) 92.34 / 6.49 sigma/vol (%) = 6.00 QuantLib price/yld (%) 87.08 / 7.85 Bloomberg price/yld (%) 87.16 / 7.83 sigma/vol (%) = 12.00 QuantLib price/yld (%) 77.34 / 10.64 Bloomberg price/yld (%) 77.31 / 10.65 Run completed in 0. s /usr/bin/make -C CDS check-examples ./CDS ***** Running example #1 ***** Calibrated hazard rate values: hazard rate on May 15th, 2007 is 0.0299689 hazard rate on September 20th, 2007 is 0.0299689 hazard rate on December 20th, 2007 is 0.0299613 hazard rate on June 20th, 2008 is 0.0299619 hazard rate on June 22nd, 2009 is 0.0299607 Some survival probability values: 1Y survival probability: 97.040061 % expected: 97.040000 % 2Y survival probability: 94.175780 % expected: 94.180000 % Repricing of quoted CDSs employed for calibration: 3M fair spread: 1.500000 % NPV: -7.18501e-11 default leg: -5218.16 coupon leg: 5218.16 6M fair spread: 1.500000 % NPV: -1.52795e-10 default leg: -8882.83 coupon leg: 8882.83 1Y fair spread: 1.500000 % NPV: -2.05728e-09 default leg: -16142.9 coupon leg: 16142.9 2Y fair spread: 1.500000 % NPV: -6.25732e-10 default leg: -30195.6 coupon leg: 30195.6 Run completed in 0 s ***** Running example #2 ***** September 22nd, 2014 December 22nd, 2014 March 20th, 2015 June 22nd, 2015 September 21st, 2015 December 21st, 2015 March 21st, 2016 June 20th, 2016 September 20th, 2016 December 20th, 2016 ISDA rate curve: November 24th, 2014 0.000061 0.999994 December 23rd, 2014 0.000444 0.999923 January 23rd, 2015 0.000805 0.999793 April 23rd, 2015 0.001845 0.999070 July 23rd, 2015 0.002575 0.998062 October 23rd, 2015 0.003393 0.996594 October 24th, 2016 0.002217 0.995551 October 23rd, 2017 0.002749 0.991764 October 23rd, 2018 0.003521 0.985986 October 23rd, 2019 0.004516 0.977637 October 23rd, 2020 0.005725 0.966173 October 25th, 2021 0.007076 0.951562 October 24th, 2022 0.008480 0.934305 October 23rd, 2023 0.009823 0.915290 October 23rd, 2024 0.011050 0.895248 October 23rd, 2026 0.013130 0.854070 October 23rd, 2029 0.015384 0.793724 October 23rd, 2034 0.017604 0.702988 October 24th, 2044 0.018849 0.567776 first period = September 22nd, 2014 to December 22nd, 2014 accrued amount = 88888.888889 reference trade NPV = -43769.625488 ISDA credit curve: June 21st, 2019;0.051655;0.948345;0.011361 ***** Running example #3 ***** ISDA yield curve: date;time;zeroyield July 15th, 2011;0.087671;0.004511 August 15th, 2011;0.172603;0.009452 September 15th, 2011;0.257534;0.012322 December 15th, 2011;0.506849;0.017781 March 15th, 2012;0.756164;0.019367 June 15th, 2012;1.008219;0.020820 June 17th, 2013;2.013699;0.016293 June 16th, 2014;3.010959;0.019975 June 15th, 2015;4.008219;0.022863 June 15th, 2016;5.010959;0.025119 June 15th, 2017;6.010959;0.026883 June 15th, 2018;7.010959;0.028224 June 17th, 2019;8.016438;0.029336 June 15th, 2020;9.013699;0.030236 June 15th, 2021;10.013699;0.031038 June 15th, 2022;11.013699;0.031776 June 15th, 2023;12.013699;0.032565 June 15th, 2026;15.016438;0.034070 June 16th, 2031;20.021918;0.034506 June 16th, 2036;25.027397;0.034206 June 17th, 2041;30.032877;0.034108 ISDA credit curve: date;time;survivalprob December 21st, 2011;0.523288;0.993032 June 21st, 2012;1.024658;0.986405 June 21st, 2014;3.024658;0.939078 June 21st, 2016;5.027397;0.862452 June 21st, 2018;7.027397;0.788519 June 22nd, 2021;10.032877;0.690297 /usr/bin/make -C ConvertibleBonds check-examples ./ConvertibleBonds option type = Put Time to maturity = 5.00274 Underlying price = 36 Risk-free interest rate = 6.000000 % Dividend yield = 2.000000 % Volatility = 20.000000 % =============================================================== Tsiveriotis-Fernandes method =============================================================== Tree type European American --------------------------------------------------------------- Jarrow-Rudd 105.695677 108.159223 Cox-Ross-Rubinstein 105.701390 108.156146 Additive equiprobabilities 105.632269 108.102380 Trigeorgis 105.701883 108.156589 Tian 105.718694 108.166365 Leisen-Reimer 105.669444 108.176879 Joshi 105.669445 108.176880 =============================================================== Run completed in 0 s /usr/bin/make -C CVAIRS check-examples ./CVAIRS -- Correction in the contract fix rate in bp -- 5 | 3.249 % | -0.24 | -0.87 | -2.10 10 | 4.074 % | -2.15 | -5.62 | -11.65 15 | 4.463 % | -4.60 | -10.41 | -19.60 20 | 4.675 % | -6.94 | -14.57 | -25.67 25 | 4.775 % | -8.79 | -17.63 | -29.62 30 | 4.811 % | -10.16 | -19.73 | -32.00 Run completed in 1 s /usr/bin/make -C DiscreteHedging check-examples ./DiscreteHedging Option value: 2.51207 | | P&L | P&L | Derman&Kamal | P&L | P&L samples | trades | mean | std.dev. | formula | skewness | kurtosis ------------------------------------------------------------------------------ 50000 | 21 | 0.004 | 0.42 | 0.44 | -0.31 | 1.55 50000 | 84 | -0.000 | 0.22 | 0.22 | -0.19 | 1.66 Run completed in 2 s /usr/bin/make -C EquityOption check-examples ./EquityOption Option type = Put Maturity = May 17th, 1999 Underlying price = 36 Strike = 40 Risk-free interest rate = 6.000000 % Dividend yield = 0.000000 % Volatility = 20.000000 % Method European Bermudan American Black-Scholes 3.844308 N/A N/A Heston semi-analytic 3.844306 N/A N/A Bates semi-analytic 3.844306 N/A N/A Barone-Adesi/Whaley N/A N/A 4.459628 Bjerksund/Stensland N/A N/A 4.453064 Integral 3.844309 N/A N/A Finite differences 3.844342 4.360807 4.486118 Binomial Jarrow-Rudd 3.844132 4.361174 4.486552 Binomial Cox-Ross-Rubinstein 3.843504 4.360861 4.486415 Additive equiprobabilities 3.836911 4.354455 4.480097 Binomial Trigeorgis 3.843557 4.360909 4.486461 Binomial Tian 3.844171 4.361176 4.486413 Binomial Leisen-Reimer 3.844308 4.360713 4.486076 Binomial Joshi 3.844308 4.360713 4.486076 MC (crude) 3.834522 N/A N/A QMC (Sobol) 3.844613 N/A N/A MC (Longstaff Schwartz) N/A N/A 4.456935 Run completed in 1 s /usr/bin/make -C FittedBondCurve check-examples ./FittedBondCurve Today's date: February 4th, 2019 Bonds' settlement date: February 4th, 2019 Calculating fit for 15 bonds..... (a) exponential splines reference date : February 4th, 2019 number of iterations : 3048 (b) simple polynomial reference date : February 4th, 2019 number of iterations : 262 (c) Nelson-Siegel reference date : February 4th, 2019 number of iterations : 1206 (d) cubic B-splines reference date : February 4th, 2019 number of iterations : 742 (e) Svensson reference date : February 4th, 2019 number of iterations : 3808 (f) Nelson-Siegel spreaded reference date : February 4th, 2019 number of iterations : 1508 Output par rates for each curve. In this case, par rates should equal coupons for these par bonds. tenor | coupon | bstrap | (a) | (b) | (c) | (d) | (e) | (f) 2.000 | 2.000 | 2.000 | 2.000 | 2.010 | 2.060 | 1.770 | 2.008 | 2.060 4.006 | 2.250 | 2.250 | 2.250 | 2.257 | 2.266 | 2.398 | 2.225 | 2.266 6.000 | 2.500 | 2.500 | 2.499 | 2.501 | 2.484 | 2.657 | 2.511 | 2.484 8.000 | 2.750 | 2.750 | 2.750 | 2.746 | 2.716 | 2.748 | 2.771 | 2.716 10.003 | 3.000 | 3.000 | 3.001 | 2.993 | 2.960 | 2.905 | 3.013 | 2.960 12.000 | 3.250 | 3.250 | 3.250 | 3.241 | 3.214 | 3.195 | 3.248 | 3.214 14.000 | 3.500 | 3.500 | 3.500 | 3.490 | 3.477 | 3.521 | 3.486 | 3.477 16.003 | 3.750 | 3.750 | 3.750 | 3.743 | 3.746 | 3.796 | 3.731 | 3.746 18.000 | 4.000 | 4.000 | 4.000 | 3.996 | 4.017 | 4.016 | 3.984 | 4.017 20.000 | 4.250 | 4.250 | 4.250 | 4.251 | 4.286 | 4.232 | 4.245 | 4.286 22.000 | 4.500 | 4.500 | 4.500 | 4.507 | 4.548 | 4.478 | 4.510 | 4.548 24.000 | 4.750 | 4.750 | 4.750 | 4.761 | 4.797 | 4.745 | 4.772 | 4.797 26.006 | 5.000 | 5.000 | 5.001 | 5.012 | 5.029 | 5.015 | 5.025 | 5.029 28.000 | 5.250 | 5.250 | 5.250 | 5.254 | 5.236 | 5.267 | 5.258 | 5.236 30.000 | 5.500 | 5.500 | 5.500 | 5.485 | 5.416 | 5.485 | 5.464 | 5.416 Now add 23 months to today. Par rates should be automatically recalculated because today's date changes. Par rates will NOT equal coupons (YTM will, with the correct compounding), but the piecewise yield curve par rates can be used as a benchmark for correct par rates. (a) exponential splines reference date : January 4th, 2021 number of iterations : 1132 (b) simple polynomial reference date : January 4th, 2021 number of iterations : 267 (c) Nelson-Siegel reference date : January 4th, 2021 number of iterations : 1023 (d) cubic B-splines reference date : January 4th, 2021 number of iterations : 579 (e) Svensson reference date : January 4th, 2021 number of iterations : 2819 (f) Nelson-Siegel spreaded reference date : January 4th, 2021 number of iterations : 1026 tenor | coupon | bstrap | (a) | (b) | (c) | (d) | (e) | (f) 0.083 | 2.000 | 1.964 | 1.969 | 1.983 | 2.025 | 1.310 | 1.964 | 2.025 2.089 | 2.250 | 2.248 | 2.242 | 2.249 | 2.256 | 2.335 | 2.235 | 2.256 4.083 | 2.500 | 2.499 | 2.496 | 2.496 | 2.481 | 2.908 | 2.529 | 2.481 6.083 | 2.750 | 2.749 | 2.749 | 2.743 | 2.716 | 3.013 | 2.765 | 2.716 8.086 | 3.000 | 2.999 | 3.001 | 2.991 | 2.963 | 2.949 | 2.996 | 2.963 10.083 | 3.250 | 3.249 | 3.251 | 3.239 | 3.217 | 3.053 | 3.232 | 3.217 12.083 | 3.500 | 3.499 | 3.501 | 3.490 | 3.479 | 3.403 | 3.477 | 3.479 14.086 | 3.750 | 3.749 | 3.751 | 3.743 | 3.746 | 3.804 | 3.731 | 3.746 16.083 | 4.000 | 4.000 | 3.999 | 3.997 | 4.014 | 4.089 | 3.990 | 4.014 18.083 | 4.250 | 4.250 | 4.249 | 4.252 | 4.280 | 4.268 | 4.254 | 4.280 20.083 | 4.500 | 4.500 | 4.498 | 4.507 | 4.541 | 4.454 | 4.517 | 4.541 22.083 | 4.750 | 4.750 | 4.748 | 4.761 | 4.790 | 4.718 | 4.776 | 4.790 24.089 | 5.000 | 4.999 | 4.999 | 5.012 | 5.025 | 5.014 | 5.024 | 5.025 26.083 | 5.250 | 5.249 | 5.250 | 5.254 | 5.239 | 5.277 | 5.253 | 5.239 28.083 | 5.500 | 5.499 | 5.500 | 5.484 | 5.430 | 5.485 | 5.460 | 5.430 Now add one more month, for a total of two years from the original date. The first instrument is now expired and par rates should again equal coupon values, since clean prices did not change. (a) exponential splines reference date : February 4th, 2021 number of iterations : 7449 (b) simple polynomial reference date : February 4th, 2021 number of iterations : 264 (c) Nelson-Siegel reference date : February 4th, 2021 number of iterations : 1028 (d) cubic B-splines reference date : February 4th, 2021 number of iterations : 682 (e) Svensson reference date : February 4th, 2021 number of iterations : 3744 (f) Nelson-Siegel spreaded reference date : February 4th, 2021 number of iterations : 1672 tenor | coupon | bstrap | (a) | (b) | (c) | (d) | (e) | (f) 2.006 | 2.250 | 2.250 | 2.246 | 2.260 | 2.294 | 2.014 | 2.254 | 2.294 4.000 | 2.500 | 2.500 | 2.501 | 2.504 | 2.508 | 2.659 | 2.483 | 2.508 6.000 | 2.750 | 2.750 | 2.753 | 2.749 | 2.734 | 2.918 | 2.760 | 2.734 8.003 | 3.000 | 3.000 | 3.003 | 2.995 | 2.972 | 2.998 | 3.015 | 2.972 10.000 | 3.250 | 3.250 | 3.251 | 3.242 | 3.219 | 3.148 | 3.256 | 3.219 12.000 | 3.500 | 3.500 | 3.499 | 3.491 | 3.476 | 3.442 | 3.495 | 3.476 14.003 | 3.750 | 3.750 | 3.748 | 3.743 | 3.739 | 3.775 | 3.738 | 3.739 16.000 | 4.000 | 4.000 | 3.997 | 3.996 | 4.005 | 4.048 | 3.987 | 4.005 18.000 | 4.250 | 4.250 | 4.248 | 4.250 | 4.271 | 4.262 | 4.243 | 4.271 20.000 | 4.500 | 4.500 | 4.499 | 4.505 | 4.533 | 4.476 | 4.503 | 4.533 22.000 | 4.750 | 4.750 | 4.751 | 4.759 | 4.786 | 4.732 | 4.763 | 4.786 24.006 | 5.000 | 5.000 | 5.003 | 5.011 | 5.025 | 5.006 | 5.017 | 5.025 26.000 | 5.250 | 5.250 | 5.252 | 5.254 | 5.244 | 5.265 | 5.257 | 5.244 28.000 | 5.500 | 5.500 | 5.497 | 5.487 | 5.440 | 5.492 | 5.477 | 5.440 Now decrease prices by a small amount, corresponding to a theoretical five basis point parallel + shift of the yield curve. Because bond quotes change, the new par rates should be recalculated automatically. tenor | coupon | bstrap | (a) | (b) | (c) | (d) | (e) | (f) 2.006 | 2.250 | 2.299 | 2.297 | 2.311 | 2.344 | 2.061 | 2.303 | 2.344 4.000 | 2.500 | 2.550 | 2.551 | 2.554 | 2.557 | 2.709 | 2.533 | 2.557 6.000 | 2.750 | 2.800 | 2.802 | 2.798 | 2.783 | 2.969 | 2.809 | 2.783 8.003 | 3.000 | 3.048 | 3.051 | 3.044 | 3.021 | 3.047 | 3.064 | 3.021 10.000 | 3.250 | 3.299 | 3.299 | 3.290 | 3.268 | 3.196 | 3.304 | 3.268 12.000 | 3.500 | 3.549 | 3.547 | 3.539 | 3.524 | 3.490 | 3.543 | 3.524 14.003 | 3.750 | 3.797 | 3.796 | 3.790 | 3.787 | 3.823 | 3.786 | 3.787 16.000 | 4.000 | 4.048 | 4.045 | 4.043 | 4.053 | 4.096 | 4.035 | 4.053 18.000 | 4.250 | 4.298 | 4.295 | 4.297 | 4.319 | 4.309 | 4.290 | 4.319 20.000 | 4.500 | 4.547 | 4.546 | 4.552 | 4.580 | 4.523 | 4.550 | 4.580 22.000 | 4.750 | 4.797 | 4.798 | 4.806 | 4.832 | 4.777 | 4.809 | 4.832 24.006 | 5.000 | 5.044 | 5.049 | 5.057 | 5.071 | 5.051 | 5.063 | 5.071 26.000 | 5.250 | 5.296 | 5.297 | 5.299 | 5.289 | 5.310 | 5.303 | 5.289 28.000 | 5.500 | 5.545 | 5.541 | 5.531 | 5.485 | 5.537 | 5.521 | 5.485 Run completed in 3 s /usr/bin/make -C FRA check-examples ./FRA Today: Tuesday, May 23rd, 2006 Settlement date: Thursday, May 25th, 2006 Test FRA construction, NPV calculation, and FRA purchase 3m Term FRA, Months to Start: 1 strike FRA rate: 3.000000 % FRA 3m forward rate: 3.000000 % Actual/360 simple compounding FRA market quote: 3.000000 % FRA spot value: 99.7347 FRA forward value: 100.767 FRA implied Yield: 3.003993 % Actual/360 simple compounding market Zero Rate: 3.003993 % Actual/360 simple compounding FRA NPV [should be zero]: 0 3m Term FRA, Months to Start: 2 strike FRA rate: 3.100000 % FRA 3m forward rate: 3.100000 % Actual/360 simple compounding FRA market quote: 3.100000 % FRA spot value: 99.4949 FRA forward value: 100.792 FRA implied Yield: 3.068054 % Actual/360 simple compounding market Zero Rate: 3.068054 % Actual/360 simple compounding FRA NPV [should be zero]: 0 3m Term FRA, Months to Start: 3 strike FRA rate: 3.200000 % FRA 3m forward rate: 3.200000 % Actual/360 simple compounding FRA market quote: 3.200000 % FRA spot value: 99.2392 FRA forward value: 100.836 FRA implied Yield: 3.113474 % Actual/360 simple compounding market Zero Rate: 3.113474 % Actual/360 simple compounding FRA NPV [should be zero]: 0 3m Term FRA, Months to Start: 6 strike FRA rate: 3.300000 % FRA 3m forward rate: 3.300000 % Actual/360 simple compounding FRA market quote: 3.300000 % FRA spot value: 98.4168 FRA forward value: 100.843 FRA implied Yield: 3.192770 % Actual/360 simple compounding market Zero Rate: 3.192770 % Actual/360 simple compounding FRA NPV [should be zero]: 1.38689e-14 3m Term FRA, Months to Start: 9 strike FRA rate: 3.400000 % FRA 3m forward rate: 3.400000 % Actual/360 simple compounding FRA market quote: 3.400000 % FRA spot value: 97.6027 FRA forward value: 100.859 FRA implied Yield: 3.264191 % Actual/360 simple compounding market Zero Rate: 3.264191 % Actual/360 simple compounding FRA NPV [should be zero]: 2.7504e-14 Now take a 100 basis-point upward shift in FRA quotes and examine NPV 3m Term FRA, 100 notional, Months to Start = 1 strike FRA rate: 3.000000 % FRA 3m forward rate: 4.000000 % Actual/360 simple compounding FRA market quote: 4.000000 % FRA spot value: 99.6469 FRA forward value: 101.022 FRA implied Yield: 4.007095 % Actual/360 simple compounding market Zero Rate: 4.007095 % Actual/360 simple compounding FRA NPV [should be positive]: 0.252076 3m Term FRA, 100 notional, Months to Start = 2 strike FRA rate: 3.100000 % FRA 3m forward rate: 4.100000 % Actual/360 simple compounding FRA market quote: 4.100000 % FRA spot value: 99.3279 FRA forward value: 101.048 FRA implied Yield: 4.074078 % Actual/360 simple compounding market Zero Rate: 4.074078 % Actual/360 simple compounding FRA NPV [should be positive]: 0.251206 3m Term FRA, 100 notional, Months to Start = 3 strike FRA rate: 3.200000 % FRA 3m forward rate: 4.200000 % Actual/360 simple compounding FRA market quote: 4.200000 % FRA spot value: 98.9881 FRA forward value: 101.097 FRA implied Yield: 4.122773 % Actual/360 simple compounding market Zero Rate: 4.122773 % Actual/360 simple compounding FRA NPV [should be positive]: 0.255665 3m Term FRA, 100 notional, Months to Start = 6 strike FRA rate: 3.300000 % FRA 3m forward rate: 4.300000 % Actual/360 simple compounding FRA market quote: 4.300000 % FRA spot value: 97.9143 FRA forward value: 101.099 FRA implied Yield: 4.211735 % Actual/360 simple compounding market Zero Rate: 4.211735 % Actual/360 simple compounding FRA NPV [should be positive]: 0.247506 3m Term FRA, 100 notional, Months to Start = 9 strike FRA rate: 3.400000 % FRA 3m forward rate: 4.400000 % Actual/360 simple compounding FRA market quote: 4.400000 % FRA spot value: 96.8616 FRA forward value: 101.112 FRA implied Yield: 4.292991 % Actual/360 simple compounding market Zero Rate: 4.292991 % Actual/360 simple compounding FRA NPV [should be positive]: 0.242151 Run completed in 0 s /usr/bin/make -C Gaussian1dModels check-examples ./Gaussian1dModels Gaussian1dModel Examples This is some example code showing how to use the GSR (Gaussian short rate) and Markov Functional model. The evaluation date for this example is set to April 30th, 2014 We assume a multicurve setup, for simplicity with flat yield term structures. The discounting curve is an Eonia curve at a level of 0.02 and the forwarding curve is an Euribior 6m curve at a level of 0.025 For the volatility we assume a flat swaption volatility at 0.2 We consider a standard 10y bermudan payer swaption with yearly exercises at a strike of 0.04 The model is a one factor Hull White model with piecewise volatility adapted to our exercise dates. The reversion is just kept constant at a level of 0.01 The model's curve is set to the 6m forward curve. Note that the model adapts automatically to other curves where appropriate (e.g. if an index requires a different forwarding curve) or where explicitly specified (e.g. in a swaption pricing engine). The engine can generate a calibration basket in two modes. The first one is called Naive and generates ATM swaptions adapted to the exercise dates of the swaption and its maturity date The resulting basket looks as follows: Expiry Maturity Nominal Rate Pay/Rec Market ivol ================================================================================================== April 30th, 2015 May 6th, 2024 1.000000 0.025307 Receiver 0.200000 May 3rd, 2016 May 6th, 2024 1.000000 0.025300 Receiver 0.200000 May 3rd, 2017 May 6th, 2024 1.000000 0.025303 Receiver 0.200000 May 3rd, 2018 May 6th, 2024 1.000000 0.025306 Receiver 0.200000 May 2nd, 2019 May 6th, 2024 1.000000 0.025311 Receiver 0.200000 April 30th, 2020 May 6th, 2024 1.000000 0.025300 Receiver 0.200000 May 3rd, 2021 May 6th, 2024 1.000000 0.025306 Receiver 0.200000 May 3rd, 2022 May 6th, 2024 1.000000 0.025318 Receiver 0.200000 May 3rd, 2023 May 6th, 2024 1.000000 0.025353 Receiver 0.200000 (this step took 0.0s) Let's calibrate our model to this basket. We use a specialized calibration method calibrating the sigma function one by one to the calibrating vanilla swaptions. The result of this is as follows: Expiry Model sigma Model price market price Model ivol Market ivol ==================================================================================================== April 30th, 2015 0.005178 0.016111 0.016111 0.199999 0.200000 May 3rd, 2016 0.005156 0.020062 0.020062 0.200000 0.200000 May 3rd, 2017 0.005149 0.021229 0.021229 0.200000 0.200000 May 3rd, 2018 0.005129 0.020738 0.020738 0.200000 0.200000 May 2nd, 2019 0.005132 0.019096 0.019096 0.200000 0.200000 April 30th, 2020 0.005074 0.016537 0.016537 0.200000 0.200000 May 3rd, 2021 0.005091 0.013253 0.013253 0.200000 0.200000 May 3rd, 2022 0.005097 0.009342 0.009342 0.200000 0.200000 May 3rd, 2023 0.005001 0.004910 0.004910 0.200000 0.200000 (this step took 0.2s) Finally we price our bermudan swaption in the calibrated model: Bermudan swaption NPV (ATM calibrated GSR) = 0.003808 (this step took 0.1s) There is another mode to generate a calibration basket called MaturityStrikeByDeltaGamma. This means that the maturity, the strike and the nominal of the calibrating swaption are computed such that the npv and its first and second derivative with respect to the model's state variable) of the exotics underlying match with the calibrating swaption's underlying. Let's try this in our case. Expiry Maturity Nominal Rate Pay/Rec Market ivol ================================================================================================== April 30th, 2015 May 6th, 2024 1.000001 0.040000 Payer 0.200000 May 3rd, 2016 May 6th, 2024 0.999991 0.040000 Payer 0.200000 May 3rd, 2017 May 6th, 2024 0.999998 0.040000 Payer 0.200000 May 3rd, 2018 May 7th, 2024 0.999965 0.040000 Payer 0.200000 May 2nd, 2019 May 6th, 2024 0.999958 0.040000 Payer 0.200000 April 30th, 2020 May 6th, 2024 1.000002 0.040000 Payer 0.200000 May 3rd, 2021 May 6th, 2024 1.000000 0.040000 Payer 0.200000 May 3rd, 2022 May 6th, 2024 0.999995 0.040000 Payer 0.200000 May 3rd, 2023 May 6th, 2024 0.999993 0.040000 Payer 0.200000 (this step took 0.0s) The calibrated nominal is close to the exotics nominal. The expiries and maturity dates of the vanillas are the same as in the case above. The difference is the strike which is now equal to the exotics strike. Let's see how this affects the exotics npv. The recalibrated model is: Expiry Model sigma Model price market price Model ivol Market ivol ==================================================================================================== April 30th, 2015 0.006508 0.000191 0.000191 0.200000 0.200000 May 3rd, 2016 0.006502 0.001412 0.001412 0.200000 0.200000 May 3rd, 2017 0.006480 0.002905 0.002905 0.200000 0.200000 May 3rd, 2018 0.006464 0.004091 0.004091 0.200000 0.200000 May 2nd, 2019 0.006422 0.004766 0.004766 0.200000 0.200000 April 30th, 2020 0.006445 0.004869 0.004869 0.200000 0.200000 May 3rd, 2021 0.006433 0.004433 0.004433 0.200000 0.200000 May 3rd, 2022 0.006332 0.003454 0.003454 0.200000 0.200000 May 3rd, 2023 0.006295 0.001973 0.001973 0.200000 0.200000 (this step took 0.2s) And the bermudan's price becomes: Bermudan swaption NPV (deal strike calibrated GSR) = 0.007627 (this step took 0.1s) We can do more complicated things, let's e.g. modify the nominal schedule to be linear amortizing and see what the effect on the generated calibration basket is: Expiry Maturity Nominal Rate Pay/Rec Market ivol ================================================================================================== April 30th, 2015 August 5th, 2021 0.719275 0.039997 Payer 0.200000 May 3rd, 2016 December 6th, 2021 0.641977 0.040003 Payer 0.200000 May 3rd, 2017 May 5th, 2022 0.564392 0.040005 Payer 0.200000 May 3rd, 2018 September 7th, 2022 0.486523 0.040004 Payer 0.200000 May 2nd, 2019 January 6th, 2023 0.409778 0.040008 Payer 0.200000 April 30th, 2020 May 5th, 2023 0.334098 0.039994 Payer 0.200000 May 3rd, 2021 September 5th, 2023 0.255744 0.039995 Payer 0.200000 May 3rd, 2022 January 5th, 2024 0.177033 0.040031 Payer 0.200000 May 3rd, 2023 May 6th, 2024 0.100000 0.040000 Payer 0.200000 (this step took 0.0s) The notional is weighted over the underlying exercised into and the maturity is adjusted downwards. The rate on the other hand is not affected. You can also price exotic bond's features. If you have e.g. a bermudan callable fixed bond you can set up the call right as a swaption to enter into a one leg swap with notional reimbursement at maturity. The exercise should then be written as a rebated exercise paying the notional in case of exercise. The calibration basket looks like this: Expiry Maturity Nominal Rate Pay/Rec Market ivol ================================================================================================== April 30th, 2015 April 5th, 2024 0.984105 0.039952 Payer 0.200000 May 3rd, 2016 April 5th, 2024 0.985539 0.039952 Payer 0.200000 May 3rd, 2017 May 6th, 2024 0.987065 0.039952 Payer 0.200000 May 3rd, 2018 May 7th, 2024 0.988464 0.039952 Payer 0.200000 May 2nd, 2019 May 6th, 2024 0.990026 0.039952 Payer 0.200000 April 30th, 2020 May 6th, 2024 0.991634 0.039951 Payer 0.200000 May 3rd, 2021 May 6th, 2024 0.993091 0.039951 Payer 0.200000 May 3rd, 2022 May 6th, 2024 0.994195 0.039952 Payer 0.200000 May 3rd, 2023 May 6th, 2024 0.996712 0.039949 Payer 0.200000 (this step took 0.0s) Note that nominals are not exactly 1.0 here. This is because we do our bond discounting on 6m level while the swaptions are still discounted on OIS level. (You can try this by changing the OIS level to the 6m level, which will produce nominals near 1.0). The npv of the call right is (after recalibrating the model) Bond's bermudan call right npv = 0.115409 (this step took 0.2s) Up to now, no credit spread is included in the pricing. We can do so by specifying an oas in the pricing engine. Let's set the spread level to 100bp and regenerate the calibration basket. Expiry Maturity Nominal Rate Pay/Rec Market ivol ================================================================================================== April 30th, 2015 February 5th, 2024 0.961294 0.029608 Payer 0.200000 May 3rd, 2016 March 5th, 2024 0.965326 0.029605 Payer 0.200000 May 3rd, 2017 April 5th, 2024 0.969521 0.029608 Payer 0.200000 May 3rd, 2018 April 8th, 2024 0.973628 0.029610 Payer 0.200000 May 2nd, 2019 April 8th, 2024 0.978117 0.029608 Payer 0.200000 April 30th, 2020 May 6th, 2024 0.982689 0.029612 Payer 0.200000 May 3rd, 2021 May 6th, 2024 0.987311 0.029609 Payer 0.200000 May 3rd, 2022 May 6th, 2024 0.991359 0.029603 Payer 0.200000 May 3rd, 2023 May 6th, 2024 0.996643 0.029586 Payer 0.200000 (this step took 0.0s) The adjusted basket takes the credit spread into account. This is consistent to a hedge where you would have a margin on the float leg around 100bp,too. The npv becomes: Bond's bermudan call right npv (oas = 100bp) = 0.044980 (this step took 0.2s) The next instrument we look at is a CMS 10Y vs Euribor 6M swaption. The maturity is again 10 years and the option is exercisable on a yearly basis Since the underlying is quite exotic already, we start with pricing this using the LinearTsrPricer for CMS coupon estimation Underlying CMS Swap NPV = 0.004447 CMS Leg NPV = -0.231736 Euribor Leg NPV = 0.236183 (this step took 0.0s) We generate a naive calibration basket and calibrate the GSR model to it: Expiry Maturity Nominal Rate Pay/Rec Market ivol ================================================================================================== April 30th, 2015 May 6th, 2024 1.000000 0.025307 Receiver 0.200000 May 3rd, 2016 May 6th, 2024 1.000000 0.025300 Receiver 0.200000 May 3rd, 2017 May 6th, 2024 1.000000 0.025303 Receiver 0.200000 May 3rd, 2018 May 6th, 2024 1.000000 0.025306 Receiver 0.200000 May 2nd, 2019 May 6th, 2024 1.000000 0.025311 Receiver 0.200000 April 30th, 2020 May 6th, 2024 1.000000 0.025300 Receiver 0.200000 May 3rd, 2021 May 6th, 2024 1.000000 0.025306 Receiver 0.200000 May 3rd, 2022 May 6th, 2024 1.000000 0.025318 Receiver 0.200000 May 3rd, 2023 May 6th, 2024 1.000000 0.025353 Receiver 0.200000 Expiry Model sigma Model price market price Model ivol Market ivol ==================================================================================================== April 30th, 2015 0.005178 0.016111 0.016111 0.200000 0.200000 May 3rd, 2016 0.005156 0.020062 0.020062 0.200000 0.200000 May 3rd, 2017 0.005149 0.021229 0.021229 0.200000 0.200000 May 3rd, 2018 0.005129 0.020738 0.020738 0.200000 0.200000 May 2nd, 2019 0.005132 0.019096 0.019096 0.200000 0.200000 April 30th, 2020 0.005074 0.016537 0.016537 0.200000 0.200000 May 3rd, 2021 0.005091 0.013253 0.013253 0.200000 0.200000 May 3rd, 2022 0.005097 0.009342 0.009342 0.200000 0.200000 May 3rd, 2023 0.005001 0.004910 0.004910 0.200000 0.200000 (this step took 0.2s) The npv of the bermudan swaption is Float swaption NPV (GSR) = 0.004291 (this step took 0.2s) In this case it is also interesting to look at the underlying swap npv in the GSR model. Float swap NPV (GSR) = 0.005250 Not surprisingly, the underlying is priced differently compared to the LinearTsrPricer, since a different smile is implied by the GSR model. This is exactly where the Markov functional model comes into play, because it can calibrate to any given underlying smile (as long as it is arbitrage free). We try this now. Of course the usual use case is not to calibrate to a flat smile as in our simple example, still it should be possible, of course... The option npv is the markov model is: Float swaption NPV (Markov) = 0.003549 (this step took 0.1s) This is not too far from the GSR price. More interesting is the question how well the Markov model did its job to match our input smile. For this we look at the underlying npv under the Markov model Float swap NPV (Markov) = 0.004301 This is closer to our terminal swap rate model price. A perfect match is not expected anyway, because the dynamics of the underlying rate in the linear model is different from the Markov model, of course. The Markov model can not only calibrate to the underlying smile, but has at the same time a sigma function (similar to the GSR model) which can be used to calibrate to a second instrument set. We do this here to calibrate to our coterminal ATM swaptions from above. This is a computationally demanding task, so depending on your machine, this may take a while now... Expiry Model sigma Model price market price Model ivol Market ivol ==================================================================================================== April 30th, 2015 0.010000 0.016111 0.016111 0.199997 0.200000 May 3rd, 2016 0.012275 0.020062 0.020062 0.200002 0.200000 May 3rd, 2017 0.010534 0.021229 0.021229 0.200001 0.200000 May 3rd, 2018 0.010414 0.020738 0.020738 0.200001 0.200000 May 2nd, 2019 0.010361 0.019096 0.019096 0.199999 0.200000 April 30th, 2020 0.010339 0.016537 0.016537 0.200001 0.200000 May 3rd, 2021 0.010365 0.013253 0.013253 0.199999 0.200000 May 3rd, 2022 0.010382 0.009342 0.009342 0.200001 0.200000 May 3rd, 2023 0.010392 0.004910 0.004910 0.200001 0.200000 0.009959 (this step took 4.3s) Now let's have a look again at the underlying pricing. It shouldn't have changed much, because the underlying smile is still matched. Float swap NPV (Markov) = 0.004331 (this step took 0.1s) This is close to the previous value as expected. As a final remark we note that the calibration to coterminal swaptions is not particularly reasonable here, because the european call rights are not well represented by these swaptions. Secondly, our CMS swaption is sensitive to the correlation between the 10y swap rate and the Euribor 6M rate. Since the Markov model is one factor it will most probably underestimate the market value by construction. That was it. Thank you for running this demo. Bye. /usr/bin/make -C GlobalOptimizer check-examples ./GlobalOptimizer ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Firefly Algorithm Test ---------------------------------------------------------------- Function eggholder, Agents: 150, Vola: 1.5, Intensity: 1 Starting point: f(0, 0) = -25.4603 End point: f(512, 404.232) = -959.641 Global optimium: f(512, 404.232) = -959.641 ================================================================ Run completed in 6 s ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Hybrid Simulated Annealing Test ---------------------------------------------------------------- Function: ackley, Dimensions: 3, Initial temp:100, Final temp:0, Reset scheme:1, Reset steps:150 Starting point: f(2, 2, 2) = 9 End point: f(0, -0, -0) = -2 Global optimium: f(0, 0, 0) = -2 ================================================================ Function: ackley, Dimensions: 10, Initial temp:100, Final temp:0, Reset scheme:1, Reset steps:150 Starting point: f(2, 2, 2, 2, 2, 2, 2, 2, 2, 2) = 12 End point: f(19, -9, 37, 26, 43, 126, 40, -39, -38, 12) = -126 Global optimium: f(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = -146 ================================================================ Function: ackley, Dimensions: 30, Initial temp:100, Final temp:0, Reset scheme:1, Reset steps:150 Starting point: f(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2) = 16 End point: f(-14, -2, 22, 12, 13, 10, 10, 13, -12, -1, 2, 4, -24, 22, -1, 15, 18, -5, -2, 10, 12, 12, -14, -2, 13, 19, 16, 1, 22, -13) = -186184 Global optimium: f(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = -3269015 ================================================================ Run completed in 6 s ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Particle Swarm Optimization Test ---------------------------------------------------------------- Function: rosenbrock, Dimensions: 3, Agents: 100, K-neighbors: 25, Threshold: 500 Starting point: f(0, 0, 0) = 2 End point: f(1, 1, 1) = 0 Global optimium: f(1, 1, 1) = 0 ================================================================ Function: rosenbrock, Dimensions: 10, Agents: 100, K-neighbors: 25, Threshold: 500 Starting point: f(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 9 End point: f(1, 1, 1, 1, 1, 1, 1, 1, 1, 1) = 0 Global optimium: f(1, 1, 1, 1, 1, 1, 1, 1, 1, 1) = 0 ================================================================ Function: rosenbrock, Dimensions: 30, Agents: 100, K-neighbors: 25, Threshold: 500 Starting point: f(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 29 End point: f(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) = 0 Global optimium: f(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) = 0 ================================================================ Run completed in 8 s ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Simulated Annealing Test ---------------------------------------------------------------- Function ackley, Lambda: 0, Temperature: 350, Epsilon: 1, Iterations: 1000 Starting point: f(2, 2, 2) = 9 End point: f(-0, 0, 0) = 0 Global optimium: f(0, 0, 0) = -2 ================================================================ Function ackley, Lambda: 0, Temperature: 350, Epsilon: 1, Iterations: 1000 Starting point: f(2, 2, 2, 2, 2, 2, 2, 2, 2, 2) = 12 End point: f(4, -0, 3, 1, 3, 1, -0, 2, -2, 3) = -72 Global optimium: f(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = -146 ================================================================ Function ackley, Lambda: 0, Temperature: 350, Epsilon: 1, Iterations: 1000 Starting point: f(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2) = 16 End point: f(2, 2, 1, 2, 2, 2, 1, 2, -0, -0, 3, 1, 2, 2, 2, -0, 1, 2, 1, 1, -0, 2, 3, 2, -0, 1, 3, 2, 1, 3) = -757934 Global optimium: f(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = -3269015 ================================================================ Run completed in 8 s ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Differential Evolution Test ---------------------------------------------------------------- Function: rosenbrock, Dimensions: 3, Agents: 50, Probability: 0, StepsizeWeight: 1, Strategy: BestMemberWithJitter Starting point: f(0, 0, 0) = 2 End point: f(1, 1, 1) = 0 Global optimium: f(1, 1, 1) = 0 ================================================================ Function: rosenbrock, Dimensions: 10, Agents: 150, Probability: 0, StepsizeWeight: 1, Strategy: BestMemberWithJitter Starting point: f(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 9 End point: f(1, 1, 1, 1, 1, 1, 1, 1, 1, 1) = 0 Global optimium: f(1, 1, 1, 1, 1, 1, 1, 1, 1, 1) = 0 ================================================================ Function: rosenbrock, Dimensions: 30, Agents: 450, Probability: 0, StepsizeWeight: 1, Strategy: BestMemberWithJitter Starting point: f(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 29 End point: f(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) = 0 Global optimium: f(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) = 0 ================================================================ Run completed in 17 s /usr/bin/make -C LatentModel check-examples ./LatentModel Gaussian versus T prob of extreme event (random and integrable)- -Prob of 0 events... 1 ** 0.99999 ** 1 ** 1 -Prob of 1 events... 0.252189 ** 0.249196 ** 0.2524 ** 0.24917 -Prob of 2 events... 0.0328963 ** 0.0336561 ** 0.03279 ** 0.03368 -Prob of 3 events... 0.00199248 ** 0.00421316 ** 0.00201 ** 0.0041 -- Default correlations G,T,GRand,TRand-- ----------------------------------------- 1 , 0.00935891 , 0.00935891 , 0.00935891 , 1 , 0.00935891 , 0.00935891 , 0.00935891 , 1 , 1 , 0.031698 , 0.031698 , 0.031698 , 1 , 0.031698 , 0.031698 , 0.031698 , 1 , 1.00001 , 0.00827934 , 0.00517704 , 0.00827934 , 1.00001 , 0.0103137 , 0.00517704 , 0.0103137 , 1.00001 , 1.00001 , 0.0305301 , 0.0283078 , 0.0305301 , 1.00001 , 0.0323241 , 0.0283078 , 0.0323241 , 1.00001 , Run completed in 2 s /usr/bin/make -C MarketModels check-examples ./MarketModels inverse floater fixed strikes : 0.15 number rates : 20 training paths, 65536 paths, 65536 vega Paths, 16384 rate level 0.05 -0.0161955 0.0870706 time to build strategy, 1.35156, seconds. time to price, 2.20312, seconds. vega output factorwise bumping 0 doCaps 0 price estimate, 0.0868184 Delta, 0, 1.31847, 0.00195094 Delta, 1, 1.20837, 0.00329279 Delta, 2, 1.09916, 0.00402968 Delta, 3, 0.994986, 0.00443145 Delta, 4, 0.901078, 0.00465025 Delta, 5, 0.821622, 0.00472748 Delta, 6, 0.748171, 0.00472779 Delta, 7, 0.676147, 0.00467372 Delta, 8, 0.614106, 0.0045757 Delta, 9, 0.559666, 0.00445411 Delta, 10, 0.513673, 0.00432688 Delta, 11, 0.470293, 0.00417286 Delta, 12, 0.427822, 0.00400984 Delta, 13, 0.390045, 0.00384228 Delta, 14, 0.358827, 0.00371168 Delta, 15, 0.328362, 0.00355612 Delta, 16, 0.298648, 0.00339936 Delta, 17, 0.268562, 0.00321725 Delta, 18, 0.241715, 0.00303437 Delta, 19, 0.19752, 0.00277139 vega, 0, 0.000537163 ,0 vega, 1, 0.000512241 ,0 vega, 2, 0.000531272 ,0 vega, 3, 0.00080581 ,0 vega, 4, 0.000521218 ,0 vega, 5, 0.000474379 ,0 vega, 6, 0.000321862 ,0 vega, 7, 0.000650717 ,0 vega, 8, 0.000228025 ,0 vega, 9, 0.000366575 ,0 vega, 10, 0.000109168 ,0 vega, 11, 4.29782e-05 ,0 vega, 12, 0.000167156 ,0 vega, 13, 0.000127076 ,0 vega, 14, 0.000147648 ,0 vega, 15, -2.24295e-05 ,0 vega, 16, 1.19248e-05 ,0 vega, 17, -5.85746e-05 ,0 vega, 18, -4.45364e-05 ,0 vega, 19, 2.61674e-05 ,0 total Vega, 0.00545584 vega output factorwise bumping 1 doCaps 0 price estimate, 0.0868184 Delta, 0, 1.31847, 0.00195094 Delta, 1, 1.20837, 0.00329279 Delta, 2, 1.09916, 0.00402968 Delta, 3, 0.994986, 0.00443145 Delta, 4, 0.901078, 0.00465025 Delta, 5, 0.821622, 0.00472748 Delta, 6, 0.748171, 0.00472779 Delta, 7, 0.676147, 0.00467372 Delta, 8, 0.614106, 0.0045757 Delta, 9, 0.559666, 0.00445411 Delta, 10, 0.513673, 0.00432688 Delta, 11, 0.470293, 0.00417286 Delta, 12, 0.427822, 0.00400984 Delta, 13, 0.390045, 0.00384228 Delta, 14, 0.358827, 0.00371168 Delta, 15, 0.328362, 0.00355612 Delta, 16, 0.298648, 0.00339936 Delta, 17, 0.268562, 0.00321725 Delta, 18, 0.241715, 0.00303437 Delta, 19, 0.19752, 0.00277139 vega, 0, 0.000178754 ,0 vega, 1, 0.000697929 ,0 vega, 2, 0.000665821 ,0 vega, 3, 0.000784743 ,0 vega, 4, 0.000552831 ,0 vega, 5, 0.000512852 ,0 vega, 6, 0.000308864 ,0 vega, 7, 0.000361828 ,0 vega, 8, 0.000269135 ,0 vega, 9, 0.000141886 ,0 vega, 10, 0.000139578 ,0 vega, 11, 1.36155e-05 ,0 vega, 12, 9.69753e-05 ,0 vega, 13, 8.70213e-06 ,0 vega, 14, 0.000134429 ,0 vega, 15, 3.91366e-07 ,0 vega, 16, 3.4873e-05 ,0 vega, 17, 7.48356e-06 ,0 vega, 18, -4.19783e-06 ,0 vega, 19, 1.37192e-05 ,0 total Vega, 0.00492021 vega output factorwise bumping 0 doCaps 1 price estimate, 0.0868184 Delta, 0, 1.31847, 0.00195094 Delta, 1, 1.20837, 0.00329279 Delta, 2, 1.09916, 0.00402968 Delta, 3, 0.994986, 0.00443145 Delta, 4, 0.901078, 0.00465025 Delta, 5, 0.821622, 0.00472748 Delta, 6, 0.748171, 0.00472779 Delta, 7, 0.676147, 0.00467372 Delta, 8, 0.614106, 0.0045757 Delta, 9, 0.559666, 0.00445411 Delta, 10, 0.513673, 0.00432688 Delta, 11, 0.470293, 0.00417286 Delta, 12, 0.427822, 0.00400984 Delta, 13, 0.390045, 0.00384228 Delta, 14, 0.358827, 0.00371168 Delta, 15, 0.328362, 0.00355612 Delta, 16, 0.298648, 0.00339936 Delta, 17, 0.268562, 0.00321725 Delta, 18, 0.241715, 0.00303437 Delta, 19, 0.19752, 0.00277139 vega, 0, 0.000205662 ,0 vega, 1, 0.000357761 ,0 vega, 2, 0.000436371 ,0 vega, 3, 0.000744637 ,0 vega, 4, 0.000350999 ,0 vega, 5, 0.000304823 ,0 vega, 6, 7.29906e-05 ,0 vega, 7, 0.000682534 ,0 vega, 8, 0.000155682 ,0 vega, 9, 0.000403977 ,0 vega, 10, 0.000157902 ,0 vega, 11, -0.000147974 ,0 vega, 12, 0.00017657 ,0 vega, 13, -9.63953e-07 ,0 vega, 14, 0.000438237 ,0 vega, 15, -5.99954e-05 ,0 vega, 16, 1.25568e-05 ,0 vega, 17, 5.63731e-05 ,0 vega, 18, 9.71559e-05 ,0 vega, 19, 0.000129229 ,0 vega, 20, 0.000181069 ,0 vega, 21, 0.000217585 ,0 vega, 22, 0.000255643 ,0 vega, 23, 0.000203047 ,0 vega, 24, 0.000182118 ,0 vega, 25, 0.000142711 ,0 vega, 26, 0.000110869 ,0 vega, 27, 0.000134469 ,0 vega, 28, 0.000116228 ,0 vega, 29, 7.04043e-05 ,0 vega, 30, 7.04779e-05 ,0 vega, 31, -7.70875e-05 ,0 vega, 32, -6.01727e-05 ,0 vega, 33, -6.67757e-05 ,0 vega, 34, -6.83066e-05 ,0 total Vega, 0.00598681 vega output factorwise bumping 1 doCaps 1 price estimate, 0.0868184 Delta, 0, 1.31847, 0.00195094 Delta, 1, 1.20837, 0.00329279 Delta, 2, 1.09916, 0.00402968 Delta, 3, 0.994986, 0.00443145 Delta, 4, 0.901078, 0.00465025 Delta, 5, 0.821622, 0.00472748 Delta, 6, 0.748171, 0.00472779 Delta, 7, 0.676147, 0.00467372 Delta, 8, 0.614106, 0.0045757 Delta, 9, 0.559666, 0.00445411 Delta, 10, 0.513673, 0.00432688 Delta, 11, 0.470293, 0.00417286 Delta, 12, 0.427822, 0.00400984 Delta, 13, 0.390045, 0.00384228 Delta, 14, 0.358827, 0.00371168 Delta, 15, 0.328362, 0.00355612 Delta, 16, 0.298648, 0.00339936 Delta, 17, 0.268562, 0.00321725 Delta, 18, 0.241715, 0.00303437 Delta, 19, 0.19752, 0.00277139 vega, 0, 0.000132367 ,0 vega, 1, 0.000541302 ,0 vega, 2, 0.000489328 ,0 vega, 3, 0.000706567 ,0 vega, 4, 0.000491309 ,0 vega, 5, 0.000519181 ,0 vega, 6, 0.000339452 ,0 vega, 7, 0.000464215 ,0 vega, 8, 0.000386056 ,0 vega, 9, 0.000232674 ,0 vega, 10, 0.000231736 ,0 vega, 11, 6.23271e-05 ,0 vega, 12, 0.000238341 ,0 vega, 13, 4.32892e-05 ,0 vega, 14, 0.000255305 ,0 vega, 15, 1.06151e-05 ,0 vega, 16, 9.40421e-05 ,0 vega, 17, 2.23203e-05 ,0 vega, 18, -7.00994e-05 ,0 vega, 19, -2.28062e-05 ,0 vega, 20, 1.6436e-05 ,0 vega, 21, 5.699e-05 ,0 vega, 22, 8.61217e-05 ,0 vega, 23, 8.56206e-05 ,0 vega, 24, 8.37583e-05 ,0 vega, 25, 7.14288e-05 ,0 vega, 26, 5.80925e-05 ,0 vega, 27, 3.55289e-05 ,0 vega, 28, 1.35357e-05 ,0 vega, 29, -2.1889e-06 ,0 vega, 30, -1.67405e-05 ,0 vega, 31, -2.32349e-05 ,0 vega, 32, -4.42788e-05 ,0 vega, 33, -4.67575e-05 ,0 vega, 34, -6.48239e-05 ,0 vega, 35, -6.13788e-05 ,0 vega, 36, -6.87918e-05 ,0 vega, 37, -6.52544e-05 ,0 vega, 38, -3.13134e-05 ,0 total Vega, 0.00525027 Upper - lower is, 0.00545744, with standard error 0.000555712 time to compute upper bound is, 7.10156, seconds. inverse floater fixed strikes : 0.15 number rates : 20 training paths, 65536 paths, 65536 vega Paths, 16384 rate level 0.06 0.172515 0.21654 time to build strategy, 1.30469, seconds. time to price, 2.22656, seconds. vega output factorwise bumping 0 doCaps 0 price estimate, 0.216636 Delta, 0, 1.26009, 0.00127668 Delta, 1, 1.16988, 0.00203805 Delta, 2, 1.0823, 0.00248746 Delta, 3, 1.00324, 0.00277846 Delta, 4, 0.931872, 0.00298804 Delta, 5, 0.862935, 0.00313688 Delta, 6, 0.800813, 0.00321048 Delta, 7, 0.745136, 0.00325251 Delta, 8, 0.696549, 0.00324712 Delta, 9, 0.648988, 0.00323495 Delta, 10, 0.604435, 0.00321175 Delta, 11, 0.566592, 0.00318165 Delta, 12, 0.524962, 0.0031222 Delta, 13, 0.488412, 0.00305025 Delta, 14, 0.454208, 0.00298178 Delta, 15, 0.420954, 0.00290667 Delta, 16, 0.39006, 0.00282624 Delta, 17, 0.360374, 0.00274247 Delta, 18, 0.327711, 0.00263971 Delta, 19, 0.280065, 0.00252801 vega, 0, -0.000384857 ,0 vega, 1, -3.52271e-05 ,0 vega, 2, -7.85158e-06 ,0 vega, 3, 0.00023008 ,0 vega, 4, 0.000521306 ,0 vega, 5, -2.98669e-05 ,0 vega, 6, 0.000390151 ,0 vega, 7, 0.00037885 ,0 vega, 8, 9.31084e-05 ,0 vega, 9, 0.000183449 ,0 vega, 10, 0.000344103 ,0 vega, 11, -8.77287e-06 ,0 vega, 12, 0.000221929 ,0 vega, 13, 0.000183133 ,0 vega, 14, 0.000141979 ,0 vega, 15, 1.33615e-05 ,0 vega, 16, 1.10357e-05 ,0 vega, 17, -8.32643e-05 ,0 vega, 18, -4.86715e-05 ,0 vega, 19, 5.30522e-05 ,0 total Vega, 0.00216703 vega output factorwise bumping 1 doCaps 0 price estimate, 0.216636 Delta, 0, 1.26009, 0.00127668 Delta, 1, 1.16988, 0.00203805 Delta, 2, 1.0823, 0.00248746 Delta, 3, 1.00324, 0.00277846 Delta, 4, 0.931872, 0.00298804 Delta, 5, 0.862935, 0.00313688 Delta, 6, 0.800813, 0.00321048 Delta, 7, 0.745136, 0.00325251 Delta, 8, 0.696549, 0.00324712 Delta, 9, 0.648988, 0.00323495 Delta, 10, 0.604435, 0.00321175 Delta, 11, 0.566592, 0.00318165 Delta, 12, 0.524962, 0.0031222 Delta, 13, 0.488412, 0.00305025 Delta, 14, 0.454208, 0.00298178 Delta, 15, 0.420954, 0.00290667 Delta, 16, 0.39006, 0.00282624 Delta, 17, 0.360374, 0.00274247 Delta, 18, 0.327711, 0.00263971 Delta, 19, 0.280065, 0.00252801 vega, 0, -9.03408e-05 ,0 vega, 1, -6.91038e-05 ,0 vega, 2, -0.000162768 ,0 vega, 3, -5.13874e-06 ,0 vega, 4, 0.00022195 ,0 vega, 5, 0.000127121 ,0 vega, 6, 0.000161824 ,0 vega, 7, 0.000160615 ,0 vega, 8, 0.00012811 ,0 vega, 9, 0.000121993 ,0 vega, 10, 0.00027437 ,0 vega, 11, 0.000150963 ,0 vega, 12, 6.0907e-05 ,0 vega, 13, 5.54798e-05 ,0 vega, 14, 0.000115215 ,0 vega, 15, 4.66343e-05 ,0 vega, 16, 7.26397e-05 ,0 vega, 17, 1.47797e-05 ,0 vega, 18, 1.92582e-05 ,0 vega, 19, 4.99696e-05 ,0 total Vega, 0.00145448 vega output factorwise bumping 0 doCaps 1 price estimate, 0.216636 Delta, 0, 1.26009, 0.00127668 Delta, 1, 1.16988, 0.00203805 Delta, 2, 1.0823, 0.00248746 Delta, 3, 1.00324, 0.00277846 Delta, 4, 0.931872, 0.00298804 Delta, 5, 0.862935, 0.00313688 Delta, 6, 0.800813, 0.00321048 Delta, 7, 0.745136, 0.00325251 Delta, 8, 0.696549, 0.00324712 Delta, 9, 0.648988, 0.00323495 Delta, 10, 0.604435, 0.00321175 Delta, 11, 0.566592, 0.00318165 Delta, 12, 0.524962, 0.0031222 Delta, 13, 0.488412, 0.00305025 Delta, 14, 0.454208, 0.00298178 Delta, 15, 0.420954, 0.00290667 Delta, 16, 0.39006, 0.00282624 Delta, 17, 0.360374, 0.00274247 Delta, 18, 0.327711, 0.00263971 Delta, 19, 0.280065, 0.00252801 vega, 0, -7.21714e-05 ,0 vega, 1, 0.000136659 ,0 vega, 2, 5.62648e-05 ,0 vega, 3, 0.00025997 ,0 vega, 4, 0.000553457 ,0 vega, 5, -0.000175396 ,0 vega, 6, 0.000423636 ,0 vega, 7, 0.000613373 ,0 vega, 8, 0.00011268 ,0 vega, 9, 0.00021311 ,0 vega, 10, 0.000596778 ,0 vega, 11, -2.98108e-05 ,0 vega, 12, 0.000205846 ,0 vega, 13, 0.000468935 ,0 vega, 14, 0.000175547 ,0 vega, 15, -9.41773e-05 ,0 vega, 16, -1.65462e-05 ,0 vega, 17, -6.75764e-05 ,0 vega, 18, -0.000104451 ,0 vega, 19, -0.000127399 ,0 vega, 20, -0.000137515 ,0 vega, 21, -8.34189e-05 ,0 vega, 22, -7.87685e-05 ,0 vega, 23, -0.000125187 ,0 vega, 24, -0.00010618 ,0 vega, 25, -9.40511e-05 ,0 vega, 26, -0.00013306 ,0 vega, 27, -0.000110321 ,0 vega, 28, -9.3107e-05 ,0 vega, 29, -0.000187345 ,0 vega, 30, -0.000139666 ,0 vega, 31, -0.000187661 ,0 vega, 32, -0.000156292 ,0 vega, 33, -0.00014873 ,0 vega, 34, -0.00012808 ,0 total Vega, 0.00121934 vega output factorwise bumping 1 doCaps 1 price estimate, 0.216636 Delta, 0, 1.26009, 0.00127668 Delta, 1, 1.16988, 0.00203805 Delta, 2, 1.0823, 0.00248746 Delta, 3, 1.00324, 0.00277846 Delta, 4, 0.931872, 0.00298804 Delta, 5, 0.862935, 0.00313688 Delta, 6, 0.800813, 0.00321048 Delta, 7, 0.745136, 0.00325251 Delta, 8, 0.696549, 0.00324712 Delta, 9, 0.648988, 0.00323495 Delta, 10, 0.604435, 0.00321175 Delta, 11, 0.566592, 0.00318165 Delta, 12, 0.524962, 0.0031222 Delta, 13, 0.488412, 0.00305025 Delta, 14, 0.454208, 0.00298178 Delta, 15, 0.420954, 0.00290667 Delta, 16, 0.39006, 0.00282624 Delta, 17, 0.360374, 0.00274247 Delta, 18, 0.327711, 0.00263971 Delta, 19, 0.280065, 0.00252801 vega, 0, -3.69174e-05 ,0 vega, 1, 0.000129388 ,0 vega, 2, 6.98429e-05 ,0 vega, 3, 0.000231552 ,0 vega, 4, 0.000455463 ,0 vega, 5, 0.000321583 ,0 vega, 6, 0.000366656 ,0 vega, 7, 0.000339349 ,0 vega, 8, 0.000312691 ,0 vega, 9, 0.000270936 ,0 vega, 10, 0.000492036 ,0 vega, 11, 0.000280992 ,0 vega, 12, 0.000174691 ,0 vega, 13, 0.000152782 ,0 vega, 14, 0.000255612 ,0 vega, 15, 9.36597e-05 ,0 vega, 16, 0.000204994 ,0 vega, 17, -1.45242e-06 ,0 vega, 18, -4.71563e-05 ,0 vega, 19, -9.00451e-05 ,0 vega, 20, -1.77406e-05 ,0 vega, 21, -6.91377e-05 ,0 vega, 22, -0.000107325 ,0 vega, 23, -0.000134943 ,0 vega, 24, -0.000156467 ,0 vega, 25, -0.000167919 ,0 vega, 26, -0.000180652 ,0 vega, 27, -0.000188117 ,0 vega, 28, -0.000196438 ,0 vega, 29, -0.00019889 ,0 vega, 30, -0.00021336 ,0 vega, 31, -0.000213246 ,0 vega, 32, -0.000210818 ,0 vega, 33, -0.000206102 ,0 vega, 34, -0.000211008 ,0 vega, 35, -0.000198566 ,0 vega, 36, -0.000207652 ,0 vega, 37, -0.000176331 ,0 vega, 38, -0.000123168 ,0 total Vega, 0.000798772 Upper - lower is, 0.00259873, with standard error 0.000401346 time to compute upper bound is, 9.38281, seconds. inverse floater fixed strikes : 0.15 number rates : 20 training paths, 65536 paths, 65536 vega Paths, 16384 rate level 0.07 0.323454 0.342527 time to build strategy, 1.36719, seconds. time to price, 2.25, seconds. vega output factorwise bumping 0 doCaps 0 price estimate, 0.34265 Delta, 0, 0.969376, 0.00297678 Delta, 1, 0.873762, 0.00300887 Delta, 2, 0.810786, 0.00293835 Delta, 3, 0.762095, 0.00285246 Delta, 4, 0.71986, 0.00277316 Delta, 5, 0.683966, 0.00271086 Delta, 6, 0.649749, 0.00263977 Delta, 7, 0.617911, 0.00257003 Delta, 8, 0.586519, 0.00251352 Delta, 9, 0.557197, 0.00244728 Delta, 10, 0.529481, 0.00239172 Delta, 11, 0.502225, 0.00234826 Delta, 12, 0.477742, 0.00229285 Delta, 13, 0.454561, 0.00225155 Delta, 14, 0.426553, 0.00219171 Delta, 15, 0.403822, 0.00213546 Delta, 16, 0.382686, 0.00209818 Delta, 17, 0.360938, 0.00205495 Delta, 18, 0.335242, 0.00201275 Delta, 19, 0.295622, 0.0019842 vega, 0, -0.00151791 ,0 vega, 1, 0.000148919 ,0 vega, 2, 0.000132579 ,0 vega, 3, -0.000126394 ,0 vega, 4, 9.74132e-05 ,0 vega, 5, -0.000127503 ,0 vega, 6, 0.000191537 ,0 vega, 7, -9.87701e-05 ,0 vega, 8, -9.63463e-05 ,0 vega, 9, 0.000112571 ,0 vega, 10, -0.000164674 ,0 vega, 11, 0.00015804 ,0 vega, 12, 8.74819e-05 ,0 vega, 13, 5.75986e-05 ,0 vega, 14, 9.58877e-05 ,0 vega, 15, -0.000109122 ,0 vega, 16, -3.2076e-07 ,0 vega, 17, -8.38044e-05 ,0 vega, 18, -6.75425e-05 ,0 vega, 19, 5.54097e-05 ,0 total Vega, -0.00125495 vega output factorwise bumping 1 doCaps 0 price estimate, 0.34265 Delta, 0, 0.969376, 0.00297678 Delta, 1, 0.873762, 0.00300887 Delta, 2, 0.810786, 0.00293835 Delta, 3, 0.762095, 0.00285246 Delta, 4, 0.71986, 0.00277316 Delta, 5, 0.683966, 0.00271086 Delta, 6, 0.649749, 0.00263977 Delta, 7, 0.617911, 0.00257003 Delta, 8, 0.586519, 0.00251352 Delta, 9, 0.557197, 0.00244728 Delta, 10, 0.529481, 0.00239172 Delta, 11, 0.502225, 0.00234826 Delta, 12, 0.477742, 0.00229285 Delta, 13, 0.454561, 0.00225155 Delta, 14, 0.426553, 0.00219171 Delta, 15, 0.403822, 0.00213546 Delta, 16, 0.382686, 0.00209818 Delta, 17, 0.360938, 0.00205495 Delta, 18, 0.335242, 0.00201275 Delta, 19, 0.295622, 0.0019842 vega, 0, -0.000381813 ,0 vega, 1, -0.000405229 ,0 vega, 2, -0.000444632 ,0 vega, 3, -0.000345939 ,0 vega, 4, -0.000228287 ,0 vega, 5, -0.000195561 ,0 vega, 6, -6.20786e-05 ,0 vega, 7, -0.0001063 ,0 vega, 8, -2.03691e-05 ,0 vega, 9, -3.51976e-05 ,0 vega, 10, -5.77552e-05 ,0 vega, 11, 0.000120196 ,0 vega, 12, -8.38198e-06 ,0 vega, 13, 3.45363e-05 ,0 vega, 14, 6.17824e-05 ,0 vega, 15, 1.18413e-05 ,0 vega, 16, 2.34694e-05 ,0 vega, 17, -4.50198e-06 ,0 vega, 18, 2.36878e-05 ,0 vega, 19, 6.60989e-05 ,0 total Vega, -0.00195443 vega output factorwise bumping 0 doCaps 1 price estimate, 0.34265 Delta, 0, 0.969376, 0.00297678 Delta, 1, 0.873762, 0.00300887 Delta, 2, 0.810786, 0.00293835 Delta, 3, 0.762095, 0.00285246 Delta, 4, 0.71986, 0.00277316 Delta, 5, 0.683966, 0.00271086 Delta, 6, 0.649749, 0.00263977 Delta, 7, 0.617911, 0.00257003 Delta, 8, 0.586519, 0.00251352 Delta, 9, 0.557197, 0.00244728 Delta, 10, 0.529481, 0.00239172 Delta, 11, 0.502225, 0.00234826 Delta, 12, 0.477742, 0.00229285 Delta, 13, 0.454561, 0.00225155 Delta, 14, 0.426553, 0.00219171 Delta, 15, 0.403822, 0.00213546 Delta, 16, 0.382686, 0.00209818 Delta, 17, 0.360938, 0.00205495 Delta, 18, 0.335242, 0.00201275 Delta, 19, 0.295622, 0.0019842 vega, 0, -4.21087e-05 ,0 vega, 1, 3.00695e-05 ,0 vega, 2, 2.36447e-05 ,0 vega, 3, -0.000182882 ,0 vega, 4, 0.000226781 ,0 vega, 5, -2.36817e-06 ,0 vega, 6, 0.000457528 ,0 vega, 7, -7.13437e-06 ,0 vega, 8, 0.000334121 ,0 vega, 9, 0.000400273 ,0 vega, 10, -0.000167116 ,0 vega, 11, 0.000475872 ,0 vega, 12, 0.000196944 ,0 vega, 13, -1.37504e-05 ,0 vega, 14, 0.00021986 ,0 vega, 15, -0.000170297 ,0 vega, 16, -0.000147472 ,0 vega, 17, -0.000228598 ,0 vega, 18, -0.000272943 ,0 vega, 19, -0.000290572 ,0 vega, 20, -0.000317381 ,0 vega, 21, -0.000312586 ,0 vega, 22, -0.000331411 ,0 vega, 23, -0.000290355 ,0 vega, 24, -0.00033999 ,0 vega, 25, -0.000346077 ,0 vega, 26, -0.000292448 ,0 vega, 27, -0.000322885 ,0 vega, 28, -0.000306835 ,0 vega, 29, -0.000306982 ,0 vega, 30, -0.000257612 ,0 vega, 31, -0.000336239 ,0 vega, 32, -0.000282398 ,0 vega, 33, -0.000246067 ,0 vega, 34, -0.000206617 ,0 total Vega, -0.00365603 vega output factorwise bumping 1 doCaps 1 price estimate, 0.34265 Delta, 0, 0.969376, 0.00297678 Delta, 1, 0.873762, 0.00300887 Delta, 2, 0.810786, 0.00293835 Delta, 3, 0.762095, 0.00285246 Delta, 4, 0.71986, 0.00277316 Delta, 5, 0.683966, 0.00271086 Delta, 6, 0.649749, 0.00263977 Delta, 7, 0.617911, 0.00257003 Delta, 8, 0.586519, 0.00251352 Delta, 9, 0.557197, 0.00244728 Delta, 10, 0.529481, 0.00239172 Delta, 11, 0.502225, 0.00234826 Delta, 12, 0.477742, 0.00229285 Delta, 13, 0.454561, 0.00225155 Delta, 14, 0.426553, 0.00219171 Delta, 15, 0.403822, 0.00213546 Delta, 16, 0.382686, 0.00209818 Delta, 17, 0.360938, 0.00205495 Delta, 18, 0.335242, 0.00201275 Delta, 19, 0.295622, 0.0019842 vega, 0, -1.08594e-05 ,0 vega, 1, 3.28259e-05 ,0 vega, 2, -1.49747e-05 ,0 vega, 3, 6.20278e-05 ,0 vega, 4, 0.000141605 ,0 vega, 5, 0.000121746 ,0 vega, 6, 0.000272705 ,0 vega, 7, 0.000161356 ,0 vega, 8, 0.000242198 ,0 vega, 9, 0.0002107 ,0 vega, 10, 0.00011854 ,0 vega, 11, 0.000360619 ,0 vega, 12, 0.00014925 ,0 vega, 13, 0.000191178 ,0 vega, 14, 0.00024885 ,0 vega, 15, 0.000145838 ,0 vega, 16, 0.00011568 ,0 vega, 17, 4.21121e-06 ,0 vega, 18, 2.18317e-05 ,0 vega, 19, -0.000188927 ,0 vega, 20, -0.000148246 ,0 vega, 21, -0.000229671 ,0 vega, 22, -0.000277894 ,0 vega, 23, -0.000309583 ,0 vega, 24, -0.000329566 ,0 vega, 25, -0.000339254 ,0 vega, 26, -0.000353644 ,0 vega, 27, -0.000356302 ,0 vega, 28, -0.000359206 ,0 vega, 29, -0.000360529 ,0 vega, 30, -0.000351546 ,0 vega, 31, -0.00035566 ,0 vega, 32, -0.000345851 ,0 vega, 33, -0.00033724 ,0 vega, 34, -0.000337278 ,0 vega, 35, -0.000329692 ,0 vega, 36, -0.000314021 ,0 vega, 37, -0.00027431 ,0 vega, 38, -0.000231487 ,0 total Vega, -0.00355458 Upper - lower is, 0.000516568, with standard error 0.000132409 time to compute upper bound is, 9.84375, seconds. inverse floater fixed strikes : 0.15 number rates : 20 training paths, 65536 paths, 65536 vega Paths, 16384 rate level 0.08 0.43381 0.442296 time to build strategy, 1.36719, seconds. time to price, 2.28906, seconds. vega output factorwise bumping 0 doCaps 0 price estimate, 0.442225 Delta, 0, 0.460573, 0.00283912 Delta, 1, 0.497331, 0.00282374 Delta, 2, 0.508616, 0.00272413 Delta, 3, 0.506396, 0.00259853 Delta, 4, 0.496328, 0.00247277 Delta, 5, 0.483507, 0.00235078 Delta, 6, 0.471974, 0.00224921 Delta, 7, 0.459962, 0.00215125 Delta, 8, 0.444803, 0.00206655 Delta, 9, 0.432474, 0.0019875 Delta, 10, 0.417119, 0.00190449 Delta, 11, 0.400283, 0.0018285 Delta, 12, 0.389304, 0.00177295 Delta, 13, 0.374843, 0.00171107 Delta, 14, 0.361905, 0.00165603 Delta, 15, 0.346607, 0.00159712 Delta, 16, 0.332138, 0.001552 Delta, 17, 0.318848, 0.00152276 Delta, 18, 0.304632, 0.00148693 Delta, 19, 0.279958, 0.00148421 vega, 0, -0.00159694 ,0 vega, 1, 0.000136159 ,0 vega, 2, 0.000157006 ,0 vega, 3, -3.79828e-05 ,0 vega, 4, -8.29012e-05 ,0 vega, 5, -9.53439e-05 ,0 vega, 6, -0.000226751 ,0 vega, 7, -0.000273561 ,0 vega, 8, -6.25763e-05 ,0 vega, 9, -0.000228828 ,0 vega, 10, -0.000122139 ,0 vega, 11, -3.35834e-06 ,0 vega, 12, -8.21506e-06 ,0 vega, 13, 3.76315e-05 ,0 vega, 14, -9.71785e-05 ,0 vega, 15, -4.08222e-05 ,0 vega, 16, -3.91734e-05 ,0 vega, 17, -0.000117918 ,0 vega, 18, -0.000125125 ,0 vega, 19, 4.88174e-05 ,0 total Vega, -0.0027792 vega output factorwise bumping 1 doCaps 0 price estimate, 0.442225 Delta, 0, 0.460573, 0.00283912 Delta, 1, 0.497331, 0.00282374 Delta, 2, 0.508616, 0.00272413 Delta, 3, 0.506396, 0.00259853 Delta, 4, 0.496328, 0.00247277 Delta, 5, 0.483507, 0.00235078 Delta, 6, 0.471974, 0.00224921 Delta, 7, 0.459962, 0.00215125 Delta, 8, 0.444803, 0.00206655 Delta, 9, 0.432474, 0.0019875 Delta, 10, 0.417119, 0.00190449 Delta, 11, 0.400283, 0.0018285 Delta, 12, 0.389304, 0.00177295 Delta, 13, 0.374843, 0.00171107 Delta, 14, 0.361905, 0.00165603 Delta, 15, 0.346607, 0.00159712 Delta, 16, 0.332138, 0.001552 Delta, 17, 0.318848, 0.00152276 Delta, 18, 0.304632, 0.00148693 Delta, 19, 0.279958, 0.00148421 vega, 0, -0.000398217 ,0 vega, 1, -0.000503983 ,0 vega, 2, -0.000433718 ,0 vega, 3, -0.00041735 ,0 vega, 4, -0.000394444 ,0 vega, 5, -0.000343568 ,0 vega, 6, -0.000203087 ,0 vega, 7, -0.000253678 ,0 vega, 8, -0.000105104 ,0 vega, 9, -0.000179857 ,0 vega, 10, -0.000128656 ,0 vega, 11, -1.26837e-05 ,0 vega, 12, -8.82276e-05 ,0 vega, 13, -2.8347e-05 ,0 vega, 14, -6.22754e-05 ,0 vega, 15, 6.69944e-06 ,0 vega, 16, -4.2464e-05 ,0 vega, 17, -1.64335e-05 ,0 vega, 18, -1.94719e-05 ,0 vega, 19, 4.86087e-05 ,0 total Vega, -0.00357626 vega output factorwise bumping 0 doCaps 1 price estimate, 0.442225 Delta, 0, 0.460573, 0.00283912 Delta, 1, 0.497331, 0.00282374 Delta, 2, 0.508616, 0.00272413 Delta, 3, 0.506396, 0.00259853 Delta, 4, 0.496328, 0.00247277 Delta, 5, 0.483507, 0.00235078 Delta, 6, 0.471974, 0.00224921 Delta, 7, 0.459962, 0.00215125 Delta, 8, 0.444803, 0.00206655 Delta, 9, 0.432474, 0.0019875 Delta, 10, 0.417119, 0.00190449 Delta, 11, 0.400283, 0.0018285 Delta, 12, 0.389304, 0.00177295 Delta, 13, 0.374843, 0.00171107 Delta, 14, 0.361905, 0.00165603 Delta, 15, 0.346607, 0.00159712 Delta, 16, 0.332138, 0.001552 Delta, 17, 0.318848, 0.00152276 Delta, 18, 0.304632, 0.00148693 Delta, 19, 0.279958, 0.00148421 vega, 0, -3.57294e-06 ,0 vega, 1, -4.20311e-05 ,0 vega, 2, 5.32395e-05 ,0 vega, 3, -3.82564e-05 ,0 vega, 4, 6.01927e-05 ,0 vega, 5, 7.88937e-05 ,0 vega, 6, 4.03392e-05 ,0 vega, 7, -6.90019e-05 ,0 vega, 8, 0.000296113 ,0 vega, 9, 6.147e-05 ,0 vega, 10, 3.59436e-05 ,0 vega, 11, 0.000211845 ,0 vega, 12, 0.000233816 ,0 vega, 13, 0.000270493 ,0 vega, 14, 9.93468e-05 ,0 vega, 15, -0.000224188 ,0 vega, 16, -0.000161354 ,0 vega, 17, -0.00024208 ,0 vega, 18, -0.000293824 ,0 vega, 19, -0.000330228 ,0 vega, 20, -0.000362651 ,0 vega, 21, -0.00036908 ,0 vega, 22, -0.000381055 ,0 vega, 23, -0.000361797 ,0 vega, 24, -0.000381614 ,0 vega, 25, -0.000381987 ,0 vega, 26, -0.000358666 ,0 vega, 27, -0.0003594 ,0 vega, 28, -0.000373214 ,0 vega, 29, -0.000372637 ,0 vega, 30, -0.000339783 ,0 vega, 31, -0.000358079 ,0 vega, 32, -0.000316225 ,0 vega, 33, -0.000279363 ,0 vega, 34, -0.000257126 ,0 total Vega, -0.00521552 vega output factorwise bumping 1 doCaps 1 price estimate, 0.442225 Delta, 0, 0.460573, 0.00283912 Delta, 1, 0.497331, 0.00282374 Delta, 2, 0.508616, 0.00272413 Delta, 3, 0.506396, 0.00259853 Delta, 4, 0.496328, 0.00247277 Delta, 5, 0.483507, 0.00235078 Delta, 6, 0.471974, 0.00224921 Delta, 7, 0.459962, 0.00215125 Delta, 8, 0.444803, 0.00206655 Delta, 9, 0.432474, 0.0019875 Delta, 10, 0.417119, 0.00190449 Delta, 11, 0.400283, 0.0018285 Delta, 12, 0.389304, 0.00177295 Delta, 13, 0.374843, 0.00171107 Delta, 14, 0.361905, 0.00165603 Delta, 15, 0.346607, 0.00159712 Delta, 16, 0.332138, 0.001552 Delta, 17, 0.318848, 0.00152276 Delta, 18, 0.304632, 0.00148693 Delta, 19, 0.279958, 0.00148421 vega, 0, 1.07662e-05 ,0 vega, 1, -4.76854e-05 ,0 vega, 2, 4.45414e-05 ,0 vega, 3, 3.83918e-05 ,0 vega, 4, 1.5429e-05 ,0 vega, 5, 1.42451e-05 ,0 vega, 6, 0.00016313 ,0 vega, 7, 5.55873e-05 ,0 vega, 8, 0.000188954 ,0 vega, 9, 7.5709e-05 ,0 vega, 10, 9.97703e-05 ,0 vega, 11, 0.000235537 ,0 vega, 12, 9.99334e-05 ,0 vega, 13, 0.000194768 ,0 vega, 14, 8.93619e-05 ,0 vega, 15, 0.000203512 ,0 vega, 16, 1.81428e-05 ,0 vega, 17, 5.97403e-05 ,0 vega, 18, 3.41968e-06 ,0 vega, 19, -0.000256639 ,0 vega, 20, -0.000162996 ,0 vega, 21, -0.000245118 ,0 vega, 22, -0.000302819 ,0 vega, 23, -0.000341443 ,0 vega, 24, -0.000365459 ,0 vega, 25, -0.000378764 ,0 vega, 26, -0.000394877 ,0 vega, 27, -0.000400764 ,0 vega, 28, -0.000404833 ,0 vega, 29, -0.000403374 ,0 vega, 30, -0.00039906 ,0 vega, 31, -0.000400152 ,0 vega, 32, -0.000391187 ,0 vega, 33, -0.000390598 ,0 vega, 34, -0.000378079 ,0 vega, 35, -0.000380115 ,0 vega, 36, -0.000350165 ,0 vega, 37, -0.000325744 ,0 vega, 38, -0.000285695 ,0 total Vega, -0.00539463 Upper - lower is, 0.000252942, with standard error 8.50214e-05 time to compute upper bound is, 13.3984, seconds. inverse floater fixed strikes : 0.15 number rates : 20 training paths, 65536 paths, 65536 vega Paths, 16384 rate level 0.09 0.510945 0.514723 time to build strategy, 1.35156, seconds. time to price, 2.29688, seconds. vega output factorwise bumping 0 doCaps 0 price estimate, 0.514711 Delta, 0, 0.229676, 0.001063 Delta, 1, 0.274306, 0.00162927 Delta, 2, 0.30378, 0.00183364 Delta, 3, 0.322475, 0.00189356 Delta, 4, 0.331584, 0.00187659 Delta, 5, 0.335404, 0.00182654 Delta, 6, 0.336513, 0.00177115 Delta, 7, 0.333858, 0.00169962 Delta, 8, 0.331342, 0.00164102 Delta, 9, 0.326109, 0.00157015 Delta, 10, 0.321658, 0.00150764 Delta, 11, 0.314438, 0.00144099 Delta, 12, 0.306646, 0.00138098 Delta, 13, 0.299191, 0.00131957 Delta, 14, 0.293588, 0.00127327 Delta, 15, 0.287061, 0.00122609 Delta, 16, 0.279314, 0.00118218 Delta, 17, 0.268988, 0.00114027 Delta, 18, 0.263255, 0.00109395 Delta, 19, 0.253101, 0.00107555 vega, 0, -0.000553764 ,0 vega, 1, -0.000313659 ,0 vega, 2, -7.74467e-05 ,0 vega, 3, -7.31924e-05 ,0 vega, 4, -0.000183027 ,0 vega, 5, -7.11524e-05 ,0 vega, 6, -0.000320414 ,0 vega, 7, -0.000191643 ,0 vega, 8, -0.000179688 ,0 vega, 9, -0.000188523 ,0 vega, 10, -0.000262632 ,0 vega, 11, -0.000104735 ,0 vega, 12, -3.67112e-05 ,0 vega, 13, 5.0801e-05 ,0 vega, 14, -7.67124e-05 ,0 vega, 15, -7.93589e-05 ,0 vega, 16, -8.17007e-05 ,0 vega, 17, -0.000139193 ,0 vega, 18, -0.000148013 ,0 vega, 19, -5.69882e-06 ,0 total Vega, -0.00303646 vega output factorwise bumping 1 doCaps 0 price estimate, 0.514711 Delta, 0, 0.229676, 0.001063 Delta, 1, 0.274306, 0.00162927 Delta, 2, 0.30378, 0.00183364 Delta, 3, 0.322475, 0.00189356 Delta, 4, 0.331584, 0.00187659 Delta, 5, 0.335404, 0.00182654 Delta, 6, 0.336513, 0.00177115 Delta, 7, 0.333858, 0.00169962 Delta, 8, 0.331342, 0.00164102 Delta, 9, 0.326109, 0.00157015 Delta, 10, 0.321658, 0.00150764 Delta, 11, 0.314438, 0.00144099 Delta, 12, 0.306646, 0.00138098 Delta, 13, 0.299191, 0.00131957 Delta, 14, 0.293588, 0.00127327 Delta, 15, 0.287061, 0.00122609 Delta, 16, 0.279314, 0.00118218 Delta, 17, 0.268988, 0.00114027 Delta, 18, 0.263255, 0.00109395 Delta, 19, 0.253101, 0.00107555 vega, 0, -9.56784e-05 ,0 vega, 1, -0.000349316 ,0 vega, 2, -0.000368785 ,0 vega, 3, -0.000392395 ,0 vega, 4, -0.000416583 ,0 vega, 5, -0.00038777 ,0 vega, 6, -0.000283443 ,0 vega, 7, -0.000292427 ,0 vega, 8, -0.000225062 ,0 vega, 9, -0.000172927 ,0 vega, 10, -0.000200831 ,0 vega, 11, -9.84221e-05 ,0 vega, 12, -8.84595e-05 ,0 vega, 13, -6.60413e-05 ,0 vega, 14, -0.000103 ,0 vega, 15, -6.94627e-05 ,0 vega, 16, -5.59954e-05 ,0 vega, 17, -2.0873e-05 ,0 vega, 18, -6.98918e-05 ,0 vega, 19, -1.7545e-06 ,0 total Vega, -0.00375912 vega output factorwise bumping 0 doCaps 1 price estimate, 0.514711 Delta, 0, 0.229676, 0.001063 Delta, 1, 0.274306, 0.00162927 Delta, 2, 0.30378, 0.00183364 Delta, 3, 0.322475, 0.00189356 Delta, 4, 0.331584, 0.00187659 Delta, 5, 0.335404, 0.00182654 Delta, 6, 0.336513, 0.00177115 Delta, 7, 0.333858, 0.00169962 Delta, 8, 0.331342, 0.00164102 Delta, 9, 0.326109, 0.00157015 Delta, 10, 0.321658, 0.00150764 Delta, 11, 0.314438, 0.00144099 Delta, 12, 0.306646, 0.00138098 Delta, 13, 0.299191, 0.00131957 Delta, 14, 0.293588, 0.00127327 Delta, 15, 0.287061, 0.00122609 Delta, 16, 0.279314, 0.00118218 Delta, 17, 0.268988, 0.00114027 Delta, 18, 0.263255, 0.00109395 Delta, 19, 0.253101, 0.00107555 vega, 0, 2.94452e-05 ,0 vega, 1, -7.00698e-05 ,0 vega, 2, 5.31718e-05 ,0 vega, 3, 2.2747e-05 ,0 vega, 4, -1.53564e-05 ,0 vega, 5, 8.88767e-05 ,0 vega, 6, -0.000126364 ,0 vega, 7, 2.06188e-05 ,0 vega, 8, 0.000160274 ,0 vega, 9, 0.000167783 ,0 vega, 10, -0.000177057 ,0 vega, 11, 1.47564e-05 ,0 vega, 12, 0.000243835 ,0 vega, 13, 0.000153604 ,0 vega, 14, 0.000211906 ,0 vega, 15, -0.000305443 ,0 vega, 16, -3.49366e-05 ,0 vega, 17, -0.000112531 ,0 vega, 18, -0.000180932 ,0 vega, 19, -0.000236119 ,0 vega, 20, -0.000291275 ,0 vega, 21, -0.000318101 ,0 vega, 22, -0.000331099 ,0 vega, 23, -0.000332397 ,0 vega, 24, -0.000358864 ,0 vega, 25, -0.000382323 ,0 vega, 26, -0.000343456 ,0 vega, 27, -0.000325816 ,0 vega, 28, -0.000356584 ,0 vega, 29, -0.000354673 ,0 vega, 30, -0.000333586 ,0 vega, 31, -0.000377143 ,0 vega, 32, -0.000344616 ,0 vega, 33, -0.000308718 ,0 vega, 34, -0.00028993 ,0 total Vega, -0.00514037 vega output factorwise bumping 1 doCaps 1 price estimate, 0.514711 Delta, 0, 0.229676, 0.001063 Delta, 1, 0.274306, 0.00162927 Delta, 2, 0.30378, 0.00183364 Delta, 3, 0.322475, 0.00189356 Delta, 4, 0.331584, 0.00187659 Delta, 5, 0.335404, 0.00182654 Delta, 6, 0.336513, 0.00177115 Delta, 7, 0.333858, 0.00169962 Delta, 8, 0.331342, 0.00164102 Delta, 9, 0.326109, 0.00157015 Delta, 10, 0.321658, 0.00150764 Delta, 11, 0.314438, 0.00144099 Delta, 12, 0.306646, 0.00138098 Delta, 13, 0.299191, 0.00131957 Delta, 14, 0.293588, 0.00127327 Delta, 15, 0.287061, 0.00122609 Delta, 16, 0.279314, 0.00118218 Delta, 17, 0.268988, 0.00114027 Delta, 18, 0.263255, 0.00109395 Delta, 19, 0.253101, 0.00107555 vega, 0, 7.98415e-06 ,0 vega, 1, -2.4354e-05 ,0 vega, 2, 3.70234e-05 ,0 vega, 3, 3.92433e-05 ,0 vega, 4, -1.83597e-05 ,0 vega, 5, -2.70327e-05 ,0 vega, 6, 7.08649e-05 ,0 vega, 7, -7.11253e-06 ,0 vega, 8, 6.39676e-05 ,0 vega, 9, 9.43271e-05 ,0 vega, 10, 2.82271e-05 ,0 vega, 11, 0.000131976 ,0 vega, 12, 9.74938e-05 ,0 vega, 13, 0.000161235 ,0 vega, 14, 6.30819e-05 ,0 vega, 15, 0.000104268 ,0 vega, 16, 5.25182e-05 ,0 vega, 17, 0.00010306 ,0 vega, 18, 1.90082e-05 ,0 vega, 19, -0.000340687 ,0 vega, 20, -3.52881e-05 ,0 vega, 21, -0.000117964 ,0 vega, 22, -0.000188503 ,0 vega, 23, -0.000245255 ,0 vega, 24, -0.000284163 ,0 vega, 25, -0.000311209 ,0 vega, 26, -0.000335292 ,0 vega, 27, -0.000345112 ,0 vega, 28, -0.000355703 ,0 vega, 29, -0.000362711 ,0 vega, 30, -0.000363717 ,0 vega, 31, -0.000366123 ,0 vega, 32, -0.00036084 ,0 vega, 33, -0.000365133 ,0 vega, 34, -0.000358883 ,0 vega, 35, -0.000358315 ,0 vega, 36, -0.000343427 ,0 vega, 37, -0.00033602 ,0 vega, 38, -0.000324417 ,0 total Vega, -0.00510134 Upper - lower is, 0.000176731, with standard error 6.68822e-05 time to compute upper bound is, 16.9219, seconds. /usr/bin/make -C MultidimIntegral check-examples ./MultidimIntegral -------------- Exact: 2.6303 Quad: 2.6303 Grid: 2.6303 Seconds for Quad: 0.0000 Seconds for Grid: 0.0234 /usr/bin/make -C Replication check-examples ./Replication =========================================================================== Initial market conditions =========================================================================== Option NPV Error --------------------------------------------------------------------------- Original barrier option 4.260726 N/A Replicating portfolio (12 dates) 4.322358 0.061632 Replicating portfolio (26 dates) 4.295464 0.034738 Replicating portfolio (52 dates) 4.280909 0.020183 =========================================================================== Modified market conditions: out of the money =========================================================================== Option NPV Error --------------------------------------------------------------------------- Original barrier option 2.513058 N/A Replicating portfolio (12 dates) 2.539365 0.026307 Replicating portfolio (26 dates) 2.528362 0.015304 Replicating portfolio (52 dates) 2.522105 0.009047 =========================================================================== Modified market conditions: in the money =========================================================================== Option NPV Error --------------------------------------------------------------------------- Original barrier option 5.739125 N/A Replicating portfolio (12 dates) 5.851239 0.112114 Replicating portfolio (26 dates) 5.799867 0.060742 Replicating portfolio (52 dates) 5.773678 0.034553 =========================================================================== The replication seems to be less robust when volatility and risk-free rate are changed. Feel free to experiment with the example and contribute a patch if you spot any errors. Run completed in 0 s /usr/bin/make -C Repo check-examples ./Repo Underlying bond clean price: 89.9769 Underlying bond dirty price: 93.288 Underlying bond accrued at settlement: 3.31111 Underlying bond accrued at delivery: 3.33333 Underlying bond spot income: 3.9834 Underlying bond fwd income: 4.08465 Repo strike: 91.5745 Repo NPV: -2.8066e-05 Repo clean forward price: 88.2411 Repo dirty forward price: 91.5745 Repo implied yield: 5.000063 % Actual/360 simple compounding Market repo rate: 5.000000 % Actual/360 simple compounding Compare with example given at http://www.fincad.com/support/developerFunc/mathref/BFWD.htm Clean forward price = 88.2408 In that example, it is unknown what bond calendar they are using, as well as settlement Days. For that reason, I have made the simplest possible assumptions here: NullCalendar and 0 settlement days. Run completed in 0 s /usr/bin/make -C Swap check-examples ./SwapValuation Today: Monday, September 20th, 2004 Settlement date: Wednesday, September 22nd, 2004 ==================================================================== 5-year market swap-rate = 4.43 % ==================================================================== 5-years swap paying 4.00 % term structure | net present value | fair spread | fair fixed rate | -------------------------------------------------------------------- depo-swap | 19065.88 | -0.42 % | 4.43 % | depo-fut-swap | 19076.14 | -0.42 % | 4.43 % | depo-FRA-swap | 19056.02 | -0.42 % | 4.43 % | -------------------------------------------------------------------- 5-years, 1-year forward swap paying 4.00 % term structure | net present value | fair spread | fair fixed rate | -------------------------------------------------------------------- depo-swap | 40049.46 | -0.92 % | 4.95 % | depo-fut-swap | 40092.79 | -0.92 % | 4.95 % | depo-FRA-swap | 37238.92 | -0.86 % | 4.88 % | ==================================================================== 5-year market swap-rate = 4.60 % ==================================================================== 5-years swap paying 4.00 % term structure | net present value | fair spread | fair fixed rate | -------------------------------------------------------------------- depo-swap | 26539.06 | -0.58 % | 4.60 % | depo-fut-swap | 26553.34 | -0.58 % | 4.60 % | depo-FRA-swap | 26525.34 | -0.58 % | 4.60 % | -------------------------------------------------------------------- 5-years, 1-year forward swap paying 4.00 % term structure | net present value | fair spread | fair fixed rate | -------------------------------------------------------------------- depo-swap | 45736.04 | -1.06 % | 5.09 % | depo-fut-swap | 45782.40 | -1.06 % | 5.09 % | depo-FRA-swap | 42922.60 | -0.99 % | 5.02 % | Run completed in 0 s Making check in ql --- check-recursive --- Making check in cashflows Making check in currencies Making check in experimental --- check-recursive --- Making check in amortizingbonds Making check in averageois Making check in barrieroption Making check in callablebonds Making check in catbonds Making check in commodities Making check in convertiblebonds Making check in coupons Making check in credit Making check in exoticoptions Making check in finitedifferences Making check in fx Making check in inflation Making check in lattices Making check in math Making check in mcbasket Making check in models Making check in processes Making check in risk Making check in shortrate Making check in swaptions Making check in termstructures Making check in variancegamma Making check in varianceoption Making check in volatility Making check in indexes --- check-recursive --- Making check in ibor Making check in inflation Making check in swap Making check in instruments --- check-recursive --- Making check in bonds Making check in legacy --- check-recursive --- Making check in libormarketmodels Making check in math --- check-recursive --- Making check in copulas Making check in distributions Making check in integrals Making check in interpolations Making check in matrixutilities Making check in ode Making check in optimization Making check in randomnumbers Making check in solvers1d Making check in statistics Making check in methods --- check-recursive --- Making check in finitedifferences --- check-recursive --- Making check in meshers Making check in operators Making check in schemes Making check in solvers Making check in stepconditions Making check in utilities Making check in lattices Making check in montecarlo Making check in models --- check-recursive --- Making check in equity Making check in marketmodels --- check-recursive --- Making check in browniangenerators Making check in callability Making check in correlations Making check in curvestates Making check in driftcomputation Making check in evolvers --- check-recursive --- Making check in volprocesses Making check in models Making check in products --- check-recursive --- Making check in onestep Making check in multistep Making check in pathwise Making check in pathwisegreeks Making check in shortrate --- check-recursive --- Making check in calibrationhelpers Making check in onefactormodels Making check in twofactormodels Making check in volatility Making check in patterns Making check in pricingengines --- check-recursive --- Making check in asian Making check in barrier Making check in basket Making check in bond Making check in capfloor Making check in cliquet Making check in credit Making check in forward Making check in inflation Making check in lookback Making check in quanto Making check in swap Making check in swaption Making check in vanilla Making check in processes Making check in quotes Making check in termstructures --- check-recursive --- Making check in credit Making check in inflation Making check in volatility --- check-recursive --- Making check in equityfx Making check in capfloor Making check in inflation Making check in optionlet Making check in swaption Making check in yield Making check in time --- check-recursive --- Making check in calendars Making check in daycounters Making check in utilities Making check in m4 Making check in man Making check in Docs Making check in Examples --- check-recursive --- Making check in BasketLosses --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- BasketLosses.log --- PASS: BasketLosses --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in BermudanSwaption --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- BermudanSwaption.log --- PASS: BermudanSwaption --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in Bonds --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- Bonds.log --- PASS: Bonds --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in CallableBonds --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- CallableBonds.log --- PASS: CallableBonds --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in CDS --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- CDS.log --- PASS: CDS --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in ConvertibleBonds --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- ConvertibleBonds.log --- PASS: ConvertibleBonds --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in CVAIRS --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- CVAIRS.log --- PASS: CVAIRS --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in DiscreteHedging --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- DiscreteHedging.log --- PASS: DiscreteHedging --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in EquityOption --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- EquityOption.log --- PASS: EquityOption --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in FittedBondCurve --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- FittedBondCurve.log --- PASS: FittedBondCurve --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in FRA --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- FRA.log --- PASS: FRA --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in Gaussian1dModels --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- Gaussian1dModels.log --- PASS: Gaussian1dModels --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in GlobalOptimizer --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- GlobalOptimizer.log --- PASS: GlobalOptimizer --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in LatentModel --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- LatentModel.log --- PASS: LatentModel --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in MarketModels --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- MarketModels.log --- PASS: MarketModels --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in MultidimIntegral --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- MultidimIntegral.log --- PASS: MultidimIntegral --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in Replication --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- Replication.log --- PASS: Replication --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in Repo --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- Repo.log --- PASS: Repo --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in Swap --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- SwapValuation.log --- PASS: SwapValuation --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ Making check in test-suite --- check-am --- /usr/bin/make -j32 check-TESTS --- check-TESTS --- --- quantlib-test-suite.log --- PASS: quantlib-test-suite --- test-suite.log --- ============================================================================ Testsuite summary for QuantLib 1.14 ============================================================================ # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ You have new mail in /var/mail/pi fc$ exit Script done on Sun Feb 3 10:01:10 2019