This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load packages ---- | |
library(shiny) | |
library(quantmod) | |
library(randomForest) | |
### The simulation functions | |
simulateJump=function(mu_,ss_,lambda_,mu2_,sigma_,TotalTime,delta,compare,size) | |
{ | |
Sn=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(RQuantLib) | |
shinyServer(function(input, output) { | |
## The model class is the backbone of thsi application | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Author: Wilson Mongwe | |
#### Date: 05/10/2015 | |
#### Website: www.wilsonmongwe.co.za | |
#### Title: Training the nueral network for the jump test | |
#### This code tests fro the presence of jumps using nueral networks | |
#### Training the neural network ##### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Author: Wilson Mongwe | |
#### Date: 21/06/2015 | |
#### Website: www.wilsonmongwe.co.za | |
#### Title: This code is for implementing the EM algorithm to estimate paramters from a mixture | |
#### of three normal distributions. | |
########################### Simulating the population data ############################# | |
N= 10000 ### Number of draws from the mixture | |
normals= 3 ### number of normals in the mixture. We have chosen to use 3 in this example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Author: Wilson Mongwe | |
#### Date: 21/06/2015 | |
#### Website: www.wilsonmongwe.co.za | |
#### Title: Implementing the EM algorithm to the coin tossing example | |
####################### Simulating the population data ######################### | |
N= 10000 | |
numberOfCOins=2 | |
components = sample(1:numberOfCOins,prob=c(0.45,0.55),size=N,replace=TRUE) | |
thetas= c(0.7,0.2) ### probablity of obtaining a head on Coin 2 and Coin 3 respectively |
NewerOlder