knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

fineng

The package provides routines to calculate option prices using different closed-form solutions and Monte-Carlo simulations based on different stochastic motions

Installation

You can install the released version of fineng with

devtools::install_github("fineng")

New Updates on February 2019

Plan for development

We plan to add the following features in the next releases:

Usage

Geometric Brownian Motion Simulation

``` {R GBM} library(fineng) SinglePath <- SimGBM(100,0.03,0.25,2,100,"discrete") Path100 <- SimDGBM(100,0.03,0.25,2,100,10,"continuous") Path100Terminal <- SimTGBM(100,0.03,0.25,2,100,10,"continuous")

head(SinglePath) knitr::kable(head(Path100,10)) knitr::kable(Path100Terminal)

### Heston model
```{R example}
### Necessary Paramters
PutCall <- "Call"
# Option Properties
S = 100
K = 100
tau = 0.5
r = 0.03
q = 0.02
# Heston model Properties
kappa = 0.2
theta = 0.25
sigma = 0.3
lambda = 0
v0 = 0.02
rho = -0.8
# Mid-point Properties
N = 1000
a = 1e-5
b = 100

### Heston Price using Mid-point integration rule
HestonPriceMP(PutCall, S, K, tau, r, q, kappa, theta, sigma, lambda, v0, rho, N, a, b)

### Comparison with Black-Scholes model

BlackScholes("Call",S = 100, K = 100, tau = 0.5, r = 0.03, q = 0.02, sigma = 0.3)

Citation

License

This project is licensed under the GPL3 License



thanhuwe8/fineng documentation built on June 9, 2019, 2:43 p.m.