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

📄 jumpassetpaths.java

📁 金融资产定价,随机过程,MONTE CARLO 模拟 JAVA 程序和文档资料
💻 JAVA
字号:
/* WARANTY NOTICE AND COPYRIGHTThis program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseas published by the Free Software Foundation; either version 2of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.Copyright (C) Michael J. Meyermatmjm@mindspring.comspyqqqdia@yahoo.com*//* * PathBranchDemo.java * * Created on March 29, 2002, 9:10 PM */package Examples.Paths;import Market.*;import Options.*;import Graphics.*;/** <p>Displays paths of a jump asset. *  </p> * * @author  Michael J. Meyer */public class JumpAssetPaths {          /** Displays a new path of the delta of a one year call whenever       *  the window is clicked.       */      public static void main(String[] args)      {            int  T=200,           // time steps to horizon                nSignChange=2,    // irrelevant but needed for asset constructor                w=600,                h=350,                xOffset=70,                yOffset=70;                         final double                    S_0=50,                   mu=0.24,                   sigma=0.31,                   q=0.0,                   r=0.07,                   dt=0.005,                   lambda=0.2,        // jump intensity                   rho=1.5;           // jump size = z^2-1, where z is N(0,rho)                       final double[] path=new double[T+1];                        final JumpAsset            jasset=new JumpAsset(T,dt,nSignChange,S_0,r,q,mu,sigma,lambda,rho);                    double y0=S_0;                     PathFrame window=new PathFrame           ("Jump asset paths",w,h,xOffset,yOffset,T,dt,y0){                              public double[] nextPath()               {                   jasset.newPath(Market.Flag.MARKET_PROBABILITY);                   return jasset.get_S();               }           }; // end Window                      window.show();                 } // end main    } // end PathBranchDemo

⌨️ 快捷键说明

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