opts_chunk$set(external = TRUE, cache = FALSE, cache.path = "myers-cache/") read_chunk('gaussian-process-control.R') library(knitcitations)
We use the Ricker model
sigma_g <- 0.05 z_g <- function(sigma_g) rlnorm(1, 0, sigma_g) #1+(2*runif(1, 0, 1)-1)*sigma_g # x_grid <- seq(0, 2.5 * K, length=101) h_grid <- x_grid profit = function(x,h) pmin(x, h) delta <- 0.01 OptTime = 20 reward = profit(x_grid[length(x_grid)], x_grid[length(x_grid)]) + 1 / (1 - delta) ^ OptTime xT <- 0
with parameters r p
.
x_0_observed <- K xT <- 0 set.seed(1)
We simulate data under this model, starting from a size of r x_0_observed
.
We consider the observations as ordered pairs of observations of current stock size $x_t$ and observed stock in the following year, $x_{t+1}$. We add the pseudo-observation of $0,0$. Alternatively we could condition strictly on solutions passing through the origin, though in practice the weaker assumption is often sufficient.
Estimate data under the BH model
We fit a Gaussian process with
bibliography("html")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.