|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdiff_CIR
public class diff_CIR
CIR interest rate model in differential form, where r is the short term risk free rate of return, dt is the time step differential, r is pulled back to the mu-level at a rate of alpha, a represents the function a(r)=alpha(mu-r) used in the SDEIntegrator. The first derivative of a, d_a = -alpha. The sde is an SDEIntegrator used to find r(t+delta_t), where the function b(r,t) is the constant sigma
| Field Summary | |
|---|---|
protected double |
a
|
protected double |
alpha
|
protected double |
b
|
protected double |
B_maturity
|
protected double |
call
|
protected double |
d_a
|
protected double |
d_b
|
protected double |
dd_a
|
protected double |
dd_b
|
protected double |
ddd_b
|
protected double |
dt
|
protected double |
mu
|
protected double |
put
|
protected double |
r
|
protected double |
r0
|
protected SDEIntegrator |
sde
|
protected double |
sigma
|
| Constructor Summary | |
|---|---|
diff_CIR()
Creates a new instance of diff_CIR with default values |
|
diff_CIR(double _dt,
double _mu,
double _alpha,
double _sigma,
double _r0)
Creates a new instance of diff_CIR |
|
| Method Summary | |
|---|---|
DataCurve[] |
gen_AverBondandIRvsMaturity(int n_sim,
int n_points,
double S)
|
DataCurve[] |
gen_BondandIRvsMaturity(int n_points,
double S)
Curve[0] has the time dependent IR Curve[1] has the time dependent price of the Bond |
double |
get_a()
gets a(r) |
double |
get_alpha()
gets the rate alpha at which r(t) converges to mu |
double |
get_B_maturity()
|
double |
get_b()
|
double |
get_d_a()
|
double |
get_d_b()
|
double |
get_dd_a()
|
double |
get_dd_b()
|
double |
get_ddd_b()
|
double |
get_dt()
|
double |
get_mu()
gets the long term average rate of return mu |
double |
get_r()
gets the short term risk free interest rate |
double |
get_r0()
gets the initial short term risk free interest rate |
double |
get_sigma()
gets the volatility sigma of r(t) |
static void |
main(java.lang.String[] args)
|
void |
set_a()
sets the a(r) function used in the SDEIntegrator for the particular case of the Cox Ingersoll Ross Model |
void |
set_alpha(double _alpha)
sets the rate at which r(t) goes back to mu |
void |
set_B_maturity(double b)
|
void |
set_b()
sets the b(r,t) function used in the SDEIntegrator |
void |
set_call(double c)
|
void |
set_d_a()
|
void |
set_d_b()
sets the db(r,t)/dr function used in the SDEIntegrator |
void |
set_dd_a()
|
void |
set_dd_b()
sets the d^2b(r,t)/dr^2 function used in the SDEIntegrator |
void |
set_ddd_b()
sets the d^3b(r,t)/dr^3 function used in the SDEIntegrator |
void |
set_dt(double _dt)
|
void |
set_mu(double _mu)
long term average interest rate |
void |
set_put(double p)
|
void |
set_r(double _p)
sets the short term risk free interest rate |
void |
set_r0(double _p)
sets the initial short term risk free interest rate |
void |
set_SDE()
|
void |
set_sigma(double _sigma)
sets the volatility sigma of r(t) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double r
protected double r0
protected double B_maturity
protected double dt
protected double a
protected double d_a
protected double dd_a
protected double b
protected double d_b
protected double dd_b
protected double ddd_b
protected double alpha
protected double mu
protected double sigma
protected double call
protected double put
protected SDEIntegrator sde
| Constructor Detail |
|---|
public diff_CIR()
public diff_CIR(double _dt,
double _mu,
double _alpha,
double _sigma,
double _r0)
| Method Detail |
|---|
public void set_a()
public void set_d_a()
public void set_dd_a()
public void set_b()
public void set_d_b()
public void set_dd_b()
public void set_ddd_b()
public static void main(java.lang.String[] args)
public void set_SDE()
public void set_B_maturity(double b)
public double get_B_maturity()
public void set_call(double c)
public void set_put(double p)
public void set_dt(double _dt)
public double get_dt()
public double get_a()
public double get_d_a()
public double get_dd_a()
public void set_r(double _p)
public void set_r0(double _p)
public void set_alpha(double _alpha)
public void set_mu(double _mu)
public void set_sigma(double _sigma)
public double get_r()
public double get_r0()
public double get_alpha()
public double get_mu()
public double get_sigma()
public double get_b()
public double get_d_b()
public double get_dd_b()
public double get_ddd_b()
public DataCurve[] gen_BondandIRvsMaturity(int n_points,
double S)
public DataCurve[] gen_AverBondandIRvsMaturity(int n_sim,
int n_points,
double S)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||