################################################################################
## Logistic net growth function: Example 1 in Pindyck (1984)
data("AFY")
## parameters used in Abbott, Fenichel, and Yun (2026)
param <- AFY$param
## approximation and simulation range
stock <- chebnodegen(param$nodes,param$lowerK,param$upperK)
## volatility term
theta <- 0.1
sigsGBM <- as.matrix((theta*stock)^2,col=1)
cvlogistic <- vaprox.pindyck(param,'logistic',sigsGBM)
vlogistic <- vsim(cvlogistic,stock)
## plot value function
plotgen(vlogistic,ftype="vw",xlabel="Stock Size", ylabel="Value Function")
## plot shadow (accounting) prices
plotgen(vlogistic,ftype="p",xlabel="Stock Size", ylabel="Shadow Price")
Run the code above in your browser using DataLab