⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 heston pricing using finite difference method [visual c++ express, gsl].mht

📁 european_swaption_lmm.txt very nice implementation of complicated LMM. Informative for QF applicati
💻 MHT
📖 第 1 页 / 共 5 页
字号:
  <UL>
    <LI><A href=3D"http://www.quantcode.com/user.php">Log In</A> </LI>
    <LI><A href=3D"http://www.quantcode.com/user.php">View Account</A> =
</LI>
    <LI><A href=3D"http://www.quantcode.com/viewresumes.php">View =
Resumes</A>=20
</LI>
    <LI><A href=3D"http://www.quantcode.com/user.php?op=3Dlogout">Log =
Out</A> </LI>
    <LI><A =
href=3D"http://www.quantcode.com/modules/xoopsmembers/">Browse=20
    Members</A> </LI>
    <LI><A =
href=3D"http://www.quantcode.com/modules/aChat/viewlogs.php">Chat=20
    History</A> </LI>
    <LI><A href=3D"http://www.quantcode.com/modules/aChat/">Chat</A> =
</LI>
    <LI><A href=3D"http://www.quantcode.com/modules/docmanager/">User =
Uploads</A>=20
    </LI>
    <LI><A=20
    =
href=3D"http://www.quantcode.com/modules/docmanager/create_file.php?curen=
t_dir=3D1">Upload=20
    File</A> </LI></UL></LI>
  <LI><A href=3D"http://www.quantcode.com/search.php">Search</A> </LI>
  <LI><A href=3D"http://www.quantcode.com/modules/contact">Contact</A> =
</LI></UL><BR=20
class=3Dclearit></DIV>
<TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"100%" border=3D0>
  <TBODY>
  <TR>
    <TD class=3Dcontentbox vAlign=3Dtop width=3D"100%"><BR><!-- Display =
center blocks if any -->
      <TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"98%" =
align=3Dcenter border=3D0>
        <TBODY>
        <TR>
          <TD align=3Dmiddle width=3D"60%"><A style=3D"FONT-SIZE: 12px"=20
            =
href=3D"http://www.quantcode.com/modules/jobs/index.php?pa=3Dviewlistings=
&amp;lid=3D143">Quantitative=20
            Developer needed for Hedge Fund Administrator \ MindStaff \ =
New York=20
            \ <SUP style=3D"FONT-SIZE: 10px; COLOR: red">NEW</SUP></A> =
</TD>
          <TD align=3Dright width=3D"40%">
            <FORM action=3Dhttp://www.quantcode.com/search.php =
method=3Dget><INPUT=20
            class=3Dnavinput name=3Dquery><INPUT type=3Dhidden =
value=3Dresults=20
            name=3Daction> <INPUT class=3DnavinputImage type=3Dimage=20
            src=3D"http://www.quantcode.com/themes/x2t/searchButton.gif" =

            name=3DsearchSubmit> </FORM></TD></TR></TBODY></TABLE><BR>
      <TABLE=20
      style=3D"BORDER-RIGHT: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px =
solid; BORDER-BOTTOM: #cccccc 1px solid"=20
      cellSpacing=3D0 cellPadding=3D3 width=3D"98%" align=3Dcenter>
        <TBODY>
        <TR>
          <TD class=3DcenterLcolumn vAlign=3Dtop>
            <DIV class=3DcenterLcolumn><!-- Start center-left blocks =
loop -->
            <DIV class=3DblockTitle>Ads</DIV>
            <DIV class=3DblockContent>
            <SCRIPT type=3Dtext/javascript><!--
google_ad_client =3D "pub-2757884200825666";
google_alternate_color =3D "FFFFFF";
google_ad_width =3D 468;
google_ad_height =3D 60;
google_ad_format =3D "468x60_as";
google_ad_type =3D "text_image";
google_ad_channel =3D "";
google_color_border =3D "FFFFFF";
google_color_bg =3D "FFFFFF";
google_color_link =3D "003399";
google_color_text =3D "000000";
google_color_url =3D "008000";
//-->
</SCRIPT>

            <SCRIPT=20
            =
src=3D"http://pagead2.googlesyndication.com/pagead/show_ads.js"=20
            type=3Dtext/javascript>
</SCRIPT>
            </DIV><BR><!-- End center-left blocks loop --></DIV></TD>
          <TD class=3DcenterRcolumn vAlign=3Dtop>
            <DIV class=3DcenterRcolumn><!-- Start center-right blocks =
