tag 标签: double经管大学堂:名校名师名课

相关帖子

版块 作者 回复/查看 最后发表
Double Your Dating中文版 休闲灌水 stevemarbo 2011-4-12 2 947 512661101 2019-5-12 23:36:54
Undefined function 'ols' for input arguments of type 'double' MATLAB等数学软件专版 evelyn0121 2013-9-3 5 12273 dujt11972900 2018-7-22 11:29:35
请教matlab中函数colmmd MATLAB等数学软件专版 yezicangshan 2013-6-22 5 4884 matlab-007 2016-8-28 21:35:28
悬赏 求助翻译 - [!reward_solved!] 求助成功区 小张在线 2014-10-26 5 3584 withyou2010 2014-10-29 10:02:21
请问怎样在stata中使用double hurdle model 计量经济学与统计软件 tccheyi 2009-6-10 6 8515 woshi17320 2014-3-11 14:18:35
悬赏 double precision real number指什么? - [!reward_solved!] R语言论坛 耕耘使者 2013-8-24 3 3364 ryusukekenji 2013-8-24 13:58:26
Matlab eps函数 MATLAB等数学软件专版 xuning5176 2013-4-5 2 2791 xuning5176 2013-4-5 15:46:44
AMOS问题,拜求高手讲解~! LISREL、AMOS等结构方程模型分析软件 sapphire_wei 2013-3-25 4 1505 sapphire_wei 2013-3-27 18:23:40
R问题求教 R语言论坛 shuimozhou 2013-2-26 1 2978 cfa4y 2013-2-26 17:06:32
[转帖]Double A 2008管理培训生计划正式启动(09.10发布) 经管类求职与招聘 轩轩 2007-9-10 1 2350 轩轩 2012-12-14 22:57:17
[疾速下载][推荐]《Double*双》----赵薇 attachment 休闲灌水 Icy 2005-7-26 12 4655 xiao_ying_1103 2011-10-7 20:39:19
Double Logistic Function 计量经济学与统计软件 nanou 2011-4-20 0 2363 nanou 2011-4-20 05:12:36
double型变量的处理 统计软件培训班VIP答疑区 Brook1114 2010-12-22 1 2245 arlionn 2010-12-23 08:37:46
July2010--FX & Fixed Income:Double‐dip for Europe attachment 行业分析报告 hanren 2010-7-8 1 1486 hanren 2010-7-9 17:41:05
Double A招聘内审员-2009或2010年毕业生 经管类求职与招聘 arthistory4 2010-2-23 0 1427 arthistory4 2010-2-23 15:16:22
DOUBLE LOOKBACKS attachment 论文版 zengyan1984 2009-12-27 0 1236 zengyan1984 2009-12-27 23:02:12
double entry分析non-bank lender进入市场银行BS变动(具体请看题,非常急 金融学(理论版) xueling116 2009-11-15 10 3547 xueling116 2009-11-15 12:38:09
Geman_Yor double barrier option attachment 金融学(理论版) maya 2009-3-10 0 1869 maya 2009-3-10 22:16:00
pricing double barrier option on FX attachment 金融学(理论版) ihs 2008-1-7 1 4401 wesker1999 2008-1-7 15:55:00
double moving average trading rule EViews专版 feiliqun 2007-3-8 1 3309 newbon 2007-10-23 12:41:00

相关日志

分享 Source Codes in Fortran90
accumulation 2015-5-1 13:23
blas2_c , a library which constitutes the Level 2 Basic Linear Algebra Subprograms (BLAS), for matrix-vector operations using single precision complex arithmetic. blas2_d , a library which constitutes the Level 2 Basic Linear Algebra Subprograms (BLAS), for matrix-vector operations using double precision real arithmetic. blas2_s , a library which constitutes the Level 2 Basic Linear Algebra Subprograms (BLAS), for matrix-vector operations using single precision real arithmetic. blas2_z , a library which constitutes the Level 2 Basic Linear Algebra Subprograms (BLAS), for matrix-vector operations using double precision complex arithmetic. blas3_c , a library which constitutes the Level 3 Basic Linear Algebra Subprograms (BLAS), for matrix-matrix operations using single precision complex arithmetic. blas3_d , a library which constitutes the Level 3 Basic Linear Algebra Subprograms (BLAS), for matrix-matrix operations using double precision real arithmetic. blas3_s , a library which constitutes the Level 3 Basic Linear Algebra Subprograms (BLAS), for matrix-matrix operations using single precision real arithmetic. blas3_z , a library which constitutes the Level 3 Basic Linear Algebra Subprograms (BLAS), for matrix-matrix operations using double precision complex arithmetic. blend , a library which carries out 1D/2D/3D blending interpolation; box_behnken , a library which computes a Box-Behnken design, that is, a set of arguments to sample the behavior of a function of multiple parameters; brent , a library which contains routines for finding zeroes or minima of a scalar function of a scalar variable, without the use of derivative information, including a reverse communication option, by Richard Brent. brownian_motion_simulation , a library which simulates Brownian motion in an M-dimensional region, creating graphics files for processing by gnuplot. bt_serial , a program which is a serial version of the NAS Parallel Benchmark BT (block tridiagonal solver for a 3D PDE). burgers_solution , a library which evaluates an exact solution of the time-dependent 1D viscous Burgers equation. bvec , a library which demonstrates how signed integers can be stored as binary vectors, and arithmetic can be performed on them. bvls , a library which applies least squares methods to solve a linear system for which lower and upper constraints may have been placed on every variable, by Charles Lawson and Richard Hanson. c_comment , a program which makes a copy of a file in which C++ style comments have been replaced by C-style comments. c4lib , a library which implements certain elementary functions for single precision complex (C4) variables; c8lib , a library which implements certain elementary functions for double precision complex (C8) variables; calendar_nyt , a library which shows the correspondence between dates and the New York Times volume and issue number;
个人分类: 裂变模型|0 个评论
分享 BSM期权定价模型—外推差分法
accumulation 2015-4-30 12:55
double option_price_call_european_finite_diff_explicit(const double S, const double X, const double r, const double sigma, const double time, const int no_S_steps, const int no_t_steps) { double sigma_sqr=sigma*sigma; unsigned int M; if ((no_S_steps % 2)==1) { M=no_S_steps+1; } else { M=no_S_steps; }; double delta_S=2.0*S/M; vectordouble S_values(M+1); for (unsigned m=0; m=M; m++) { S_values =m*delta_S; }; int N=no_t_steps; double delta_t=time/N; vectordouble a(M); vectordouble b(M); vectordouble c(M); double r1=1.0/(1.0+r*delta_t); double r2=delta_t/(1.0+r*delta_t); for (unsigned int j=1; jM; j++) { a =r2*0.5*j*(-r+sigma_sqr*j); b =r1*(1.0-sigma_sqr*j*j*delta_t); c =r2*0.5*j*(r+sigma_sqr*j); } vectordouble f_next(M+1); for (unsigned int n=0; n=M; ++n) { f_next =max(0.0, S_values -X); } vectordouble f(M+1); for (int t=N-1; t=0; --t) { f =0; for (unsigned m=1; mM; ++m) { f =a *f_next +b *f_next +c *f_next ; } f =0; for (unsigned n=0; n=M; ++n) { f_next =f ; }; } return f ; } double option_price_put_european_finite_diff_explicit(const double S, const double X, const double r, const double sigma, const double time, const int no_S_steps, const int no_t_steps) { double sigma_sqr=sigma*sigma; unsigned int M; if ((no_S_steps % 2)==1) { M=no_S_steps+1; } else { M=no_S_steps; }; double delta_S=2.0*S/M; vectordouble S_values(M+1); for (unsigned m=0; m=M; m++) { S_values =m*delta_S; }; int N=no_t_steps; double delta_t=time/N; vectordouble a(M); vectordouble b(M); vectordouble c(M); double r1=1.0/(1.0+r*delta_t); double r2=delta_t/(1.0+r*delta_t); for (unsigned int j=1; jM; j++) { a =r2*0.5*j*(-r+sigma_sqr*j); b =r1*(1.0-sigma_sqr*j*j*delta_t); c =r2*0.5*j*(r+sigma_sqr*j); } vectordouble f_next(M+1); for (unsigned int n=0; n=M; ++n) { f_next =max(0.0, X-S_values ); } vectordouble f(M+1); for (int t=N-1; t=0; --t) { f =X; for (unsigned m=1; mM; ++m) { f =a *f_next +b *f_next +c *f_next ; } f =0; for (unsigned n=0; n=M; ++n) { f_next =f ; }; } return f ; } double option_price_call_American_finite_diff_explicit(const double S, const double X, const double r, const double sigma, const double time, const int no_S_steps, const int no_t_steps) { double sigma_sqr=sigma*sigma; int M=no_S_steps; if ((no_S_steps % 2)==1) { M=no_S_steps+1; } else { M=no_S_steps; }; double delta_S=2.0*S/M; vectordouble S_values(M+1,0.0); for (int m=0; m=M; m++) { S_values =m*delta_S; }; int N=no_t_steps; double delta_t=time/N; vectordouble a(M,0.0); vectordouble b(M,0.0); vectordouble c(M,0.0); double r1=1.0/(1.0+r*delta_t); double r2=delta_t/(1.0+r*delta_t); for (unsigned int j=1; jM; j++) { a =r2*0.5*j*(-r+sigma_sqr*j); b =r1*(1.0-sigma_sqr*j*j*delta_t); c =r2*0.5*j*(r+sigma_sqr*j); } vectordouble f_next(M+1,0.0); for (int n=0; n=M; ++n) { f_next =max(0.0, S_values -X); } vectordouble f(M+1,0.0); for (int t=N-1; t=0; --t) { f =0; for (int m=1; mM; ++m) { f =a *f_next +b *f_next +c *f_next ; f =max(f ,S_values -X); } f =S_values -X; for (unsigned n=0; n=M; ++n) { f_next =f ; }; } double C2=f ; return C2; } double option_price_put_American_finite_diff_explicit(const double S, const double X, const double r, const double sigma, const double time, const int no_S_steps, const int no_t_steps) { double sigma_sqr=sigma*sigma; int M; if ((no_S_steps % 2)==1) { M=no_S_steps+1; } else { M=no_S_steps; }; double delta_S=2.0*S/M; vectordouble S_values(M+1); for (int m=0; m=M; m++) { S_values =m*delta_S; }; int N=no_t_steps; double delta_t=time/N; vectordouble a(M); vectordouble b(M); vectordouble c(M); double r1=1.0/(1.0+r*delta_t); double r2=delta_t/(1.0+r*delta_t); for (int j=1; jM; j++) { a =r2*0.5*j*(-r+sigma_sqr*j); b =r1*(1.0-sigma_sqr*j*j*delta_t); c =r2*0.5*j*(r+sigma_sqr*j); } vectordouble f_next(M+1); for (int n=0; n=M; ++n) { f_next =max(0.0, X-S_values ); } vectordouble f(M+1); for (int t=N-1; t=0; --t) { f =X; for (int m=1; mM; ++m) { f =a *f_next +b *f_next +c *f_next ; f =max(f ,X-S_values ); } f =0; for (int k=0; k=M; ++k) { f_next =f ; }; } return f ; } 外推差分法:只能用于 double S=50; double X=50; double r=0.1; double sigma=0.4; double time=0.4167; int no_S_steps=20; int no_t_steps=11;
个人分类: 金融工程|0 个评论
分享 金融计算C++—期权定价
accumulation 2015-4-29 19:04
double option_price_call_european_finite_diff_explicit(const double S, const double X, const double r, const double sigma, const double time, const int no_S_steps, const int no_t_steps) { double sigma_sqr=sigma*sigma; unsigned int M; if ((no_S_steps % 2)==1) { M=no_S_steps+1; } else { M=no_S_steps; }; double delta_S=2.0*S/M; vectordouble S_values(M+1); for (unsigned m=0; m=M; m++) { S_values =m*delta_S; }; int N=no_t_steps; double delta_t=time/N; vectordouble a(M); vectordouble b(M); vectordouble c(M); double r1=1.0/(1.0+r*delta_t); double r2=delta_t/(1.0+r*delta_t); for (unsigned int j=1; jM; j++) { a =r2*0.5*j*(-r+sigma_sqr*j); b =r1*(1.0-sigma_sqr*j*j*delta_t); c =r2*0.5*j*(r+sigma_sqr*j); } vectordouble f_next(M+1); for (unsigned int n=0; n=M; ++n) { f_next =max(0.0, S_values -X); } vectordouble f(M+1); for (int t=N-1; t=0; --t) { f =0; for (unsigned m=1; mM; ++m) { f =a *f_next +b *f_next +c *f_next ; } f =0; for (unsigned n=0; n=M; ++n) { f_next =f ; }; } return f ; } double option_price_put_european_finite_diff_explicit(const double S, const double X, const double r, const double sigma, const double time, const int no_S_steps, const int no_t_steps) { double sigma_sqr=sigma*sigma; unsigned int M; if ((no_S_steps % 2)==1) { M=no_S_steps+1; } else { M=no_S_steps; }; double delta_S=2.0*S/M; vectordouble S_values(M+1); for (unsigned m=0; m=M; m++) { S_values =m*delta_S; }; int N=no_t_steps; double delta_t=time/N; vectordouble a(M); vectordouble b(M); vectordouble c(M); double r1=1.0/(1.0+r*delta_t); double r2=delta_t/(1.0+r*delta_t); for (unsigned int j=1; jM; j++) { a =r2*0.5*j*(-r+sigma_sqr*j); b =r1*(1.0-sigma_sqr*j*j*delta_t); c =r2*0.5*j*(r+sigma_sqr*j); } vectordouble f_next(M+1); for (unsigned int n=0; n=M; ++n) { f_next =max(0.0, X-S_values ); } vectordouble f(M+1); for (int t=N-1; t=0; --t) { f =X; for (unsigned m=1; mM; ++m) { f =a *f_next +b *f_next +c *f_next ; } f =0; for (unsigned n=0; n=M; ++n) { f_next =f ; }; } return f ; }
个人分类: 金融工程|0 个评论
分享 计算金融C++—期权定价
accumulation 2015-4-29 12:22
double option_price_call_American_binomial(const double S, const double X, const double r, const double sigma, const double time, const int steps) { double R=exp(r*(time/steps)); double Rinv=1.0/R; double u=exp(sigma*sqrt(time/steps)); double uu=u*u; double d=1.0/u; double p_up=(R-d)/(u-d); double p_down=1.0-p_up; vectordouble prices(steps+1); prices =S*pow(d,steps); for(int i=1; i=steps; ++i) prices =uu*prices ; vectordouble call_values(steps+1); for(int j=0; j=steps; ++j) call_values =max(0.0,(prices -X)); for(int step=steps-1; step=0; --step) { for(int i=0; i=step; ++i) { call_values =(p_up*call_values +p_down*call_values )*Rinv; prices =d*prices ; call_values =max(call_values ,prices -X); } } return call_values ; } double option_price_put_American_binomial(const double S, const double X, const double r, const double sigma, const double time, const int steps) { double R=exp(r*(time/steps)); double Rinv=1.0/R; double u=exp(sigma*sqrt(time/steps)); double uu=u*u; double d=1.0/u; double p_up=(R-d)/(u-d); double p_down=1.0-p_up; vectordouble prices(steps+1); prices =S*pow(d,steps); for(int i=1; i=steps; ++i) prices =uu*prices ; vectordouble put_values(steps+1); for(int j=0; j=steps; ++j) put_values =max(0.0,(X-prices )); for(int step=steps-1; step=0; --step) { for(int i=0; i=step; ++i) { put_values =(p_up*put_values +p_down*put_values )*Rinv; prices =d*prices ; put_values =max(put_values ,X-prices ); } } return put_values ; }
个人分类: 金融工程|0 个评论
分享 计算金融C++—期权定价
accumulation 2015-4-29 12:21
double option_price_call_european_binomial(const double S, const double X, const double r, const double sigma, const double time, const int steps) { double R=exp(r*(time/steps)); double Rinv=1.0/R; double u=exp(sigma*sqrt(time/steps)); double uu=u*u; double d=1.0/u; double p_up=(R-d)/(u-d); double p_down=1.0-p_up; vectordouble prices(steps+1); prices =S*pow(d,steps); for(int i=1; i=steps; ++i) prices =uu*prices ; vectordouble call_values(steps+1); for(int j=0; j=steps; ++j) call_values =max(0.0,(prices -X)); for(int step=steps-1; step=0; --step) { for(int i=0; i=step; ++i) { call_values =(p_up*call_values +p_down*call_values )*Rinv; } } return call_values ; } double option_price_put_european_binomial(const double S, const double X, const double r, const double sigma, const double time, const int steps) { double R=exp(r*(time/steps)); double Rinv=1.0/R; double u=exp(sigma*sqrt(time/steps)); double uu=u*u; double d=1.0/u; double p_up=(R-d)/(u-d); double p_down=1.0-p_up; vectordouble prices(steps+1); prices =S*pow(d,steps); for(int i=1; i=steps; ++i) prices =uu*prices ; vectordouble put_values(steps+1); for(int j=0; j=steps; ++j) put_values =max(0.0,(X-prices )); for(int step=steps-1; step=0; --step) { for(int i=0; i=step; ++i) { put_values =(p_up*put_values +p_down*put_values )*Rinv; } } return put_values ; }
个人分类: 金融工程|0 个评论
分享 计算金融C++—期权定价
accumulation 2015-4-29 12:20
double sampleNormal() { double u=((double) rand()/(RAND_MAX))*2-1; double v=((double) rand()/(RAND_MAX))*2-1; double r=u*u+v*v; if (r==0 || r1) return sampleNormal(); double c=sqrt(-2*log(r)/r); return u*c; } double simulate_random_variable(const double S, const double r, const double sigma, const double time) { double R=(r-0.5*pow(sigma,2))*time; double SD=sigma*sqrt(time); return S*exp(R+SD*sampleNormal()); } double max(double a,double b) { if (ab) return a; else return b; } void option_price_european_simulated(const double S, const double X, const double r, const double sigma, const double time, const int no_sims, double call_option, double put_option) { double R=(r-0.5*pow(sigma,2))*time; double SD=sigma*sqrt(time); double sum_payoffs1=0.0; double sum_payoffs2=0.0; for(int n=1; n=no_sims; n++) { double S_T=S*exp(R+SD*sampleNormal()); sum_payoffs1+=max(0.0,S_T-X); sum_payoffs2+=max(X-S_T,0.0); } call_option=exp(-r*time)*(sum_payoffs1/double(no_sims)); put_option=exp(-r*time)*(sum_payoffs2/double(no_sims)); }
个人分类: 金融工程|0 个评论
分享 计算金融C++—期权定价
accumulation 2015-4-29 12:18
double option_price_call_BS(const double S, const double X, const double r, const double sigma, const double time) { double time_sqrt=sqrt(time); double d1=(log(S/X)+r*time)/(sigma*time_sqrt)+0.5*sigma*time_sqrt; double d2=d1-(sigma*time_sqrt); double c=S*N(d1)-X*exp(-r*time)*N(d2); return c; } double option_price_put_BS(const double S, const double X, const double r, const double sigma, const double time) { double time_sqrt=sqrt(time); double d1=(log(S/X)+r*time)/(sigma*time_sqrt)+0.5*sigma*time_sqrt; double d2=d1-(sigma*time_sqrt); double p=X*exp(-r*time)*N(-d2)-S*N(-d1); return p; }
个人分类: 金融工程|0 个评论
分享 C++:变尺度法DFP求函数的最小值
accumulation 2015-4-24 16:53
#include "iostream.h" #include "math.h" #include "stdlib.h" double fun(double *x); double fcon(double *x); double funs(double *x,double M); void Grad(double (*pf)(double *x,double M),double m,int n,double *point,double *grad); double Search(double (*pf)(double *x,double M),double m,int n,double *start,double *direction); double DFP(double (*pf)(double *x,double M),double m,int n,double *min_point); double DFP(double (*pf)(double *x,double M),double m,int n,double *min_point) { int i,j,k; double e=1E-5,g_norm; double *g0=new double ; double *g1=new double ; double *dg=new double ; double *p=new double ; double t; double *x0=new double ; double *x1=new double ; double *dx=new double ; double **H=new double* ; for(i=0; in; i++) H = new double ; double **tempH=new double* ; for (i=0; in; i++) tempH = new double ; double *gH=new double ; double *Hg=new double ; double num1; double num2; for(i=0;in;i++) for(j=0;jn;j++) { if(i==j) H =1.0; else H =0.0; tempH =0.0; } for(i=0;in;i++) x0 =min_point ; Grad(pf,m,n,x0,g0); g_norm=0.0; for(i=0;in;i++) g_norm=g_norm+g0 *g0 ; g_norm=sqrt(g_norm); if(g_norme) { for(i=0;in;i++) min_point =x0 ; delete g1; delete p; delete x1; delete H ; delete tempH ; delete gH; delete =-g0 ; k=0; do { t=Search(pf,m,n,x0,p); for(i=0;in;i++) x1 =x0 +t*p ; Grad(pf,m,n,x1,g1); g_norm=0.0; for(i=0;in;i++) g_norm=g_norm+g1 *g1 ; g_norm=sqrt(g_norm); for(i=0;in;i++) { dx =x1 -x0 ; dg =g1 -g0 ; } for(i=0;in;i++) { gH =0.0; Hg =0.0; } for(i=0;in;i++) { for(j=0;jn;j++) { gH =gH +dg *H ; Hg =gH ; } } num1=0.0; num2=0.0; for(i=0;in;i++) { num1=num1+dx *dg ; num2=num2+gH *dg ; } for(i=0;in;i++) for(j=0;jn;j++) tempH =0.0; for(i=0;in;i++) { for(j=0;jn;j++) { tempH =tempH +H ; tempH =tempH +dx *dx /num1; tempH =tempH -Hg *gH /num2; } } for(i=0;in;i++) { for(j=0;jn;j++) { H =tempH ; } } for(i=0;in;i++) p =0.0; for(i=0;in;i++) { for(j=0;jn;j++) { p =p -H *g1 ; } } for(i=0;in;i++) { g0 =g1 ; x0 =x1 ; } k=k+1; }while(g_norme); for(i=0;in;i++) min_point =x1 ; delete g1; delete p; delete x1; delete H ; delete tempH ; delete gH; delete ; temp_point=new double ; Grad(pf,m,n,start,grad); diver_a=0; for(i=0;in;i++) diver_a=diver_a+grad *direction ; do { b=a+step; for(i=0;in;i++) temp_point =start +b*direction ; Grad(pf,m,n,temp_point,grad); diver_b=0; for(i=0;in;i++) diver_b=diver_b+grad *direction ; if( fabs(diver_b)1E-10 ) { delete temp_point; return b; } if( diver_b-1E-15 ) { a=b; diver_a=diver_b; step=2*step; } }while(diver_b=1E-15 ); for(i=0;in;i++) temp_point =start +a*direction ; value_a=pf(temp_point,m); for(i=0;in;i++) temp_point =start +b*direction ; value_b=pf(temp_point,m); do { s=3*(value_b-value_a)/(b-a); z=s-diver_a-diver_b; w=sqrt( fabs(z*z-diver_a*diver_b) ); t=a+(w-z-diver_a)*(b-a)/(diver_b-diver_a+2*w); value_b=pf(temp_point,m); for(i=0;in;i++) temp_point =start +t*direction ; value_t=pf(temp_point,m); Grad(pf,m,n,temp_point,grad); diver_t=0; for(i=1;i=n;i++) diver_t=diver_t+grad *direction ; if(diver_t1E-6) { b=t; value_b=value_t; diver_b=diver_t; } else if(diver_t-1E-6) { a=t; value_a=value_t; diver_a=diver_t; } else break; }while( (fabs(diver_t)=1E-6) (fabs(b-a)1E-6) ); delete temp_point; return t; } void Grad(double (*pf)(double *x,double M),double m,int n,double *point,double *grad) { double h=1E-3; int i; double *temp; temp = new double ; for(i=0;in;i++) { temp =point ; } for(i=0;in;i++) { temp +=0.5*h; grad =4*pf(temp,m)/(3*h); temp -=h; grad -=4*pf(temp,m)/(3*h); temp +=(3*h/2); grad -=(pf(temp,m)/(6*h)); temp -=(2*h); grad +=(pf(temp,m)/(6*h)); temp =point ; } delete ; double *x1=new double ; double e=1E-3,t; double M0,c; M0=1; c=2.5; for(i=0;in;i++) x0 =min_point ; k=0; do{ DFP(funs,M0,n,x0); for(i=0;in;i++) x1 =x0 ; t=fabs(fcon(x1)); if(te) { for(i=0;in;i++) min_point =x1 ; delete x1; return pf(min_point); } M0=c*M0; }while(k10); for(i=0;in;i++) min_point =x1 ; delete x1; return pf(min_point); } double fun(double *x) { //return -(0.5428-log(x )-((log(x )-5.9123)*(log(x )-5.9123))/0.0469-((x -127.2)*(x -127.2))/158.5624-0.1068*x -exp(-0.1068*(x -46.1355))); double a1=345,a2=181.52,b1=42.435,b2=10.70968; return log(2.51*b1*x )+0.5*((log(x )-a1)*(log(x )-a1))/(b1*b1)+log(2.51*b2)+0.5*((x -a2)*(x -a2)/(b2*b2)); } double fcon(double *x) { //return x -x -x ; return x -x ; } double funs(double *x,double M) { return fun(x)+M*fcon(x)*fcon(x); } void main() { int n=3; //double min_point ={201.15,201.15}; double mi ={5.836,181.52}; double min_value=Dev(fun,n,min_point); cout"本程序功能:使用变尺度法(DFP)求函数的最小值。"endl; cout"最小值点为:"endl; //cout"("min_point ","min_point ","min_point ")"endl; cout"("min_point ","min_point ")"endl; cout"最小值为:"endl; coutmin_valueendl; system("pause"); }
个人分类: 裂变模型|0 个评论
分享 print option id double sum选项
yukai08008 2013-3-16 00:15
sum的格式和变量一样。 proc print data=resdat.yrret double noobs ;/*(obs=15); infile products obs=15; */ var stkcd lstknm date yrtrds yrret; sum yrret; where lstknm in ('大众B股','万科A');/*如选项不存在则忽略*/ run; /*proc contents data=resdat.yrret; run;
个人分类: 学习笔记|0 个评论
分享 標點符號的英文
kendoyugi 2012-11-24 21:53
今天看到了許多標點符號的英文 有些用了半天 卻念不出來 真慚愧 -.- , comma . period, or dot ? question mark ! exclamation point : colon ; semicolon " quotation mark or double quote ' apostrophe or single quote ` grave @ at - dash _ underline $ dollar mark % percent ∞ infinity ampersand * asterisk, star, or multiplication + plus = equal / solidus or slash \ backslash ~ tilde ^ hat less than greater than ( left parenthesis ) right parenthesis right bracket { left braces } right braces
31 次阅读|0 个评论
分享 chapter1
jane19828 2012-11-21 23:25
Chapter 1 The Corporation 1.1 The Four Types of Firms 1) A sole proprietorship is owned by: A) One person B) Two of more persons C) Shareholders D) Bankers Answer: A Diff: 1 Skill: Definition 2) Which of the following organization forms for a business does not avoid double taxation? A) Limited Partnership B) ʺCʺ Corporation C) ʺSʺ Corporation D) Limited Liability Company Answer: B Diff: 1 Skill: Conceptual 3) Which of the following organization forms has the most revenue? A) ʺSʺ Corporation B) Limited Partnership C) ʺCʺ Corporation D) Limited Liability Company Answer: C Diff: 1 Skill: Conceptual 4) Which of the following organization forms accounts for the greatest number of firms? A) ʺSʺ Corporation B) Limited Partnership C) Sole Proprietorship D) ʺCʺ Corporation Answer: C Diff: 1 Skill: Conceptual 2 Berk/DeMarzo · Corporate Finance 5) Which of the following is NOT an advantage of a sole proprietorship? A) Single taxation B) Ease of setup C) Limited liability D) No separation of ownership and control Answer: C Diff: 2 Skill: Conceptual 6) Which of the following statements regarding limited partnerships is true? A) There is no limit on a limited partnerʹs liability. B) A limited partnerʹs liability is limited by the amount of their investment. C) A limited partner is not liable until all the assets of the general partners have been exhausted. D) A general partnerʹs liability is limited by the amount of their investment. Answer: B Diff: 2 Skill: Conceptual 7) Which of the following is / are an advantage of incorporation? A) Access to capital markets B) Limited liability C) Unlimited life D) All of the above Answer: D Diff: 2 Skill: Conceptual 8) Which of the following statements is most correct? A) An advantage to incorporation is that it allows for less regulation of the business. B) An advantage of a corporation is that it is subject to double taxation. C) Unlike a partnership, a disadvantage of a corporation is that has limited liability. D) Corporations face more regulations when compared to partnerships. Answer: D Diff: 2 Skill: Conceptual Chapter 1 The Corporation 3 9) A limited liability company is essentially A) a limited partnership without limited partners. B) a limited partnership without a general partner. C) just another name for a limited partnership. D) just another name for a corporation. Answer: B Diff: 1 Skill: Conceptual 10) The distinguishing feature of a corporation is that A) their is no legal difference between the corporation and its owners. B) it is a legally defined, artificial being, separate from its owners. C) it spreads liability for its corporate obligations to all shareholders. D) provides limited liability only to small shareholders. Answer: B Diff: 2 Skill: Conceptual 11) Which of the following are subject to double taxation? A) Corporation B) Partnership C) Sole proprietorship D) A and B Answer: A Diff: 1 Skill: Conceptual 12) You own 100 shares of a ʺCʺ Corporation. The corporation earns $5.00 per share before taxes. Once the corporation has paid any corporate taxes that are due, it will distribute the rest of its earnings to its shareholders in the form of a dividend. If the corporate tax rate is 40% and your personal tax rate on (both dividend and non-dividend) income is 30%, then how much money is left for you after all taxes have been paid? A) $210 B) $300 C) $350 D) $500 Answer: A Explanation: A) EPS × number of shares × (1 - Corporate Tax Rate) × (1 - Individual Tax Rate) $5.00 per share × 100 shares × (1 - .40) x (1 - .30) = $210 Diff: 2 Skill: Analytical 4 Berk/DeMarzo · Corporate Finance 13) You own 100 shares of a Sub Chapter ʺSʺ Corporation. The corporation earns $5.00 per share before taxes. Once the corporation has paid any corporate taxes that are due, it will distribute the rest of its earnings to its shareholders in the form of a dividend. If the corporate tax rate is 40% and your personal tax rate on (both dividend and non-dividend) income is 30%, then how much money is left for you after all taxes have been paid? A) $210 B) $300 C) $350 D) $500 Answer: C Explanation: C) EPS × number of shares × (1 - Individual Tax Rate) $5.00 per share × 100 shares × (1 - .30) = $350 Diff: 2 Skill: Analytical 14) You are a shareholder in a ʺCʺ corporation. This corporation earns $4 per share before taxes. After it has paid taxes, it will distribute the remainder of its earnings to you as a dividend. The dividend is income to you, so you will then pay taxes on these earnings. The corporate tax rate is 35% and your tax rate on dividend income is 15%. The effective tax rate on your share of the corporations earnings is closest to: A) 15% B) 35% C) 45% D) 50% Answer: C Explanation: C) Fist the corporation pays taxes. It earned $4 per share, but must pay $4 × .35 = $1.40 to the government in corporate taxes. That leaves $4.00 - $1.40 = $2.60 to distribute to the shareholders. However, the shareholder must pay $2.60 × .15 = $0.39 in income taxes on this amount, leaving only $2.21 to the shareholder after all taxes are paid. The total amount paid in taxes is $1.40 + 0.39 = $1.79. The effective tax rate is then $1.79 ÷ $4 = .4475 or 44.75% which is closest to 45%. Diff: 3 Skill: Analytical 15) Explain the benefits of incorporation. Answer: 1. Limited liability 2. Unlimited life 3. Access to capital markets / availability of outside funding Diff: 2 Skill: Conceptual Chapter 1 The Corporation 5 16) Explain the difference between a sub-chapter ʺSʺ corporation and a sub-chapter ʺCʺ corporation. Answer: ʺCʺ Corporation ʺSʺ Corporation Publicly traded stock Privately traded stock Unlimited shareholders No more than 75 shareholders Double taxation Taxed like a partnership Diff: 2 Skill: Conceptual 1.2 Ownership Versus Control of Corporations 1) In a corporation, the ultimate decisions regarding business matters are made by A) the Board of Directors. B) debt holders. C) shareholders. D) investors. Answer: A Diff: 1 Skill: Conceptual 2) The person charged with running the corporation by instituting the rules and policies set by the board of directors is called A) the Chief Operating Officer. B) the Company President. C) the Chief Executive Officer. D) the Chief Financial Officer. Answer: C Diff: 1 Skill: Definition 3) The Principal-Agent Problem arises A) because managers have little incentive to work in the interest of shareholders when this means working against their own self-interest. B) because of the separation of ownership and control in a corporation. C) Both A and B D) None of the above Answer: C Diff: 1 Skill: Conceptual 6 Berk/DeMarzo · Corporate Finance 4) If shareholders are unhappy with a CEOʹs performance, they are most likely to A) buy more shares in an effort to gain control of the firm. B) file a shareholder resolution. C) replace the CEO through a grassroots shareholder uprising. D) sell their shares. Answer: D Diff: 2 Skill: Conceptual 5) A ________, is when a rich individual or organization purchases a large fraction of the stock of a poorly performing firm and in doing so gets enough votes to replace the board of directors and the CEO. A) shareholder proposal B) leveraged buyout C) shareholder action D) hostile takeover Answer: D Diff: 2 Skill: Definition 6) Which of the following statements is false? A) In bankruptcy, management is given the opportunity to reorganize the firm and renegotiate with debt holders. B) Because a corporation is a separate legal entity, when it fails to repay its debts, the people who lent to the firm, the debt holders are entitled to seize the assets of the corporation in compensation for the default. C) As long as the corporation can satisfy the claims of the debt holders, ownership remains in the hands of the equity holders. D) If the corporation fails to satisfy debt holdersʹ claims, debt holders may lose control of the firm. Answer: D Explanation: D) If the corporation fails to satisfy debt holdersʹ claims, debt holders may take control of the firm. Diff: 2 Skill: Conceptual 7) What strategies are available to shareholders to help ensure that managers are motivated to act in the interest of the shareholders rather than their own interest? Answer: 1. The threat of a hostile takeover 2. Shareholder initiatives 3. Performance based compensation Diff: 3 Skill: Conceptual Chapter 1 The Corporation 7 1.3 The Stock Market Use the table for the question(s) below. Consider the following two quotes for XYZ stock: November 11th November 18th Ask: 25.25 Ask: 26.00 Bid: 25.20 Bid: 25.93 1) How much would you have to pay to purchase 100 shares of XYZ stock on November 18th? A) $2520 B) $2525 C) $2593 D) $2600 Answer: D Explanation: D) 100 shares × $26.00 (ask price) = $2600 Diff: 1 Skill: Analytical 2) How much would you receive if you sold 200 shares of XYZ stock on November 11th? A) $5050 B) $5040 C) $5186 D) $5200 Answer: B Explanation: B) 200 shares × $25.20 (bid price) = $5040 Diff: 1 Skill: Analytical 3) The largest stock market in the world is A) the London Stock Exchange. B) NASDAQ. C) the American Stock Exchange. D) the New York Stock Exchange. Answer: D Diff: 1 Skill: Definition 8 Berk/DeMarzo · Corporate Finance 4) An investment is said to be liquid if the investment A) has large day to day fluctuations in price. B) has a large bid-ask spread. C) can easily be converted into cash. D) is traded on a stock exchange. Answer: C Diff: 2 Skill: Definition 5) What type of company trades on an organized stock exchange? A) a limited liability company. B) a private company. C) an ʺSʺ corporation. D) a public company. Answer: D Diff: 1 Skill: Definition 6) Which of the following statements is false? A) On Nasdaq, stocks can and do have multiple market makers who compete with each other. Each market maker must post bid and ask prices in the Nasdaq network where they can be viewed by all participants. B) Bid prices exceed ask prices. C) Because customers always buy at the ask and sell at the bid, the bid-ask spread is a transaction cost investors have to pay in order to trade. D) On the floor of the NYSE, market makers (known on the NYSE as specialists) match buyers and sellers. Answer: B Explanation: B) Ask prices exceed bid prices. Diff: 2 Skill: Conceptual Chapter 1 The Corporation 9 Use the table for the question(s) below. Consider the following two quotes for XYZ stock: November 11th November 18th Ask: 25.25 Ask: 26.00 Bid: 25.20 Bid: 25.93 7) What are your net proceeds if you purchased 2500 shares of XYZ stock on November 11th and then sold them a week later on November 18th? Answer: sell at bid price 11/18 = 2500 × $25.93 = $64,825 now subtract the price paid for the shares buy at ask price 11/11 = 2500 × $25.25 = $63,125 so net proceeds = 64,825 - 63,125 = $1700 Diff: 2 Skill: Analytical 8) Explain the main differences between the NYSE and NASDAQ stock markets. Answer: Key points: NYSE has physical location—NASDAQ is an electronic market. NYSE has one specialist in each stock and his role is to match buyers and sellers. NASDAQ has multiple market makers (dealers) in each stock who stand ready to trade on their own accounts. Diff: 2 Skill: Conceptual
个人分类: cf|0 个评论
GMT+8, 2025-12-24 19:18