亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? returnpath.java

?? MPI for java for Distributed Programming
?? JAVA
字號:
/***************************************************************************                                                                         **             Java Grande Forum Benchmark Suite - MPJ Version 1.0         **                                                                         **                            produced by                                  **                                                                         **                  Java Grande Benchmarking Project                       **                                                                         **                                at                                       **                                                                         **                Edinburgh Parallel Computing Centre                      **                                                                         **                email: epcc-javagrande@epcc.ed.ac.uk                     **                                                                         **      Original version of this code by Hon Yau (hwyau@epcc.ed.ac.uk)     **                                                                         **      This version copyright (c) The University of Edinburgh, 2001.      **                         All rights reserved.                            **                                                                         ***************************************************************************/package jgf_mpj_benchmarks.section3.montecarlo;//package montecarlo;/**  * Class for representing the returns of a given security.  *  * <p>To do list:  * <ol>  *   <li>Define a window over which the mean drift and volatility  *       are calculated.</li>  *   <li>Hash table to reference {DATE}->{pathValue-index}.</li>  * </ol>  *  * @author H W Yau  * @version $Revision: 1.1 $ $Date: 2005/04/29 17:43:42 $  */public class ReturnPath extends PathId {  //------------------------------------------------------------------------  // Class variables.  //------------------------------------------------------------------------  /**    * A class variable, for setting whether to print debug messages or not.    */  public static boolean DEBUG=true;  /**    * Class variable, for defining the prompt to print in front of debug    * messages.    */  protected static String prompt="ReturnPath> ";  /**    * Flag for indicating one of the return definitions, via:    *       u_i = \ln{\frac{S_i}{S_{i-1}}}    * corresponding to the instantaneous compounded return.    */  public static int COMPOUNDED = 1;  /**    * Flag for indicating one of the return definitions, via:    *       u_i = \frac{S_i - S_{i-1}}{S_i}    * corresponding to the instantaneous non-compounded return.    */  public static int NONCOMPOUNDED = 2;  //------------------------------------------------------------------------  // Instance variables.  //------------------------------------------------------------------------  /**    * An instance variable, for storing the return values.    */  private double[] pathValue;  /**    * The number of accepted values in the rate path.    */  private int nPathValue=0;  /**    * Integer flag for indicating how the return was calculated.    */  private int returnDefinition = 0;  /**    * Value for the expected return rate.    */  private double expectedReturnRate = Double.NaN;  /**    * Value for the volatility, calculated from the return data.    */  private double volatility = Double.NaN;  /**    * Value for the volatility-squared, a more natural quantity    * to use for many of the calculations.    */  private double volatility2 = Double.NaN;  /**    * Value for the mean of this return.    */  private double mean = Double.NaN;  /**    * Value for the variance of this return.    */  private double variance = Double.NaN;  //------------------------------------------------------------------------  // Constructors.  //------------------------------------------------------------------------  /**    * Default constructor.    */  public ReturnPath() {    super();    set_prompt(prompt);    set_DEBUG(DEBUG);  }  /**    * Another constructor.    *    * @param pathValue for creating a return path with a precomputed path    *                  value.  Indexed from 1 to <code>nPathArray-1</code>.    * @param nPathValue the number of accepted data points in the array.    * @param returnDefinition to tell this class how the return path values    *                         were computed.    */  public ReturnPath(double[] pathValue, int nPathValue, int returnDefinition) {    set_prompt(prompt);    set_DEBUG(DEBUG);    this.pathValue = pathValue;    this.nPathValue = nPathValue;    this.returnDefinition = returnDefinition;  }  //------------------------------------------------------------------------  // Methods.  //------------------------------------------------------------------------  //------------------------------------------------------------------------  // Accessor methods for class ReturnPath.  // Generated by 'makeJavaAccessor.pl' script.  HWY.  20th January 1999.  //------------------------------------------------------------------------  /**    * Accessor method for private instance variable <code>pathValue</code>.    *    * @return Value of instance variable <code>pathValue</code>.    * @exception DemoException thrown if instance variable <code>pathValue</code> is undefined.    */  public double[] get_pathValue() throws DemoException {    if( this.pathValue == null )      throw new DemoException("Variable pathValue is undefined!");    return(this.pathValue);  }  /**    * Set method for private instance variable <code>pathValue</code>.    *    * @param pathValue the value to set for the instance variable <code>pathValue</code>.    */  public void set_pathValue(double[] pathValue) {    this.pathValue = pathValue;  }  /**    * Accessor method for private instance variable <code>nPathValue</code>.    *    * @return Value of instance variable <code>nPathValue</code>.    * @exception DemoException thrown if instance variable <code>nPathValue</code> is undefined.    */  public int get_nPathValue() throws DemoException {    if( this.nPathValue == 0 )      throw new DemoException("Variable nPathValue is undefined!");    return(this.nPathValue);  }  /**    * Set method for private instance variable <code>nPathValue</code>.    *    * @param nPathValue the value to set for the instance variable <code>nPathValue</code>.    */  public void set_nPathValue(int nPathValue) {    this.nPathValue = nPathValue;  }  /**    * Accessor method for private instance variable <code>returnDefinition</code>.    *    * @return Value of instance variable <code>returnDefinition</code>.    * @exception DemoException thrown if instance variable <code>returnDefinition</code> is undefined.    */  public int get_returnDefinition() throws DemoException {    if( this.returnDefinition == 0 )      throw new DemoException("Variable returnDefinition is undefined!");    return(this.returnDefinition);  }  /**    * Set method for private instance variable <code>returnDefinition</code>.    *    * @param returnDefinition the value to set for the instance variable <code>returnDefinition</code>.    */  public void set_returnDefinition(int returnDefinition) {    this.returnDefinition = returnDefinition;  }  /**    * Accessor method for private instance variable <code>expectedReturnRate</code>.    *    * @return Value of instance variable <code>expectedReturnRate</code>.    * @exception DemoException thrown if instance variable <code>expectedReturnRate</code> is undefined.    */  public double get_expectedReturnRate() throws DemoException {    if( this.expectedReturnRate == Double.NaN )      throw new DemoException("Variable expectedReturnRate is undefined!");    return(this.expectedReturnRate);  }  /**    * Set method for private instance variable <code>expectedReturnRate</code>.    *    * @param expectedReturnRate the value to set for the instance variable <code>expectedReturnRate</code>.    */  public void set_expectedReturnRate(double expectedReturnRate) {    this.expectedReturnRate = expectedReturnRate;  }  /**    * Accessor method for private instance variable <code>volatility</code>.    *    * @return Value of instance variable <code>volatility</code>.    * @exception DemoException thrown if instance variable <code>volatility</code> is undefined.    */  public double get_volatility() throws DemoException {    if( this.volatility == Double.NaN )      throw new DemoException("Variable volatility is undefined!");    return(this.volatility);  }  /**    * Set method for private instance variable <code>volatility</code>.    *    * @param volatility the value to set for the instance variable <code>volatility</code>.    */  public void set_volatility(double volatility) {    this.volatility = volatility;  }  /**    * Accessor method for private instance variable <code>volatility2</code>.    *    * @return Value of instance variable <code>volatility2</code>.    * @exception DemoException thrown if instance variable <code>volatility2</code> is undefined.    */  public double get_volatility2() throws DemoException {    if( this.volatility2 == Double.NaN )      throw new DemoException("Variable volatility2 is undefined!");    return(this.volatility2);  }  /**    * Set method for private instance variable <code>volatility2</code>.    *    * @param volatility2 the value to set for the instance variable <code>volatility2</code>.    */  public void set_volatility2(double volatility2) {    this.volatility2 = volatility2;  }  /**    * Accessor method for private instance variable <code>mean</code>.    *    * @return Value of instance variable <code>mean</code>.    * @exception DemoException thrown if instance variable <code>mean</code> is undefined.    */  public double get_mean() throws DemoException {    if( this.mean == Double.NaN )      throw new DemoException("Variable mean is undefined!");    return(this.mean);  }  /**    * Set method for private instance variable <code>mean</code>.    *    * @param mean the value to set for the instance variable <code>mean</code>.    */  public void set_mean(double mean) {    this.mean = mean;  }  /**    * Accessor method for private instance variable <code>variance</code>.    *    * @return Value of instance variable <code>variance</code>.    * @exception DemoException thrown if instance variable <code>variance</code> is undefined.    */  public double get_variance() throws DemoException {    if( this.variance == Double.NaN )      throw new DemoException("Variable variance is undefined!");    return(this.variance);  }  /**    * Set method for private instance variable <code>variance</code>.    *    * @param variance the value to set for the instance variable <code>variance</code>.    */  public void set_variance(double variance) {    this.variance = variance;  }  //------------------------------------------------------------------------  /**    * Method to calculate the expected return rate from the return data,    * using the relationship:    *    \mu = \frac{\bar{u}}{\Delta t} + \frac{\sigma^2}{2}    *    * @exception DemoException thrown one tries to obtain an undefined variable.    */  public void computeExpectedReturnRate() throws DemoException {    this.expectedReturnRate = mean/get_dTime() + 0.5*volatility2;  }  /**    * Method to calculate <code>volatility</code> and <code>volatility2</code>    * from the return path data, using the relationship, based on the    * precomputed <code>variance</code>.     *   \sigma^2 = s^2\Delta t    *     * @exception DemoException thrown if one of the quantites in the    *                          computation are undefined.    */  public void computeVolatility() throws DemoException {    if( this.variance == Double.NaN )       throw new DemoException("Variable variance is not defined!");    this.volatility2 = variance / get_dTime();    this.volatility  = Math.sqrt(volatility2);  }  /**    * Method to calculate the mean of the return, for use by other    * calculations.    *    * @exception DemoException thrown if <code>nPathValue</code> is    *            undefined.    */  public void computeMean() throws DemoException{    if( this.nPathValue == 0 )      throw new DemoException("Variable nPathValue is undefined!");    this.mean = 0.0;    for( int i=1; i < nPathValue; i++ ) {      mean += pathValue[i];    }    this.mean /= ((double)(nPathValue - 1.0));  }  /**    * Method to calculate the variance of the retrun, for use by other    * calculations.    *    * @exception DemoException thrown if the <code>mean</code> or    *            <code>nPathValue</code> values are undefined.    */  public void computeVariance() throws DemoException{    if( this.mean == Double.NaN || this.nPathValue == 0)      throw new DemoException("Variable mean and/or nPathValue are undefined!");    this.variance = 0.0;        for( int i=1; i < nPathValue; i++ ) {      variance += (pathValue[i] - mean)*(pathValue[i] - mean);    }    this.variance /= ((double)(nPathValue - 1.0));  }  /**    * A single method for invoking all the necessary methods which    * estimate the parameters.    *    * @exception DemoException thrown if there is a problem reading any    *            variables.    */  public void estimatePath() throws DemoException{    computeMean();    computeVariance();    computeExpectedReturnRate();    computeVolatility();  }  /**    * Dumps the contents of the fields, to standard-out, for debugging.    */  public void dbgDumpFields() {    super.dbgDumpFields();//    dbgPrintln("nPathValue="        +this.nPathValue);//    dbgPrintln("expectedReturnRate="+this.expectedReturnRate);//    dbgPrintln("volatility="        +this.volatility);//    dbgPrintln("volatility2="       +this.volatility2);//    dbgPrintln("mean="              +this.mean);//    dbgPrintln("variance="          +this.variance);  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产夫妻精品视频| 国产自产视频一区二区三区| 欧美色国产精品| 亚洲电影在线免费观看| 欧美人妇做爰xxxⅹ性高电影| 视频一区欧美精品| 日韩精品一区二区三区在线| 国产一区二区日韩精品| 中文字幕av不卡| 在线观看免费一区| 日本麻豆一区二区三区视频| 久久免费午夜影院| hitomi一区二区三区精品| 亚洲精品伦理在线| 欧美高清视频一二三区 | 亚洲成人av一区二区三区| 在线播放/欧美激情| 激情综合五月天| 国产精品电影院| 在线不卡中文字幕| 成人小视频免费在线观看| 亚洲一二三四区不卡| 欧美一三区三区四区免费在线看| 国产成人综合网站| 一区二区三区在线观看视频| 欧美不卡一区二区三区四区| 成人亚洲精品久久久久软件| 夜夜精品视频一区二区| 精品欧美一区二区三区精品久久 | 久久黄色级2电影| 国产精品丝袜久久久久久app| 欧美日韩一区三区四区| 国产一区福利在线| 亚洲夂夂婷婷色拍ww47| 久久综合久久综合亚洲| 欧美亚洲综合另类| 国产精品一区二区男女羞羞无遮挡| 亚洲另类春色国产| 26uuu色噜噜精品一区二区| 欧美亚洲一区二区在线| 日本精品视频一区二区三区| 麻豆成人在线观看| 亚洲综合图片区| 欧美激情一区在线观看| 日韩一级免费观看| 精品视频在线看| aaa亚洲精品| 国产精品影视天天线| 日韩成人dvd| 一级日本不卡的影视| 国产精品久久三区| 久久婷婷综合激情| 欧美一区二区美女| 欧美视频在线观看一区二区| 99久久精品国产观看| 国模大尺度一区二区三区| 午夜精品一区二区三区电影天堂| 亚洲欧洲日韩一区二区三区| 国产欧美视频一区二区| 欧美电影免费观看完整版| 欧美精选一区二区| 欧美吻胸吃奶大尺度电影 | 久久日韩精品一区二区五区| 4438x亚洲最大成人网| 欧美午夜电影在线播放| 色婷婷一区二区三区四区| 暴力调教一区二区三区| 国产成人超碰人人澡人人澡| 国产精品白丝av| 国产麻豆精品一区二区| 捆绑调教一区二区三区| 美国十次综合导航| 欧美aaaaaa午夜精品| 日韩国产精品大片| 日韩**一区毛片| 日韩精品国产精品| 国产一区美女在线| 国产99久久久国产精品潘金| 国产一区二区主播在线| 国产一区二区0| 国产成人精品亚洲日本在线桃色| 国产福利一区在线| 不卡的电影网站| 色综合久久天天综合网| 欧美在线短视频| 欧美日韩www| 在线播放日韩导航| 精品av综合导航| 久久久亚洲午夜电影| 国产精品午夜在线| 亚洲精品中文字幕在线观看| 亚洲资源在线观看| 日韩中文欧美在线| 国内精品免费**视频| 国产v综合v亚洲欧| 色综合久久88色综合天天免费| 99精品视频在线免费观看| 一本久道中文字幕精品亚洲嫩| 欧美日韩一级黄| 精品入口麻豆88视频| 国产精品久久福利| 亚洲夂夂婷婷色拍ww47| 麻豆久久久久久| 岛国一区二区三区| 在线一区二区观看| 欧美成人精品高清在线播放| 中文字幕第一区| 成人高清视频在线| 欧洲国内综合视频| 精品国产乱码久久久久久蜜臀| 中文字幕成人av| 香蕉久久夜色精品国产使用方法 | 亚洲精选免费视频| 麻豆成人久久精品二区三区小说| 国产成人精品免费一区二区| 在线亚洲人成电影网站色www| 日韩一区二区三区精品视频| 国产精品乱人伦| 日日骚欧美日韩| 国产成人精品一区二区三区四区| 欧日韩精品视频| 国产午夜精品一区二区三区四区| 亚洲一区二区三区四区的 | 视频在线观看国产精品| 国产精品一区二区久久精品爱涩| 色综合激情五月| 久久影视一区二区| 亚洲成人在线观看视频| 成人一区在线看| 欧美大片日本大片免费观看| 亚洲精品亚洲人成人网| 国产成人欧美日韩在线电影| 欧美丰满美乳xxx高潮www| 中文在线一区二区| 看电影不卡的网站| 欧美日韩一区在线观看| 亚洲视频一区在线| 国产麻豆精品视频| 91精品国产黑色紧身裤美女| 亚洲精品高清在线| 岛国一区二区三区| 久久久亚洲综合| 久久国产乱子精品免费女| 欧美日韩成人一区二区| 亚洲日穴在线视频| 国产成人在线看| 精品国产免费视频| 欧美96一区二区免费视频| 欧美三区在线观看| 亚洲免费伊人电影| av不卡免费在线观看| 国产欧美日韩精品a在线观看| 美女视频黄频大全不卡视频在线播放| 色素色在线综合| 成人免费在线观看入口| 成人精品在线视频观看| 亚洲制服丝袜一区| 欧洲日韩一区二区三区| 一区二区视频在线| 99久久夜色精品国产网站| 中文字幕国产一区| 国产成人午夜电影网| 国产亚洲精品7777| 国产成人在线色| 亚洲国产成人在线| av激情亚洲男人天堂| 国产精品午夜在线| 99热99精品| 一区二区三区在线免费观看| 在线免费一区三区| 亚洲高清视频的网址| 欧美日本高清视频在线观看| 三级欧美在线一区| 日韩欧美激情一区| 激情深爱一区二区| 久久精品视频在线免费观看| 国产精品资源在线看| 欧美国产精品v| 99久久精品免费看| 一区二区三区在线观看欧美| 欧美日韩精品免费观看视频| 日韩影院免费视频| 久久综合九色综合97_久久久| 国产一区二三区好的| 亚洲国产精品成人综合| 色成年激情久久综合| 亚洲第一久久影院| 欧美大尺度电影在线| 国产成人精品一区二区三区网站观看| 国产精品久久毛片a| 在线看不卡av| 美女任你摸久久| 国产精品亲子乱子伦xxxx裸| 在线观看不卡一区| 蜜臀av一区二区三区| 中文字幕av资源一区| 欧美亚洲国产bt| 国精产品一区一区三区mba视频 | 久久精品欧美一区二区三区不卡 | 欧美日韩免费电影|