Derivative Pricing_3_Dynamic (two stochastic bg)

Posted sophhhie

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Derivative Pricing_3_Dynamic (two stochastic bg)相关的知识,希望对你有一定的参考价值。

1. Two-dimensional Wiener Process 

dS1 = r·S1·dt + σ1·S1·dW1 ; and  dS2 = r·S2·dt + σ2·S2·dW2

Solutions:

St = S0·exp[(r - σ2 /2 )·t + σ·Wt]

1.1 No Correlated

D2_Wiener <- function() {
        dev.new(width = 10, height = 4)
        par(mfrow = c(1, 3), oma = c(0, 0, 2, 0)) # bottom, l, top, r
        for (i in 1:3) {
                W1 <- cumsum(rnorm(500))
                W2 <- cumsum(rnorm(500))
                plot(W1, W2, type = ‘l‘, ylab = ‘‘, xlab = ‘‘)
        
        }
        mtext(‘2-dimensional Wiener Processes with No Correlation‘,
              outer = T, cex = 1.5, line = -1)
}
D2_Wiener()

技术图片

1.2 Correlated

D2_CorrWiener <- function(cor) {
        dev.new(width = 10, height = 4)
        par(mfrow = c(1, 3), oma = c(0, 0, 2, 0)) 
        for (i in 1:3) {
                W1 <- cumsum(rnorm(500))
                W2 <- cumsum(rnorm(500))
                W3 <- cor * W1 + sqrt(1 - cor^2) * W2
                plot(W1, W3, type = ‘l‘, ylab = ‘‘, xlab = ‘‘)
        }
        mtext(paste(‘2-dimensional Wiener Processes (‘, cor, ‘correlation)‘,
                    sep = ‘‘), outer = T, cex = 1.5, line = -1)
}
D2_CorrWiener(0.75)

技术图片

 

2. Quanto Options (Quantity Adjusting Option) (using Margrabe formula) (需要修正)

Margrabe <- function(S1, S2, sigma1, sigma2, Time, rho, delta1 = 0, 
                     delta2 = 0) {
        sigma <-sqrt(sigma1 ^ 2 + sigma2 ^ 2 - 2 * sigma1 * sigma2 * rho)
        d1 <- (log(S1 / S2) + (delta2 - delta1 + sigma ^ 2 / 2) * Time) /
                (sigma * sqrt(Time))
        d2 <- (log(S1 / S2) + (delta2 - delta1 + sigma ^ 2 / 2) * Time) /
                (sigma * sqrt(Time))
        M <- S1 * exp(-delta1 * Time) * pnorm(d1) - S2 * exp(-delta2 * Time) * pnorm(d2)
         return(M)
}

以上是关于Derivative Pricing_3_Dynamic (two stochastic bg)的主要内容,如果未能解决你的问题,请参考以下文章

10_InfluxDB常用函数变换类函数(DERIVATIVE, DIFFERENCE,ELAPSED,MOVING_AVERAGE,NON_NEGATIVE_DERIVATIVE)等(代

javascript product_sale_pricing_.js

javascript product_sale_pricing_.js

Pwn_9 作业讲解

Sympy 简单的二阶颂歌

如何使用 influxdb non_negative_derivative 获得一致的值?