loop -->
            <DIV class=3DblockTitle>Google Search</DIV>
            <DIV class=3DblockContent><!-- SiteSearch Google -->
            <FORM action=3Dhttp://www.google.com/custom method=3Dget =
target=3D_top>
            <TABLE bgColor=3D#ffffff border=3D0>
              <TBODY>
              <TR>
                <TD vAlign=3Dtop noWrap align=3Dleft height=3D32></TD>
                <TD noWrap><INPUT type=3Dhidden value=3Dquantcode.com=20
                  name=3Ddomains></INPUT> <LABEL style=3D"DISPLAY: none" =

                  for=3Dsbi>Enter your search terms</LABEL> <INPUT =
id=3Dsbi=20
                  maxLength=3D255 size=3D31 name=3Dq></INPUT> <LABEL=20
                  style=3D"DISPLAY: none" for=3Dsbb>Submit search =
form</LABEL> <INPUT id=3Dsbb type=3Dsubmit value=3D"Google Search" =
name=3Dsa></INPUT>=20
                </TD></TR>
              <TR>
                <TD>&nbsp;</TD>
                <TD noWrap>
                  <TABLE>
                    <TBODY>
                    <TR>
                      <TD><INPUT id=3Dss0 type=3Dradio CHECKED =
value=3D""=20
                        name=3Dsitesearch></INPUT> <LABEL =
title=3D"Search the Web"=20
                        for=3Dss0><FONT color=3D#000000=20
size=3D-1>Web</FONT></LABEL></TD>
                      <TD><INPUT id=3Dss1 type=3Dradio =
value=3Dquantcode.com=20
                        name=3Dsitesearch></INPUT> <LABEL=20
                        title=3D"Search quantcode.com" for=3Dss1><FONT =
color=3D#000000=20
                        =
size=3D-1>quantcode.com</FONT></LABEL></TD></TR></TBODY></TABLE><INPUT=20
                  type=3Dhidden value=3Dpub-2757884200825666 =
name=3Dclient></INPUT>=20
                  <INPUT type=3Dhidden value=3D1 name=3Dforid></INPUT> =
<INPUT=20
                  type=3Dhidden value=3DISO-8859-1 name=3Die></INPUT> =
<INPUT=20
                  type=3Dhidden value=3DISO-8859-1 name=3Doe></INPUT> =
<INPUT=20
                  type=3Dhidden value=3D0001 name=3Dflav></INPUT> <INPUT =
type=3Dhidden=20
                  value=3DgXT71oZxWL_VpdS- name=3Dsig></INPUT> <INPUT =
type=3Dhidden=20
                  =
value=3DGALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBG=
C:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:45;LW:3=
64;L:http://www.quantcode.com/themes/x2t/quantjobs.jpg;S:http://www.quant=
code.com/;FORID:1=20
                  name=3Dcof></INPUT> <INPUT type=3Dhidden value=3Den =
name=3Dhl></INPUT>=20
                </TD></TR></TBODY></TABLE></FORM><!-- SiteSearch Google =
--></DIV><BR><!-- End center-right blocks loop =
--></DIV></TD></TR></TBODY></TABLE>
      <DIV class=3Dcontent><BR>
      <DIV>
      <TABLE cellSpacing=3D2 cellPadding=3D2 width=3D"97%" border=3D0>
        <TBODY>
        <TR>
          <TD class=3Dnewstitle><A=20
            =
href=3D"http://www.quantcode.com/modules/mydownloads/index.php">Main</A>&=
nbsp;:&nbsp;<A=20
            =
href=3D"http://www.quantcode.com/modules/mydownloads/viewcat.php?op=3D&am=
p;cid=3D10">C++</A>&nbsp;:&nbsp;</TD></TR></TBODY></TABLE></DIV><BR>
      <TABLE cellSpacing=3D0 cellPadding=3D10 width=3D"100%" border=3D0>
        <TBODY>
        <TR>
          <TD vAlign=3Dtop align=3Dmiddle width=3D"100%">
            <TABLE class=3Douter cellSpacing=3D0 width=3D"100%">
              <TBODY>
              <TR>
                <TD class=3Dhead align=3Dleft colSpan=3D2 =
height=3D18>Category:=20
                  C++&nbsp; : &nbsp;Heston pricing using finite =
