{"id":716,"date":"2016-12-16T15:19:41","date_gmt":"2016-12-16T15:19:41","guid":{"rendered":"https:\/\/www.ephiquant.com\/?p=716"},"modified":"2016-12-16T15:19:41","modified_gmt":"2016-12-16T15:19:41","slug":"pricing-des-options-avec-le-modele-de-cox-ross-rubinstein-en-c","status":"publish","type":"post","link":"https:\/\/www.ephiquant.com\/?p=716","title":{"rendered":"Pricing des options avec le mod\u00e8le de Cox-Ross-Rubinstein en C++"},"content":{"rendered":"<p>Parmi les mod\u00e8les utilis\u00e9s pour le pricing des options, on a le c\u00e9l\u00e9brissime mod\u00e8le de <strong><span style=\"color: #0000ff;\">Black-Scholes-Merton(1973)<\/span><\/strong> mais aussi le non-moins c\u00e9l\u00e8bre <strong><span style=\"color: #0000ff;\">mod\u00e8le de Cox-Ross-Rubinstein(1979)<\/span><\/strong> qui est un mod\u00e8le discret contrairement au premier et qui a la cote parmi les mod\u00e8les discrets. Il a la particularit\u00e9 d&#8217;\u00eatre simple et intuitif, il vous \u00e9pargne toute l&#8217;armada math\u00e9matique (les processus et \u00e9quations diff\u00e9rentielles stochastiques) sous bassement du mod\u00e8le de <strong>Black-Scholes-Merton<\/strong> et ne d\u00e9m\u00e9rite en terme\u00a0de r\u00e9sultats. En effet, avec un peu de gymnastique math\u00e9matique, on peut aboutir au mod\u00e8le de <strong>Black-Scholes-Merton<\/strong>.<\/p>\n <style type=\"text\/css\" scoped=\"scoped\">.alert-6a120665534ae{background-color:#f5f5f5;color:#1d8900;border-color:#1d8900;border-width:0px;border-radius:0px;} <\/style><div class=\"alert magee-alert  alert-6a120665534ae \" role=\"alert\" id= \"\"><i class=\"fa fa-star-o\"><\/i>Un Quant qui se respecte se doit de ma\u00eetriser au moins l&#8217;un des langages orient\u00e9s objets comme(par ordre \u00a0et de mes pr\u00e9f\u00e9r\u00e9s) C\/C++, JAVA, C# notamment pour leur robustesse et \u00e0 c\u00f4t\u00e9 de \u00e7a ajouter un langage du genre R, Python, Octave et VBA. Par exp\u00e9rience, si vous ma\u00eetrisez du C++(A\u00a0mon avis le plus robuste des langages), aucun notre langage ne vous r\u00e9sistera ! Mais si vous ne voulez pas \u00eatre polyglotte opter pour Python ou R, ils sont un bon compromis entre robustesse, simplicit\u00e9 et ce sont des langages faciles \u00e0 apprendre\u00a0et tr\u00e8s pratique pour le data processing. Mais apr\u00e8s tout c&#8217;est une affaire de go\u00fbt !<\/div>\n<p>Notre article ne porte pas sur la d\u00e9rivation du <strong>mod\u00e8le de Black-Scholes-Merton<\/strong> mais celle du <strong>Mod\u00e8le de Cox-Ross-Rubinstein<\/strong> et de son\u00a0impl\u00e9mentation en <strong>C++<\/strong> <strong>dans un paradigme Orient\u00e9 Objet<\/strong>.<\/p>\n<div id=\"attachment_732\" style=\"width: 653px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-732\" class=\"wp-image-732\" src=\"https:\/\/www.ephiquant.com\/wp-content\/uploads\/2016\/12\/binomial.png\" alt=\"binomial\" width=\"643\" height=\"414\" srcset=\"https:\/\/www.ephiquant.com\/wp-content\/uploads\/2016\/12\/binomial.png 482w, https:\/\/www.ephiquant.com\/wp-content\/uploads\/2016\/12\/binomial-300x193.png 300w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><p id=\"caption-attachment-732\" class=\"wp-caption-text\">Exemple d&#8217;arbre binomial apr\u00e8s 3 it\u00e9rations (Extrait du livre : The Theory and Practice of Investment Management)<\/p><\/div>\n<p>&nbsp;<\/p>\n<h3>Mod\u00e8le Binomial de Cox-Ross-Rubinstein :<\/h3>\n<h4>Description du mod\u00e8le dans le cadre d&#8217;une option europ\u00e9enne<\/h4>\n<p>En <strong>l&#8217;Absence d&#8217;Opportunit\u00e9 d&#8217;Arbitrage<\/strong> et en supposant notamment que le prix du sous-jacent <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-520cb534cd5b6bed768a61515b57cb7e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#83;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"12\" style=\"vertical-align: 0px;\"\/>, ne puisse prendre \u00e0 une it\u00e9ration\u00a0i\u00a0de <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-f9ed275b0bf1633b7ee83b78fcc28273_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: 0px;\"\/>\u00a0que la valeur <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-c8fee3d94c8badb964db4691131d5f9f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#83;&#95;&#105;&#94;&#117;\" title=\"Rendered by QuickLaTeX.com\" height=\"17\" width=\"20\" style=\"vertical-align: -5px;\"\/> quand elle \u00e9volue \u00e0 la hausse et <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-36560264b0bcd2fbf03e11443e7cdda9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#83;&#95;&#105;&#94;&#100;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"20\" style=\"vertical-align: -5px;\"\/> lors d&#8217;une \u00e9volution \u00e0 la baisse, telle que\u00a0:<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 54px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-70a7e9e297edddb581f61dbc5fe897ed_l3.png\" height=\"54\" width=\"390\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#091;&#32;&#83;&#95;&#105;&#32;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#99;&#97;&#115;&#101;&#115;&#125;&#32;&#83;&#94;&#117;&#95;&#105;&#32;&#61;&#32;&#83;&#95;&#123;&#105;&#45;&#49;&#125;&#92;&#99;&#100;&#111;&#116;&#32;&#117;&#92;&#113;&#117;&#97;&#100;&#92;&#113;&#117;&#97;&#100;&#92;&#116;&#101;&#120;&#116;&#123;&#97;&#118;&#101;&#99;&#32;&#117;&#110;&#101;&#32;&#112;&#114;&#111;&#98;&#97;&#98;&#105;&#108;&#105;&#116;&#92;&#39;&#101;&#32;&#36;&#112;&#36;&#125;&#92;&#92;&#83;&#94;&#100;&#95;&#105;&#32;&#61;&#32;&#83;&#95;&#123;&#105;&#45;&#49;&#125;&#92;&#99;&#100;&#111;&#116;&#32;&#100;&#92;&#113;&#117;&#97;&#100;&#92;&#113;&#117;&#97;&#100;&#92;&#116;&#101;&#120;&#116;&#123;&#97;&#118;&#101;&#99;&#32;&#117;&#110;&#101;&#32;&#112;&#114;&#111;&#98;&#97;&#98;&#105;&#108;&#105;&#116;&#92;&#39;&#101;&#32;&#36;&#49;&#45;&#112;&#36;&#125;&#92;&#093;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> Nous pouvons alors d\u00e9finir la valeur <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-0fd1f2335fd1e7afc0aa70fb144d4908_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#83;&#95;&#123;&#106;&#44;&#105;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"25\" style=\"vertical-align: -6px;\"\/> par rapport \u00e0 la valeur <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-d93e619cd77e3f792ef6dbca1079f902_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#83;&#95;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"18\" style=\"vertical-align: -3px;\"\/> ( le prix de l&#8217;actif sous-jacent \u00e0 la date du contrat) comme un arbre\u00a0binomial dont la valeur \u00e0 l&#8217;issue de <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-695d9d59bd04859c6c99e7feb11daab6_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"6\" style=\"vertical-align: 0px;\"\/> it\u00e9ration\u00a0et pour <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-43c82d5bb00a7568d935a12e3bd969dd_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#106;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"9\" style=\"vertical-align: -4px;\"\/> hausse vaut : <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 21px;\"><span class=\"ql-right-eqno\"> (1) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-5d09b49832f1246c2a74caba10375236_l3.png\" height=\"21\" width=\"316\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#83;&#95;&#48;&#92;&#99;&#100;&#111;&#116;&#32;&#117;&#94;&#106;&#92;&#99;&#100;&#111;&#116;&#32;&#100;&#94;&#123;&#105;&#45;&#106;&#125;&#32;&#92;&#113;&#117;&#97;&#100;&#92;&#116;&#101;&#120;&#116;&#123;&#97;&#118;&#101;&#99;&#125;&#92;&#113;&#117;&#97;&#100;&#32;&#105;&#32;&#61;&#32;&#48;&#44;&#49;&#44;&#92;&#100;&#111;&#116;&#115;&#44;&#110;&#45;&#49;&#44;&#32;&#110;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>S&#8217;il est possible de d\u00e9terminer les valeurs de <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-520cb534cd5b6bed768a61515b57cb7e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#83;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"12\" style=\"vertical-align: 0px;\"\/>\u00a0\u00e0 chaque n\u0153ud d&#8217;un arbre, il est donc aussi possible de calculer la valeur de l&#8217;option <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-63ada879859a9e41fd935f035b7313bc_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"14\" style=\"vertical-align: 0px;\"\/> \u00e0 chacun de ces n\u0153uds \u00a0comme ceci :\u00a0<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 54px;\"><span class=\"ql-right-eqno\"> (2) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-7fc0cd2d5e66cde8eb57c15be55ba548_l3.png\" height=\"54\" width=\"385\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#86;&#95;&#123;&#106;&#44;&#105;&#125;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#99;&#97;&#115;&#101;&#115;&#125;&#32;&#109;&#97;&#120;&#40;&#48;&#44;&#83;&#95;&#123;&#106;&#44;&#105;&#125;&#45;&#32;&#75;&#41;&#92;&#113;&#117;&#97;&#100;&#92;&#113;&#117;&#97;&#100;&#92;&#116;&#101;&#120;&#116;&#123;&#100;&#97;&#110;&#115;&#32;&#108;&#101;&#32;&#99;&#97;&#115;&#32;&#100;&#39;&#117;&#110;&#32;&#99;&#97;&#108;&#108;&#125;&#92;&#92;&#109;&#97;&#120;&#40;&#48;&#44;&#75;&#45;&#83;&#95;&#123;&#106;&#44;&#105;&#125;&#41;&#92;&#113;&#117;&#97;&#100;&#92;&#113;&#117;&#97;&#100;&#92;&#116;&#101;&#120;&#116;&#123;&#100;&#97;&#110;&#115;&#32;&#108;&#101;&#32;&#99;&#97;&#115;&#32;&#100;&#39;&#117;&#110;&#32;&#112;&#117;&#116;&#125;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>Prenons un exemple de Call apr\u00e8s une it\u00e9ration la valeur <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-92502d11fc38815aa8508ae17df67aa5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#67;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"19\" style=\"vertical-align: -4px;\"\/> \u00e0 chaque n\u0153ud vaut :<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 54px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-e29b23f7479fbbb5f17702b14d65746d_l3.png\" height=\"54\" width=\"496\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#091;&#67;&#95;&#49;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#99;&#97;&#115;&#101;&#115;&#125;&#32;&#67;&#94;&#117;&#95;&#49;&#32;&#61;&#32;&#109;&#97;&#120;&#40;&#48;&#44;&#83;&#94;&#117;&#95;&#49;&#45;&#32;&#75;&#41;&#92;&#113;&#117;&#97;&#100;&#92;&#113;&#117;&#97;&#100;&#92;&#116;&#101;&#120;&#116;&#123;&#97;&#118;&#101;&#99;&#32;&#117;&#110;&#101;&#32;&#112;&#114;&#111;&#98;&#97;&#98;&#105;&#108;&#105;&#116;&#92;&#39;&#101;&#32;&#36;&#112;&#36;&#125;&#92;&#92;&#67;&#94;&#100;&#95;&#49;&#32;&#61;&#32;&#109;&#97;&#120;&#40;&#48;&#44;&#83;&#94;&#100;&#95;&#49;&#45;&#32;&#75;&#41;&#32;&#61;&#32;&#48;&#92;&#113;&#117;&#97;&#100;&#92;&#113;&#117;&#97;&#100;&#92;&#116;&#101;&#120;&#116;&#123;&#97;&#118;&#101;&#99;&#32;&#117;&#110;&#101;&#32;&#112;&#114;&#111;&#98;&#97;&#98;&#105;&#108;&#105;&#116;&#92;&#39;&#101;&#32;&#36;&#49;&#45;&#112;&#36;&#125;&#92;&#093;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> Donc d&#8217;apr\u00e8s ce d\u00e9veloppement, il est possible de d\u00e9terminer la valeur de <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-92502d11fc38815aa8508ae17df67aa5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#67;&#95;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"19\" style=\"vertical-align: -4px;\"\/> selon que <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-4390e239042ede03256c33e3a64e54b6_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#83;&#94;&#117;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"20\" style=\"vertical-align: 0px;\"\/> ou <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-81e20d88661e7b4c85403168a3e4d0e8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#83;&#94;&#100;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"20\" style=\"vertical-align: 0px;\"\/> se r\u00e9alise. Mais ce que nous nous voulons c&#8217;est la valeur <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-b86dcc1b221c53263fedbe0c87a8366a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#67;&#95;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"20\" style=\"vertical-align: -3px;\"\/> de l&#8217;option Call.<\/p>\n<p>C&#8217;est l\u00e0 qu&#8217;il faut faire appel \u00e0 un ingr\u00e9dient incontournable l&#8217;<strong>hypoth\u00e8se de Risque Neutre<\/strong> qui veut que :<\/p>\n<ul>\n<li>&#8211; L&#8217;esp\u00e9rance de rendement de l&#8217;actif sous-jacent\u00a0est \u00e9gale au taux de rendement de l&#8217;actif sans risque <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-c409433a9e2dfcdb83360a974d243f18_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#114;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"8\" style=\"vertical-align: 0px;\"\/><\/li>\n<li>&#8211; <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-c409433a9e2dfcdb83360a974d243f18_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#114;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"8\" style=\"vertical-align: 0px;\"\/>, le \u00a0taux de l&#8217;actif sans risque soit le taux d\u2019actualisation.<\/li>\n<\/ul>\n<p>Et dans ce cas : <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 22px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-17c2087329d05a9311286620f4407a1c_l3.png\" height=\"22\" width=\"233\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#091;&#67;&#95;&#48;&#32;&#61;&#32;&#091;&#112;&#92;&#99;&#100;&#111;&#116;&#32;&#67;&#95;&#49;&#94;&#117;&#45;&#40;&#49;&#45;&#112;&#41;&#92;&#99;&#100;&#111;&#116;&#32;&#67;&#95;&#49;&#94;&#100;&#093;&#101;&#94;&#123;&#45;&#114;&#125;&#92;&#093;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> ou de mani\u00e8re g\u00e9n\u00e9rale, on peut calculer la valeur d&#8217;une option call comme put \u00a0de type europ\u00e9enne(dont l&#8217;exercice ne peut advenir qu&#8217;\u00e0 la date d&#8217;expiration): <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 22px;\"><span class=\"ql-right-eqno\"> (3) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-20f2dfd3ef8a186b5a91270b8cb834c2_l3.png\" height=\"22\" width=\"317\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#86;&#95;&#123;&#106;&#44;&#105;&#125;&#61;&#091;&#112;&#92;&#99;&#100;&#111;&#116;&#32;&#86;&#95;&#123;&#106;&#43;&#49;&#44;&#105;&#43;&#49;&#125;&#32;&#43;&#32;&#40;&#49;&#45;&#112;&#41;&#92;&#99;&#100;&#111;&#116;&#32;&#86;&#95;&#123;&#106;&#44;&#105;&#43;&#49;&#125;&#093;&#101;&#94;&#123;&#45;&#114;&#92;&#99;&#100;&#111;&#116;&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;&#125;&#32;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> ou si l&#8217;on pr\u00e9f\u00e8re cette \u00e9criture \u00a0<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 23px;\"><span class=\"ql-right-eqno\"> (4) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-e2bef710f6092297d3b99de0201c7ccc_l3.png\" height=\"23\" width=\"281\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#86;&#95;&#123;&#106;&#44;&#105;&#125;&#61;&#091;&#112;&#92;&#99;&#100;&#111;&#116;&#32;&#86;&#95;&#123;&#105;&#43;&#49;&#125;&#94;&#117;&#43;&#32;&#40;&#49;&#45;&#112;&#41;&#92;&#99;&#100;&#111;&#116;&#32;&#86;&#95;&#123;&#105;&#43;&#49;&#125;&#94;&#100;&#093;&#101;&#94;&#123;&#45;&#114;&#92;&#99;&#100;&#111;&#116;&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;&#125;&#32;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> Avec <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-3c86b197446a98113c106b71ad7c7c9c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;&#61;&#92;&#102;&#114;&#97;&#99;&#123;&#84;&#125;&#123;&#110;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"57\" style=\"vertical-align: -6px;\"\/> o\u00f9 <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-f9ed275b0bf1633b7ee83b78fcc28273_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: 0px;\"\/> est la maturit\u00e9 de l&#8217;option et <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-b170995d512c659d8668b4e42e1fef6b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"11\" style=\"vertical-align: 0px;\"\/> le nombre d&#8217;it\u00e9ration ou de niveau de notre arbre binomial. Et <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-3bf85f1087e9fbed3a319341134ac1a2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: -4px;\"\/> la probabilit\u00e9 risque neutre qui\u00a0vaut <\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 37px;\"><span class=\"ql-right-eqno\"> (5) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-3ef392380f06c6d2da0435649f445540_l3.png\" height=\"37\" width=\"83\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#112;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#101;&#94;&#114;&#45;&#100;&#125;&#123;&#117;&#45;&#100;&#125;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> par ce qu&#8217;en effet d&#8217;apr\u00e8s la premi\u00e8re cons\u00e9quence de l&#8217;hypoth\u00e8se risque neutre : <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-41efff23a6f7d19141d9d551a59465f5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#101;&#94;&#114;&#32;&#61;&#32;&#112;&#92;&#99;&#100;&#111;&#116;&#32;&#117;&#32;&#43;&#32;&#40;&#49;&#45;&#112;&#41;&#92;&#99;&#100;&#111;&#116;&#32;&#100;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"169\" style=\"vertical-align: -4px;\"\/><\/p>\n<p>Par ailleurs, ils nous restent encore deux param\u00e8tres dont nous n&#8217;avons pas encore d\u00e9termin\u00e9s les valeurs, il s&#8217;agit de <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-43fe27dc3e528266a619764d90fce60b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#117;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"10\" style=\"vertical-align: 0px;\"\/> et <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-4e8716946f6a868f015e0d62f28bc540_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"10\" style=\"vertical-align: 0px;\"\/>. De combien \u00e9volue le sous-jacent- il \u00e0 la hausse <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-43fe27dc3e528266a619764d90fce60b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#117;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"10\" style=\"vertical-align: 0px;\"\/> et \u00e0 la baisse <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-4e8716946f6a868f015e0d62f28bc540_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"10\" style=\"vertical-align: 0px;\"\/> ?<\/p>\n<p>Pour trouver ces\u00a0valeurs, Cox, Ross\u00a0et Rubinstein vont tout simplement les extraire de l&#8217;expression de la variance <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-db2b445da4f4cdd1f8313d8d4b2bb1c4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#115;&#105;&#103;&#109;&#97;&#94;&#50;&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"39\" style=\"vertical-align: 0px;\"\/> et en rempla\u00e7ant le <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-3bf85f1087e9fbed3a319341134ac1a2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: -4px;\"\/> par l\u2019\u00e9quation <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-722c9007d2d1af0302f3a0cd542f094c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#53;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"21\" style=\"vertical-align: -4px;\"\/> et apr\u00e8s simplification des membres avec des d\u00e9gr\u00e9s sup\u00e9rieur ou \u00e9gal \u00e0\u00a0<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-00ac814b9a2a572506aa7892cba74d70_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;&#94;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"28\" style=\"vertical-align: 0px;\"\/>, on obtient que :<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 20px;\"><span class=\"ql-right-eqno\"> (6) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-ce5da3f5d5666b14250d3161bf36a98c_l3.png\" height=\"20\" width=\"256\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#117;&#61;&#101;&#94;&#123;&#92;&#115;&#105;&#103;&#109;&#97;&#92;&#115;&#113;&#114;&#116;&#123;&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;&#125;&#125;&#92;&#113;&#117;&#97;&#100;&#92;&#113;&#117;&#97;&#100;&#92;&#113;&#117;&#97;&#100;&#92;&#113;&#117;&#97;&#100;&#92;&#113;&#117;&#97;&#100;&#32;&#100;&#61;&#101;&#94;&#123;&#45;&#92;&#115;&#105;&#103;&#109;&#97;&#92;&#115;&#113;&#114;&#116;&#123;&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;&#125;&#125;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<h4>Cas particulier de l&#8217;option am\u00e9ricaine<\/h4>\n<p>Contrairement \u00e0 une option europ\u00e9enne qui attend d&#8217;\u00eatre exerc\u00e9e \u00e0 la date d&#8217;expiration, l&#8217;option am\u00e9ricaine, peut \u00eatre exerc\u00e9e en tout point optimal entre la date de signature du contrat et la date d&#8217;expiration. Ainsi, \u00e0 chaque n\u0153ud au lieu de consid\u00e9rer seulement <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-3fd39a3be32735d818de8118579e78b0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#091;&#112;&#92;&#99;&#100;&#111;&#116;&#32;&#86;&#95;&#123;&#106;&#43;&#49;&#44;&#105;&#43;&#49;&#125;&#32;&#43;&#32;&#40;&#49;&#45;&#112;&#41;&#92;&#99;&#100;&#111;&#116;&#32;&#86;&#95;&#123;&#106;&#44;&#105;&#43;&#49;&#125;&#093;&#101;&#94;&#123;&#45;&#114;&#92;&#99;&#100;&#111;&#116;&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"21\" width=\"267\" style=\"vertical-align: -6px;\"\/> on comparera cette derni\u00e8re \u00e0 <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-87ca8c25af11e32b3a825434045ee1ed_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#83;&#95;&#48;&#92;&#99;&#100;&#111;&#116;&#32;&#117;&#94;&#106;&#92;&#99;&#100;&#111;&#116;&#32;&#100;&#94;&#123;&#105;&#45;&#106;&#125;&#45;&#75;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"131\" style=\"vertical-align: -3px;\"\/> dans le cas d&#8217;un call et <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-e571c7bf7afc68724e627cdd27c3482b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#75;&#45;&#83;&#95;&#48;&#92;&#99;&#100;&#111;&#116;&#32;&#117;&#94;&#106;&#92;&#99;&#100;&#111;&#116;&#32;&#100;&#94;&#123;&#105;&#45;&#106;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"130\" style=\"vertical-align: -3px;\"\/> dans le cas d&#8217;un put \u00a0:<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 22px;\"><span class=\"ql-right-eqno\"> (7) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-8b880aae6e5e51886dd25d72ae8d6ffd_l3.png\" height=\"22\" width=\"505\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#86;&#95;&#123;&#106;&#44;&#105;&#125;&#61;&#109;&#97;&#120;&#40;&#091;&#112;&#92;&#99;&#100;&#111;&#116;&#32;&#86;&#95;&#123;&#106;&#43;&#49;&#44;&#105;&#43;&#49;&#125;&#32;&#43;&#32;&#40;&#49;&#45;&#112;&#41;&#92;&#99;&#100;&#111;&#116;&#32;&#86;&#95;&#123;&#106;&#44;&#105;&#43;&#49;&#125;&#093;&#101;&#94;&#123;&#45;&#114;&#92;&#99;&#100;&#111;&#116;&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;&#125;&#32;&#44;&#83;&#95;&#48;&#92;&#99;&#100;&#111;&#116;&#32;&#117;&#94;&#106;&#92;&#99;&#100;&#111;&#116;&#32;&#100;&#94;&#123;&#105;&#45;&#106;&#125;&#45;&#75;&#41;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> dans le cas d&#8217;un call et\u00a0<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 22px;\"><span class=\"ql-right-eqno\"> (8) <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-00315f01ea8c1804f3059e52faeb78f7_l3.png\" height=\"22\" width=\"505\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#86;&#95;&#123;&#106;&#44;&#105;&#125;&#61;&#109;&#97;&#120;&#40;&#091;&#112;&#92;&#99;&#100;&#111;&#116;&#32;&#86;&#95;&#123;&#106;&#43;&#49;&#44;&#105;&#43;&#49;&#125;&#32;&#43;&#32;&#40;&#49;&#45;&#112;&#41;&#92;&#99;&#100;&#111;&#116;&#32;&#86;&#95;&#123;&#106;&#44;&#105;&#43;&#49;&#125;&#093;&#101;&#94;&#123;&#45;&#114;&#92;&#99;&#100;&#111;&#116;&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;&#125;&#32;&#44;&#75;&#45;&#83;&#95;&#48;&#92;&#99;&#100;&#111;&#116;&#32;&#117;&#94;&#106;&#92;&#99;&#100;&#111;&#116;&#32;&#100;&#94;&#123;&#105;&#45;&#106;&#125;&#41;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p> si c&#8217;est un call.<\/p>\n<h4>Nombre d&#8217;it\u00e9ration et\u00a0convergence du mod\u00e8le CRR vers le Mod\u00e8le de BSM<\/h4>\n<p>Prenons une option de type call europ\u00e9en ayant les caract\u00e9ristiques suivantes : Prix spot 35, prix d&#8217;exercice 36, taux d\u2019int\u00e9r\u00eat sans risque 5%(annuel), la volatilit\u00e9 30%(annuelle), maturit\u00e9 1(annuelle). Normalement la valeur d&#8217;un tel call europ\u00e9en pour Black-Scholes-Merton vaut 4.5169.<\/p>\n<p>Voyons maintenant avec l&#8217;arbre binomial de Cox-Ross-Rubinstein. Consid\u00e9rons d&#8217;abord que le nombre d&#8217;it\u00e9ration est de N = 1, nous pouvons calculer : <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-e716a777c2e68cf5ae5741432a443093_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#117;&#61;&#32;&#101;&#94;&#123;&#48;&#46;&#51;&#92;&#99;&#100;&#111;&#116;&#92;&#115;&#113;&#114;&#116;&#123;&#49;&#47;&#49;&#125;&#125;&#61;&#49;&#46;&#51;&#53;\" title=\"Rendered by QuickLaTeX.com\" height=\"21\" width=\"154\" style=\"vertical-align: -1px;\"\/>, donc <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-1169608f29d6467ef9d086ec3eb9b8ad_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#32;&#61;&#32;&#49;&#47;&#117;&#61;&#48;&#46;&#55;&#52;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"116\" style=\"vertical-align: -5px;\"\/> et <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-2f5aaf2dd6b26b22a0b85f09706fc21d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#61;&#40;&#101;&#94;&#123;&#48;&#46;&#48;&#53;&#47;&#49;&#125;&#45;&#48;&#46;&#55;&#52;&#41;&#47;&#40;&#49;&#46;&#51;&#53;&#45;&#48;&#46;&#55;&#52;&#41;&#61;&#48;&#46;&#53;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"310\" style=\"vertical-align: -5px;\"\/> et apr\u00e8s bifurcation on aura : <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-30055b3edcd3ed0db1752f4c8458fa36_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#99;&#97;&#108;&#108;&#32;&#61;&#32;&#091;&#49;&#49;&#46;&#50;&#53;&#92;&#99;&#100;&#111;&#116;&#32;&#48;&#46;&#53;&#49;&#43;&#48;&#92;&#99;&#100;&#111;&#116;&#32;&#40;&#49;&#45;&#48;&#46;&#53;&#49;&#41;&#093;&#101;&#94;&#123;&#45;&#48;&#46;&#48;&#53;&#92;&#99;&#100;&#111;&#116;&#32;&#49;&#125;&#61;&#53;&#46;&#52;&#53;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"375\" style=\"vertical-align: -5px;\"\/>.<\/p>\n<p>Puis pou N=2 :\u00a0<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-2fef557cb62f94dd26d2578b0c348402_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#117;&#61;&#32;&#101;&#94;&#123;&#48;&#46;&#51;&#92;&#99;&#100;&#111;&#116;&#92;&#115;&#113;&#114;&#116;&#123;&#49;&#47;&#50;&#125;&#125;&#61;&#49;&#46;&#50;&#52;\" title=\"Rendered by QuickLaTeX.com\" height=\"21\" width=\"155\" style=\"vertical-align: -1px;\"\/>, donc <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-c69dd998f8abd8e727b76403ba03a538_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#32;&#61;&#32;&#49;&#47;&#117;&#61;&#48;&#46;&#56;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"115\" style=\"vertical-align: -5px;\"\/> et <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-540a96ee58482eea30c4c7d949cf0238_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#61;&#40;&#101;&#94;&#123;&#48;&#46;&#48;&#53;&#47;&#50;&#125;&#45;&#48;&#46;&#56;&#49;&#41;&#47;&#40;&#49;&#46;&#50;&#52;&#45;&#48;&#46;&#56;&#49;&#41;&#61;&#48;&#46;&#53;&#49;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"310\" style=\"vertical-align: -5px;\"\/> et apr\u00e8s bifurcation on aura ce que le <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-99124d7574a04e75b16c13a04922d20a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#99;&#97;&#108;&#108;&#32;&#61;&#32;&#091;&#49;&#55;&#46;&#53;&#92;&#99;&#100;&#111;&#116;&#48;&#46;&#53;&#49;&#94;&#50;&#43;&#50;&#92;&#99;&#100;&#111;&#116;&#48;&#92;&#99;&#100;&#111;&#116;&#40;&#49;&#45;&#48;&#46;&#53;&#49;&#41;&#92;&#99;&#100;&#111;&#116;&#32;&#48;&#46;&#53;&#49;&#093;&#101;&#94;&#123;&#45;&#48;&#46;&#48;&#53;&#92;&#99;&#100;&#111;&#116;&#32;&#49;&#125;&#61;&#52;&#46;&#50;&#55;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"441\" style=\"vertical-align: -5px;\"\/> :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-769 size-full\" src=\"https:\/\/www.ephiquant.com\/wp-content\/uploads\/2016\/12\/bin1.png\" alt=\"bin1\" width=\"740\" height=\"381\" \/><\/p>\n<p>Maintenant on peut observer comme le montre la figure ci-dessous(en abscisse le nombre d&#8217;it\u00e9ration et en ordonn\u00e9e la valeur de l&#8217;option) et celle ci-dessus que lorsque le nombre d&#8217;it\u00e9ration est grande <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-ba7f1e0527362bb45d140019a94626c4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#78;&#92;&#114;&#105;&#103;&#104;&#116;&#97;&#114;&#114;&#111;&#119;&#43;&#92;&#105;&#110;&#102;&#116;&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"14\" width=\"75\" style=\"vertical-align: -2px;\"\/> et par cons\u00e9quence <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-eea2df704c8a4c9c5be505b52d4898ca_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#97;&#114;&#114;&#111;&#119;&#32;&#48;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"58\" style=\"vertical-align: -1px;\"\/>, la valeur d&#8217;une option calcul\u00e9e \u00e0 la mani\u00e8re de CRR (put ou call) donnera avec les m\u00eames param\u00e8tres la valeur obtenue avec le mod\u00e8le de BSM.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-774 aligncenter\" src=\"https:\/\/www.ephiquant.com\/wp-content\/uploads\/2016\/12\/convergence.png\" alt=\"convergence\" width=\"609\" height=\"449\" srcset=\"https:\/\/www.ephiquant.com\/wp-content\/uploads\/2016\/12\/convergence.png 609w, https:\/\/www.ephiquant.com\/wp-content\/uploads\/2016\/12\/convergence-300x221.png 300w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><\/p>\n<h3>Impl\u00e9mentation du mod\u00e8le Binomial de CRR en C++<\/h3>\n<h4>Design et Description des classes : la classe de base\u00a0<span style=\"color: #0000ff;\">CRRBinomialTree<\/span><\/h4>\n<p>Pour les besoins de l&#8217;impl\u00e9mentation nous allons adopter l&#8217;architecture du diagramme ci-dessous. En effet, nous d\u00e9finirons une classe m\u00e8re\u00a0<span style=\"color: #0000ff;\">CRRBinomialTree<\/span> pour fournir les diff\u00e9rents param\u00e8tres de\u00a0pricing selon le mod\u00e8le de CRR aux\u00a0classes filles nomm\u00e9ment <span style=\"color: #0000ff;\">EuropeanOption<\/span> et <span style=\"color: #0000ff;\">AmericanOption. <\/span><\/p>\n<p>L&#8217;id\u00e9e est de tirer profit du<span style=\"color: #0000ff;\"><strong><span style=\"color: #000000;\"> polymorphisme<\/span><\/strong>\u00a0<\/span>de ces objets\u00a0pour plus de souplesses\u00a0en red\u00e9finissant certaines m\u00e9thodes membres de la classe de base\u00a0\u00e0 savoir <span style=\"color: #0000ff;\">price()<\/span> et <span style=\"color: #0000ff;\">display()<\/span> dans les classes filles.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-786\" src=\"https:\/\/www.ephiquant.com\/wp-content\/uploads\/2016\/12\/UMLBinomail.png\" alt=\"umlbinomail\" width=\"812\" height=\"561\" srcset=\"https:\/\/www.ephiquant.com\/wp-content\/uploads\/2016\/12\/UMLBinomail.png 812w, https:\/\/www.ephiquant.com\/wp-content\/uploads\/2016\/12\/UMLBinomail-300x207.png 300w, https:\/\/www.ephiquant.com\/wp-content\/uploads\/2016\/12\/UMLBinomail-768x531.png 768w\" sizes=\"auto, (max-width: 812px) 100vw, 812px\" \/><\/p>\n<p>Par ailleurs, nous ne voulons pas que l&#8217;utilisateur final puisse avoir acc\u00e8s aux fonctions <span style=\"color: #0000ff;\">getStock()<\/span>,<span style=\"color: #0000ff;\">payOff()<\/span>, et <span style=\"color: #0000ff;\">Up()<\/span>\/<span style=\"color: #0000ff;\">Down(),<\/span> qui ne sont dans notre cas pr\u00e9cis que des fonctions interm\u00e9diaires.D&#8217;o\u00f9 l&#8217;int\u00e9r\u00eat de les d\u00e9clarer comme prot\u00e9g\u00e9es, ainsi seule les classes filles peuvent en faire usage. Elles permettent de d\u00e9terminer respectivement, le prix du sous-jacent \u00e0 un n\u0153ud de l&#8217;arbre Cf.\u00a0\u00e9quation <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-93d60e3fa59910a72184d3a64b54d6b7_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#49;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"21\" style=\"vertical-align: -4px;\"\/>, le pay Off Cf.equation <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-f603b2bb9694de9696b940f73e02252d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"21\" style=\"vertical-align: -4px;\"\/> et les deux relations\u00a0de l&#8217;\u00e9quation <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-1c4ab5ad179497b48e861aa9d30f24d9_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#54;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"21\" style=\"vertical-align: -4px;\"\/>.<\/p>\n<pre class=\"lang:c++ decode:true\" title=\"CRRBinomialTree.h\">\/* \r\n * File:   CRRBinomialTree.h\r\n * Author: daname\r\n * Created on 16 d\u00e9cembre 2016, 10:08\r\n *\/\r\n\r\n#ifndef CRRBINOMIALTREE_H\r\n#define CRRBINOMIALTREE_H\r\n#include &lt;string&gt;\r\nclass CRRBinomialTree {\r\nprivate:\r\n    double So;    \/\/ prix actuel du sous -jacent\r\n    double K;     \/\/ prix d'exercice\r\n    double r;     \/\/ taux d'interet\r\n    double T;     \/\/ maturit\u00e9\r\n    double sigma; \/\/ volatilit\u00e9\r\n    int N;        \/\/ Nombre d'it\u00e9ration\r\nprotected:\r\n    double payOff(double S,double K, const std::string type = \"call\")const;\r\n    double getStock(int j,int n);\r\n    double Up(int j)const;\r\n    double Down(int j)const;\r\npublic:\r\n    CRRBinomialTree();\r\n    CRRBinomialTree(double _So,double _K,double _T,double _r,\r\n                     double _sigma,int _n = 1000);\r\n    CRRBinomialTree &amp; operator=(const CRRBinomialTree &amp; opt);\r\n    virtual double price();\r\n    virtual void display();\r\n    double riskNeutralProb()const;\r\n    void setSigma(double sigma);\r\n    double getSigma() const;\r\n    void setR(double r);\r\n    double getR() const;\r\n    void setT(double T);\r\n    double getT() const;\r\n    void setK(double K);\r\n    double getK() const;\r\n    void setSo(double So);\r\n    double getSo() const;\r\n    int getN() const;\r\n    void setN(int N);\r\n    virtual ~CRRBinomialTree();\r\n};\r\n\r\n#endif \/* CRRBINOMIALTREE_H *\/\r\n<\/pre>\n<p>Aussi pour finir nous avons les m\u00e9thodes usuelles d&#8217;une classe digne de ce nom \u00e0 savoir les constructeurs, les accesseurs\/mutateurs et le destructeur.<\/p>\n<h4>H\u00e9ritage : les classes filles <span style=\"color: #0000ff;\">AmericanOption<\/span> et <span style=\"color: #0000ff;\">EuropeanOption<\/span><\/h4>\n<p>Comme \u00e9nonc\u00e9 pr\u00e9c\u00e9demment, \u00a0les classes filles vont red\u00e9finir les m\u00e9thodes <span style=\"color: #0000ff;\">price()<\/span> et <span style=\"color: #0000ff;\">display()<\/span>. Cette derni\u00e8re n&#8217;affichera que les diff\u00e9rents caract\u00e9ristiques du mod\u00e8les et la valeur de l&#8217;options. Les constructeurs des classes filles vont permettre comme on peut le voir ci-dessous, d&#8217;ajouter un param\u00e8tre additionnel \u00e0 savoir le type &#8220;call&#8221; ou &#8220;put&#8221;.<\/p>\n<pre class=\"lang:c++ decode:true\" title=\"AmericanOption.h\">#ifndef AMERICANOPTION_H\r\n#define AMERICANOPTION_H\r\n\r\n#include \"CRRBinomialTree.h\"\r\n#include &lt;string&gt;\r\nclass AmericanOption: public CRRBinomialTree {\r\nprivate :\r\n    std::string type;\r\npublic:\r\nAmericanOption();\r\nAmericanOption(double So,double K,double T,double r,\r\n        double sigma,const std::string type = \"call\",int n = 1000);\r\nAmericanOption(const CRRBinomialTree &amp;_opt, const std::string _type = \"call\");  \r\ndouble price(); \r\nvoid display();\r\nvoid setType(std::string type);\r\nstd::string getType() const;\r\nvirtual ~AmericanOption();\r\n};\r\n<\/pre>\n<pre class=\"lang:c++ decode:true\" title=\"EuropeanOption.h\">#ifndef EUROPEANOPTION_H\r\n#define EUROPEANOPTION_H\r\n#include \"CRRBinomialTree.h\"\r\n#include &lt;string&gt;\r\nclass EuropeanOption: public CRRBinomialTree {\r\nprivate :\r\n    std::string type;\r\npublic:\r\nEuropeanOption();\r\nEuropeanOption(double So,double K,double T,double r,\r\n        double sigma,const std::string type = \"call\",int n = 1000);\r\nEuropeanOption(const CRRBinomialTree&amp; opt,const std::string type = \"call\");  \r\ndouble price(); \r\nvoid display();\r\nvoid setType(std::string type);\r\nstd::string getType() const;\r\nvirtual ~EuropeanOption();\r\n};\r\n\r\n#endif \/* EUROPEANOPTION_H *\/\r\n<\/pre>\n<p>Maintenant si l&#8217;on s\u2019int\u00e9resse de pr\u00e8s \u00e0 la fonction <span style=\"color: #0000ff;\">price()<\/span> dont vous verrez le corps dans les blocs de codes plus bas (<span style=\"color: #0000ff;\">American.cpp, European.cpp<\/span>). On remarque d&#8217;abord l&#8217;utilisation de la routine <span class=\"lang:c++ decode:true crayon-inline \">for<\/span>\u00a0pour remplir un tableau permettant\u00a0l&#8217;allocation dynamique de m\u00e9moire pour N+1 \u00e9l\u00e9ments,( d&#8217;o\u00f9 l&#8217;usage de pointeur si vous n\u2019\u00eates fans des pointeurs utiliser la librairie <span class=\"lang:c++ decode:true crayon-inline \">vector<\/span>\u00a0) \u00a0 avec les valeurs de l&#8217;options c&#8217;est les lignes suivantes :<\/p>\n<pre class=\"lang:c++ decode:true \">for(int j=0;j&lt;=CRRBinomialTree::getN();++j)\r\n        *(v+j)= payOff(getStock(j,CRRBinomialTree::getN()),\r\n                CRRBinomialTree::getK(),type);<\/pre>\n<p>avec <span style=\"color: #0000ff;\">getStock()<\/span> on r\u00e9cup\u00e9r\u00e9 la valeur du titre ensuite avec <span style=\"color: #0000ff;\">payOff()<\/span> on d\u00e9termine le pay-off \u00a0selon le type call ou put au niveau des feuilles de notre arbre.\u00a0Dans la suite de la fonction, nous impl\u00e9mentons la relation d\u00e9crite dans l&#8217;\u00e9quation <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-80b81495519d17f550a9cb6c042cfda2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#51;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"21\" style=\"vertical-align: -4px;\"\/> :<\/p>\n<pre class=\"lang:c++ decode:true\">for(int i=CRRBinomialTree::getN()-1;i&gt;=0;--i){\r\n        for(int j=0;j&lt;=i;++j){\r\n            *(v+j)=(p*(*(v+j+1))+(1-p)*(*(v+j)))*exp(-CRRBinomialTree::getR()\r\n                    *CRRBinomialTree::getT()\/CRRBinomialTree::getN());\r\n        }\r\n}\r\nreturn *v;<\/pre>\n<p>Qui va calculer la valeur actuelle des pay-off et ceci de fa\u00e7on r\u00e9cursive en commen\u00e7ant du dernier \u00e9l\u00e9ment du tableau au premier. Et comme c&#8217;est un tableau pour retourner le premier l\u2019\u00e9l\u00e9ment qui contiendrait \u00e0 la fin du processus la valeur de l&#8217;option on renvoie <span class=\"lang:c++ decode:true crayon-inline\">*v<\/span>. La version Am\u00e9ricaine de la fonction diff\u00e8re seulement au niveau des 2 lignes suivantes :<\/p>\n<pre class=\"lang:c++ decode:true\">Sij = payOff(getStock(j,i),CRRBinomialTree::getK(),type);\r\n*(v+j)=(*(v+j)&gt; Sij)?(*(v+j)): Sij;<\/pre>\n<p>Ces deux lignes sont la traduction de l&#8217;\u00e9quation <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ephiquant.com\/wp-content\/ql-cache\/quicklatex.com-3b9abb5ad12eef003332ea17645375c2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#55;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"21\" style=\"vertical-align: -4px;\"\/> . Aussi, autres points importants c&#8217;est l&#8217;utilisation <span class=\"lang:r decode:true crayon-inline\">CRRBinomialTree::<\/span>\u00a0,l&#8217;op\u00e9rateur de r\u00e9solution de port\u00e9e permet d&#8217;acc\u00e9der aux m\u00e9thodes membres <span style=\"color: #0000ff;\">public<\/span> de la classe m\u00e8re. Vous constaterez donc que les m\u00e9thodes membres <span style=\"color: #0000ff;\">protected<\/span>, n&#8217;en ont pas besoin.<br \/>\nPar ailleurs, nous allons invoquer le constructeur de la classe m\u00e8re dans la d\u00e9finition des constructeur des classes filles. Pour finir voici la d\u00e9finition des trois classes :<\/p>\n<pre class=\"minimize:true lang:c++ decode:true\" title=\"CRRBinomialTree.cpp\">\/* \r\n * File:   CRRBinomialTree.cpp\r\n * Author: danam\r\n * \r\n * Created on 16 d\u00e9cembre 2016, 10:08\r\n *\/\r\n\r\n#include \"CRRBinomialTree.h\"\r\n#include &lt;iostream&gt;\r\n#include &lt;string&gt;\r\n#include &lt;cmath&gt;\r\nusing namespace std;\r\n\r\nCRRBinomialTree::CRRBinomialTree(){\r\n\r\n}\r\nCRRBinomialTree::CRRBinomialTree(double _So,double _K,double _T,double _r,double _sigma,int n){\r\n    So =_So;\r\n    K = _K;\r\n    T =_T;\r\n    r = _r;\r\n    sigma = _sigma;\r\n    N = n;\r\n}\r\nCRRBinomialTree &amp; CRRBinomialTree::operator=(const CRRBinomialTree &amp; opt){\r\n    So = opt.So;\r\n    K = opt.K;\r\n    T = opt.T;\r\n    r = opt.r;\r\n    sigma = opt.sigma;\r\n    N = opt.N;\r\n    return *this;\r\n}\r\ndouble CRRBinomialTree::price(){\r\n    cout&lt;&lt; \"Option type is not defined\" &lt;&lt;endl;\r\n    return(0);\r\n}\r\ndouble CRRBinomialTree::getStock(int j, int n){\r\n      return So*Up(j)*Down(n-j);\r\n}\r\ndouble CRRBinomialTree::payOff(double S,\r\n        double K, const string type)const{\r\n    if(type == \"call\")\r\n        return((S-K)&gt;0)?(S-K):0;\r\n    else\r\n    return ((K-S)&gt;0)?(K-S):0;\r\n}\r\nvoid CRRBinomialTree::display(){\r\n    cout&lt;&lt;\"----------------------------------\"&lt;&lt;endl;\r\n    cout&lt;&lt;\"Current price (So)    : \"&lt;&lt; So &lt;&lt; endl;\r\n    cout&lt;&lt;\"Strike(K)             : \"&lt;&lt; K &lt;&lt; endl;\r\n    cout&lt;&lt;\"Maturity(T)           : \"&lt;&lt; T &lt;&lt; endl;\r\n    cout&lt;&lt;\"Risk-free rate(r)     : \"&lt;&lt; r &lt;&lt; endl;\r\n    cout&lt;&lt;\"Volatility(sigma)     : \"&lt;&lt; sigma &lt;&lt; endl;\r\n    cout&lt;&lt;\"Number of steps       : \"&lt;&lt;N &lt;&lt;endl;\r\n    cout&lt;&lt;\"==================================\"&lt;&lt;endl;\r\n }\r\ndouble CRRBinomialTree::riskNeutralProb()const{\r\n    return (exp(r*T\/N)-Down(1))\/(Up(1)-Down(1)) ;\r\n}\r\n\r\ndouble CRRBinomialTree::Up(int j) const {\r\n     return pow(exp(sigma*sqrt(T\/N)),j);\r\n}\r\n\r\ndouble CRRBinomialTree::Down(int j) const {\r\n    return pow(exp(-sigma*sqrt(T\/N)),j);\r\n}\r\nvoid CRRBinomialTree::setSigma(double sigma) {\r\n    this-&gt;sigma = sigma;\r\n}\r\n\r\ndouble CRRBinomialTree::getSigma() const {\r\n    return sigma;\r\n}\r\n\r\nvoid CRRBinomialTree::setR(double r) {\r\n    this-&gt;r = r;\r\n}\r\n\r\ndouble CRRBinomialTree::getR() const {\r\n    return r;\r\n}\r\n\r\nvoid CRRBinomialTree::setT(double T) {\r\n    this-&gt;T = T;\r\n}\r\n\r\ndouble CRRBinomialTree::getT() const {\r\n    return T;\r\n}\r\n\r\nvoid CRRBinomialTree::setK(double K) {\r\n    this-&gt;K = K;\r\n}\r\n\r\ndouble CRRBinomialTree::getK() const {\r\n    return K;\r\n}\r\n\r\nvoid CRRBinomialTree::setSo(double So) {\r\n    this-&gt;So = So;\r\n}\r\n\r\ndouble CRRBinomialTree::getSo() const {\r\n    return So;\r\n}\r\nvoid CRRBinomialTree::setN(int N){\r\n    this-&gt;N = N;\r\n}\r\n\r\nint CRRBinomialTree::getN() const{\r\n    return N;\r\n}\r\n\r\nCRRBinomialTree::~CRRBinomialTree() {\r\n\r\n}\r\n<\/pre>\n<pre class=\"minimize:true lang:c++ decode:true\" title=\"EuropeanOption.cpp\">\/* \r\n * File:   EuropeanOption.cpp\r\n * Author: danam\r\n * \r\n * Created on 16 d\u00e9cembre 2016, 10:25\r\n *\/\r\n\r\n#include \"EuropeanOption.h\"\r\n#include \"CRRBinomialTree.h\"\r\n#include &lt;iostream&gt;\r\n#include &lt;cmath&gt;\r\n#include &lt;string&gt;\r\n\r\nusing namespace std;\r\n\r\nEuropeanOption::EuropeanOption(){}\r\nEuropeanOption::EuropeanOption(const CRRBinomialTree &amp;opt,\r\n        const string _type):CRRBinomialTree(opt.getSo(),opt.getK(),opt.getT(),\r\n            opt.getR(),opt.getSigma(),opt.getN()),type(_type){\r\n}\r\nEuropeanOption::EuropeanOption(double So,double K,double T,double r,\r\n        double sigma,const string _type,\r\n        int n):CRRBinomialTree(So,K,T,r,sigma,n),type(_type){\r\n}\r\nvoid EuropeanOption::display(){\r\n    CRRBinomialTree::display();\r\n    cout&lt;&lt;\" Value of European \"&lt;&lt;type &lt;&lt;\" : \"&lt;&lt;price()&lt;&lt;endl; \r\n    cout&lt;&lt;\"----------------------------------\"&lt;&lt;endl;  \r\n}\r\n\r\ndouble EuropeanOption::price(){\r\n  double  *v = new double[CRRBinomialTree::getN()+1];\r\n    double p = CRRBinomialTree::riskNeutralProb();\r\n    for(int j=0;j&lt;=CRRBinomialTree::getN();++j)\r\n        *(v+j)= CRRBinomialTree::payOff(CRRBinomialTree::getStock(j,\r\n                CRRBinomialTree::getN()),CRRBinomialTree::getK(),type);\r\n    for(int i=CRRBinomialTree::getN()-1;i&gt;=0;--i){\r\n        for(int j=0;j&lt;=i;++j){\r\n            *(v+j)=(p*(*(v+j+1))+(1-p)*(*(v+j)))*exp(-CRRBinomialTree::getR()\r\n                    *CRRBinomialTree::getT()\/CRRBinomialTree::getN());\r\n        }\r\n    }\r\n    return *v;\r\n    \r\n} \r\nvoid EuropeanOption::setType(std::string type) {\r\n    this-&gt;type = type;\r\n}\r\nstd::string EuropeanOption::getType() const {\r\n    return type;\r\n}\r\nEuropeanOption::~EuropeanOption(){\r\n   \r\n}\r\n<\/pre>\n<pre class=\"minimize:true lang:c++ decode:true\" title=\"AmericanOption.cpp\">\/* \r\n * File:   AmericanOption.cpp\r\n * Author: danam\r\n * \r\n * Created on 16 d\u00e9cembre 2016, 10:24\r\n *\/\r\n\r\n#include \"AmericanOption.h\"\r\n#include \"CRRBinomialTree.h\"\r\n#include &lt;iostream&gt;\r\n#include &lt;cmath&gt;\r\n#include &lt;string&gt;\r\nusing namespace std;\r\n\r\nAmericanOption::AmericanOption(){}\r\nAmericanOption::AmericanOption(const CRRBinomialTree &amp;opt,\r\n        const string _type):CRRBinomialTree(opt.getSo(),opt.getK(),opt.getT(),\r\n            opt.getR(),opt.getSigma(),opt.getN()),type(_type){\r\n}\r\nAmericanOption::AmericanOption(double So,double K,double T,double r,\r\n        double sigma,const string _type,\r\n        int n):CRRBinomialTree(So,K,T,r,sigma,n),type(_type){\r\n}\r\ndouble AmericanOption::price(){\r\n    double  *v= new double[CRRBinomialTree::getN()+1];\r\n    double Sij;\r\n    double p = CRRBinomialTree::riskNeutralProb();\r\n    for(int j=0;j&lt;=CRRBinomialTree::getN();++j)\r\n        *(v+j)= payOff(getStock(j,CRRBinomialTree::getN()),\r\n                CRRBinomialTree::getK(),type);\r\n    for(int i= CRRBinomialTree::getN()-1;i&gt;=0;--i){\r\n        for(int j=0;j&lt;=i;++j){\r\n            *(v+j)=(p*(*(v+j+1))+(1-p)*(*(v+j)))*exp(-CRRBinomialTree::getR()\r\n                    *CRRBinomialTree::getT()\/CRRBinomialTree::getN());\r\n            Sij = payOff(getStock(j,i),CRRBinomialTree::getK(),type);\r\n            *(v+j)=(*(v+j)&gt; Sij)?(*(v+j)): Sij;\r\n        }\r\n    }\r\n    return *v;\r\n}\r\nvoid AmericanOption::display(){\r\n    CRRBinomialTree::display();\r\n    cout&lt;&lt;\"----------------------------------\"&lt;&lt;endl;\r\n    cout&lt;&lt;\" Value of American \"&lt;&lt;type &lt;&lt;\" : \"&lt;&lt;price()&lt;&lt;endl;\r\n}\r\nvoid AmericanOption::setType(std::string type) {\r\n    this-&gt;type = type;\r\n}\r\n\r\nstd::string AmericanOption::getType() const {\r\n    return type;\r\n}\r\n\r\nAmericanOption::~AmericanOption(){\r\n}\r\n\r\n<\/pre>\n<p><strong>Application num\u00e9rique :<\/strong><\/p>\n<p>Nous allons montrer quelques utilisations des objets issus des classes pr\u00e9c\u00e9demment d\u00e9crites. Faites attention \u00e0 l&#8217;utilisation des pointeurs n&#8217;oubliez pas les symboles <span class=\"lang:c++ decode:true crayon-inline \">*<\/span>\u00a0 et <span class=\"lang:c++ decode:true crayon-inline \">-&gt;<\/span>\u00a0 l\u00e0 o\u00f9 il faut. Et \u00e0 la fin utiliser <span class=\"lang:c++ decode:true crayon-inline \">delete<\/span>\u00a0pour les d\u00e9truire enfin de lib\u00e9rer de la m\u00e9moire.<\/p>\n<pre class=\"lang:c++ decode:true\" title=\"main.cpp\">#include &lt;iostream&gt;\r\n#include \"CRRBinomialTree.h\"\r\n#include \"EuropeanOption.h\"\r\n#include \"AmericanOption.h\"\r\n\r\nusing namespace std;\r\n\r\nint main() {\r\ndouble So = 35, K = 36, T = 1, r = 0.05,sigma = 0.3; \r\nCRRBinomialTree *tree = new CRRBinomialTree(So,K,T,r,sigma);\r\nCRRBinomialTree *optree = new AmericanOption(So,K,T,r,sigma,\"put\"); \r\nEuropeanOption optE(*tree);\r\nAmericanOption optA(*tree);\r\nEuropeanOption optE1(*optree,\"call\");\r\nAmericanOption * callopt = (AmericanOption*)tree;\r\n\/\/ les valeurs call d'abord\r\noptE.display(); \r\noptA.display();\r\noptE1.display();\r\ncallopt-&gt;display();\r\n\/\/ les valeurs put ensuite\r\noptE.setType(\"put\");\r\noptA.setType(\"put\");\r\noptE1.setType(\"put\");\r\noptE.display();\r\noptA.display();\r\noptE1.display();\r\noptE.setN(10000); \/\/ augmentons le nombre d'iteration histoire de voir le resultat\r\noptE.setType(\"call\");\r\noptE.display(); \/\/ une valeur plus proche de celle de Black-Scholes-Merton 4.5169\r\ndelete tree ,optree,callopt;\r\n\r\n    return 0;\r\n}<\/pre>\n<p>R\u00e9sultat :<\/p>\n<pre class=\"nums:false lang:c++ decode:true\" title=\"Console\">----------------------------------\r\nCurrent price (So)    : 35\r\nStrike(K)             : 36\r\nMaturity(T)           : 1\r\nRisk-free rate(r)     : 0.05\r\nVolatility(sigma)     : 0.3\r\nNumber of steps       : 1000\r\n==================================\r\n Value of European call : 4.51786\r\n----------------------------------\r\n----------------------------------\r\nCurrent price (So)    : 35\r\nStrike(K)             : 36\r\nMaturity(T)           : 1\r\nRisk-free rate(r)     : 0.05\r\nVolatility(sigma)     : 0.3\r\nNumber of steps       : 1000\r\n==================================\r\n----------------------------------\r\n Value of American call : 4.51786\r\n----------------------------------\r\nCurrent price (So)    : 35\r\nStrike(K)             : 36\r\nMaturity(T)           : 1\r\nRisk-free rate(r)     : 0.05\r\nVolatility(sigma)     : 0.3\r\nNumber of steps       : 1000\r\n==================================\r\n Value of European call : 4.51786\r\n----------------------------------\r\n----------------------------------\r\nCurrent price (So)    : 35\r\nStrike(K)             : 36\r\nMaturity(T)           : 1\r\nRisk-free rate(r)     : 0.05\r\nVolatility(sigma)     : 0.3\r\nNumber of steps       : 1000\r\n==================================\r\n----------------------------------\r\nCurrent price (So)    : 35\r\nStrike(K)             : 36\r\nMaturity(T)           : 1\r\nRisk-free rate(r)     : 0.05\r\nVolatility(sigma)     : 0.3\r\nNumber of steps       : 1000\r\n==================================\r\n Value of European put : 3.76212\r\n----------------------------------\r\n----------------------------------\r\nCurrent price (So)    : 35\r\nStrike(K)             : 36\r\nMaturity(T)           : 1\r\nRisk-free rate(r)     : 0.05\r\nVolatility(sigma)     : 0.3\r\nNumber of steps       : 1000\r\n==================================\r\n----------------------------------\r\n Value of American put : 3.98032\r\n----------------------------------\r\nCurrent price (So)    : 35\r\nStrike(K)             : 36\r\nMaturity(T)           : 1\r\nRisk-free rate(r)     : 0.05\r\nVolatility(sigma)     : 0.3\r\nNumber of steps       : 1000\r\n==================================\r\n Value of European put : 3.76212\r\n----------------------------------\r\n----------------------------------\r\nCurrent price (So)    : 35\r\nStrike(K)             : 36\r\nMaturity(T)           : 1\r\nRisk-free rate(r)     : 0.05\r\nVolatility(sigma)     : 0.3\r\nNumber of steps       : 10000\r\n==================================\r\n Value of European call : 4.51696\r\n----------------------------------\r\n\r\nRUN SUCCESSFUL (total time: 3s)\r\n<\/pre>\n<p>Comme on peut le voir la rapidit\u00e9 d&#8217;ex\u00e9cution malgr\u00e9 le grand nombre de routine utiliser, fait du C++ un langage de choix pour un Quant !<\/p>\n<p>Nous obtenons au finish la m\u00eame valeur qu&#8217;avec le mod\u00e8le de Black-Scholes and Merton <strong>4.5169<\/strong> pr\u00e9c\u00e9dement fourni dans l&#8217;exemple et que vous pouvez v\u00e9rifier chez vous avec Excel.<\/p>\n<div class=\"d_reactions\" data-post-id=\"716\" data-post-url=\"https:\/\/www.ephiquant.com\/?p=716\" data-post-title=\"Pricing des options avec le mod\u00e8le de Cox-Ross-Rubinstein en C++\" data-post-img=\"\"><\/div> <!-- Check out https:\/\/reactandshare.com -->","protected":false},"excerpt":{"rendered":"<p>Parmi les mod\u00e8les utilis\u00e9s pour le pricing des options, on a le c\u00e9l\u00e9brissime mod\u00e8le de Black-Scholes-Merton(1973) mais aussi le non-moins c\u00e9l\u00e8bre mod\u00e8le de Cox-Ross-Rubinstein(1979) qui est un mod\u00e8le discret contrairement au premier et qui a la cote parmi les mod\u00e8les [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,23,33,26],"tags":[82,81,83,80],"class_list":["post-716","post","type-post","status-publish","format-standard","hentry","category-analyse-quantitative","category-c","category-finance","category-finance-quantitative","tag-crrbinomialtree","tag-modele-de-cox-ross-rubinstein","tag-poo","tag-pricing-doption"],"_links":{"self":[{"href":"https:\/\/www.ephiquant.com\/index.php?rest_route=\/wp\/v2\/posts\/716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ephiquant.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ephiquant.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ephiquant.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ephiquant.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=716"}],"version-history":[{"count":77,"href":"https:\/\/www.ephiquant.com\/index.php?rest_route=\/wp\/v2\/posts\/716\/revisions"}],"predecessor-version":[{"id":802,"href":"https:\/\/www.ephiquant.com\/index.php?rest_route=\/wp\/v2\/posts\/716\/revisions\/802"}],"wp:attachment":[{"href":"https:\/\/www.ephiquant.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ephiquant.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ephiquant.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}