Learn R Programming

Sim.DiffProc (version 2.5)

MartExp: Creating The Exponential Martingales Process

Description

Simulation the exponential martingales.

Usage

MartExp(N, t0, T, sigma, output = FALSE)

Arguments

N
size of process.
t0
initial time.
T
final time.
sigma
constant positive (sigma is volatility).
output
if output = TRUE write a output to an Excel (.csv).

Value

  • data.frame(time,x,y) and plot of process.

Details

That is to say W(t) a Brownian movement the following processes are continuous martingales :
  1. X(t) = W(t)^2 - t.
  2. Y(t) = exp( integral(f(s)dW(s),0,t)- 0.5 * integral(f(s)^2 ds,0,t) ).

Examples

Run this code
## Exponential Martingales Process
 MartExp(N=1000,t0=0,T=1,sigma=2)

Run the code above in your browser using DataLab