difference=20
                method</TD></TR>
              <TR>
                <TD class=3Deven vAlign=3Dbottom align=3Dleft=20
                  width=3D"65%"><B>Submitter:</B>&nbsp;<A=20
                  =
href=3D"http://www.quantcode.com/userinfo.php?uid=3D2704">wald</A></TD>
                <TD class=3Deven align=3Dright=20
                  width=3D"35%"><B>Date:</B>&nbsp;2008/2/2</TD></TR>
              <TR>
                <TD class=3Dodd align=3Dleft colSpan=3D2><A id=3Dgtitle=20
                  onmouseover=3D"return true"=20
                  style=3D"FONT-WEIGHT: bold; FONT-SIZE: 13px; =
LINE-HEIGHT: 15px; FONT-FAMILY: arial, sans-serif; TEXT-DECORATION: =
underline"=20
                  =
href=3D"http://www.quantcode.com/modules/mydownloads/visit.php?cid=3D10&a=
mp;lid=3D419"=20
                  target=3D_blank><B>Asset Backed</B></A> <BR>
                  <DIV=20
                  style=3D"FLOAT: left; OVERFLOW: hidden; WIDTH: 234px; =
HEIGHT: 30px"><SPAN=20
                  style=3D"DISPLAY: block; FONT-SIZE: 10px; LINE-HEIGHT: =
13px">Heston=20
                  pricing using finite difference method</SPAN> =
</DIV><BR><BR>
                  <SCRIPT type=3Dtext/javascript><!--
google_ad_client =3D "pub-2757884200825666";
google_alternate_color =3D "FFFFFF";
google_ad_width =3D 234;
google_ad_height =3D 60;
google_ad_format =3D "234x60_as";
google_ad_type =3D "text_image";
google_ad_channel =3D "";
google_color_border =3D "E9E9E9";
google_color_bg =3D "E9E9E9";
google_color_link =3D "003399";
google_color_text =3D "000000";
google_color_url =3D "008000";
//-->
</SCRIPT>

                  <SCRIPT=20
                  =
src=3D"http://pagead2.googlesyndication.com/pagead/show_ads.js"=20
                  type=3Dtext/javascript>
</SCRIPT>
                  <BR><BR><BR><B>Description:</B>=20
                  <DIV style=3D"TEXT-ALIGN: justify">Calculates price of =
an=20
                  European put option using finite difference =
method.<BR>It uses=20
                  successive over relaxation technique to solve the =
system of=20
                  equations arising from this PDE:<BR><IMG alt=3D""=20
                  =
src=3D"http://www.quantcode.com/uploads/img47a435b0ac83b.jpeg"><BR><BR>Fo=
llowing=20
                  are the results I have obtained while comparing with =
<A=20
                  =
href=3D"http://www.quantcode.com/modules/mydownloads/singlefile.php?cid=3D=
9&amp;lid=3D417"=20
                  target=3D_blank>Heston Option Price using Monte carlo=20
                  simulation</A><BR><BR>
                  <DIV class=3DxoopsCode><CODE><PRE>
Strike	Put Price MC	Put price SOR
0.5	0.001823098	0.00200973
0.75	0.023056369	0.0225265
1	0.102600138	0.100706
1.25	0.259924474	0.259371
1.5	0.472687498	0.473383

</PRE></CODE></DIV><BR><BR>Input values used are:<BR>int=20
                  timesteps=3D10; //no of time steps<BR>int =
stocksteps=3D50; //no of=20
                  points in stock axis<BR>int volsteps=3D50; //no of =
points in=20
                  variance axis<BR><BR><BR><BR>Derivation of Finite =
difference=20
                  scheme for the PDE :<BR>
                  <DIV class=3DxoopsCode><CODE><PRE>
//*****  derivation of finite difference scheme  ***************

Step 1: subtitute finite difference formulas based on central difference =
scheme into the PDE
(V(i,j,k)-V(i,j,k-1))/dt=20
- 0.5*y*x*x* (V(i-1,j,k)-2*V(i,j,k)+V(i+1,j,k))/(dx*dx)
- rho*gamma*y*x* (V(i+1,j+1,k) + V(i-1,j-1,k) - V(i+1,j-1,k) - =
V(i-1,j+1,k))/(4*dx*dy)

⌨️ 快捷键说明

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