stock_price_simulation: Generate stock prices

Description Usage Arguments Value Examples

Description

This function plots a chosen number of random trajectories for stock marked prices of chosen asset. Function on its own is providing data from google finance. Stochastic process which is used in function to modeling future prices is a Black Scholes model. Simulation values are aproximations of process:
dX_t = a * X_t dt + sigma * X_t dW_t ,
where W is a standard Wiener process.

Usage

1
2
stock_price_simulation(symbol, days, simulations, price_type = "close",
  driftless = FALSE)

Arguments

symbol

Symbol of a stock exchange data.

days

Number of days for which simulation is to be performed.

simulations

Number of simulated trajectories which has to be done.

price_type

Type of price : "close" or "open".

driftless

Logical value which can set dift on 0 in model. Default value is FALSE.

Value

A plot of simulated process trajectories and list with 2 frames ( [[1]] - historical data and [[2]] - simulated trajectories).

Examples

1
2
3
stock_price_simulation("GOOG",100,200,"open",TRUE)
stock_price_simulation("YHOO",100,200)
stock_price_simulation("GOOG",100,50,"close")

mrepsilon/PawelKawskiPackage documentation built on May 21, 2019, 2:22 p.m.