Description Usage Arguments Value Examples
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.
1 2 | stock_price_simulation(symbol, days, simulations, price_type = "close",
driftless = FALSE)
|
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. |
A plot of simulated process trajectories and list with 2 frames ( [[1]] - historical data and [[2]] - simulated trajectories).
1 2 3 | stock_price_simulation("GOOG",100,200,"open",TRUE)
stock_price_simulation("YHOO",100,200)
stock_price_simulation("GOOG",100,50,"close")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.