首页 > 其他 > 详细

【Stefano M. Iacus】Racon-Nikodym Derivative and MC_TBC

时间:2020-04-06 22:39:05      阅读:77      评论:0      收藏:0      [点我收藏+]

1. Task: Use MC to estimate EY using 100000 replications and construct 95% CI (P(|Z| < 1.96) ≈ 0.95, i.e., 95% of time EY in this interval, e.g., Z = dÃ/dA, reassigning probabilities to the elements in Ω).

set.seed(123)
n <- 100000
beta <- 5
x <- rnorm(n) #X ~ N(0,1)
y <- exp(beta * x)

The true sd = 72004899337 is to big with respect to EY. Monte Carlo interval is not informative if variance of Y = g(X) is too large.

true.mean <- exp(beta^2 / 2) # analytical value
true.mean
mc.mean <- mean(y)
mc.mean
true.sd <- sqrt(exp(2 * beta^2) - exp(beta^2))
true.sd
mc.sd <- sd(y)
mc.sd

技术分享图片

 MC‘s CI below is based on estimated σ, and it is very big. 

mc.mean - mc.sd * 1.96 / sqrt(n)
mc.mean + mc.sd * 1.96 / sqrt(n)

技术分享图片

CI based on true σ is way too much located as bigger values:

技术分享图片

And MC‘s CI even didn‘t cover the min value.Reasons: (1) underastimated σ; (2) big variance of g(X) itself; (3) asymptotic normality after 100000 replications is not yet reached (function is exponentially growing). 

plot(1:n, cumsum(y)/(1:n), type = ‘l‘, axes = F, xlab = ‘n‘,
     ylab = expression(hat(g)[n]), ylim = c(0, 350000))
axis(1, seq(0, n, length = 5))
axis(2, seq(0, 350000, length = 6))
abline(h = 268337.3) # true mean
abline(h = mc.mean - mc.sd * 1.96 / sqrt(n), lty = 3)
abline(h = mc.mean + mc.sd * 1.96 / sqrt(n), lty = 3)
abline(h = mc.mean, lty = 2) # mc estimate 199659.2
box()

技术分享图片

2. Calibration (Variance Reduction)

2.1 Preferential Sampling

技术分享图片

Task: Calculate Eg(X) with g(X) = max(0, K - eβx), X ~ N(0,1)

The explicit solution of this put option price under BS framework:技术分享图片

 

 Φ is cumulative distribution func, i.e., Φ(x) = P(Z < z) with Z ~ N(0,1).

2.1.1 Without applying var-reduction technique

set.seed(123)
n <- 10000
beta <- 1
K <- 1
x <- rnorm(n) #X ~ N(0,1)
y <- sapply(x, function(x) max(0, K - exp(beta * x))) # vector-wise func
# explicit true solution
K * pnorm(log(K) / beta) - exp(beta^2 / 2) * pnorm(log(K) / beta - beta)

技术分享图片

Estimate + construct CI for Y = Eg(X) in three ranges of simulations, last one best:

技术分享图片

技术分享图片

 

技术分享图片

 

 2.1.2 With applying var-reduction technique

 

 

2.2 Control Variables

2.3 Antithetic (对偶) Sampling

 

【Stefano M. Iacus】Racon-Nikodym Derivative and MC_TBC

原文:https://www.cnblogs.com/sophhhie/p/12640092.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!