## Example from Abbott, Fenichel, and Yun (2026)
data("AFY")
param <- AFY$param
## Deterministic benchmark
cvDET <- vaprox.pindyck(param, "logistic")
slow <- 0.1
vlow <- vsim(cvDET, slow)
qlow <- cvDET$qfun(param, slow, vlow$shadowp)
zs <- cvDET$wfun(param, slow, qlow) / param$delta
s <- chebnodegen(param$nodes, param$lowerK, param$upperK)
qopt <- cvDET$qfun(param, s, vsim(cvDET, s)$shadowp)
mus <- cvDET$gfun(param, s) - qopt
alpha <- 0.5
hs <- alpha / (alpha + s)
wb <- cvDET$wfun(param, s, qopt)
Aspace <- aproxdef(param$order, param$lowerK, param$upperK, param$delta)
cvPSS <- vaprox.pjump(Aspace, s, mus, wb, hs, zs)
vPSS <- vsim(cvPSS, s)
## Plot value function
plotgen(vPSS, ftype = "vw",
xlabel = "Stock Size",
ylabel = "Value Function")
## Plot shadow (accounting) price
plotgen(vPSS, ftype = "p",
xlabel = "Stock Size",
ylabel = "Shadow Price")
Run the code above in your browser using DataLab