Hatena::ブログ(Diary)

ptoolisの日記

2017-03-24

フーリエ変換アダマール変換の似ているところ

14:21

最近ウオルシュ関数アダマール行列を学んでいます。

2017-03-17

利率模型の違い

09:01

最近ライボー・マーケット・モデルとヒース・ジャロー・モートンフレームワーク(HJM)の差を考えています。ライボー・マーケット・モデルは市場に現れる先物の利率を算出する。HJMは瞬間的なフォワードレートの模型です。

分かりにくかった点はライボーとヒース・ジャロー・モートンの瞬間的な相等性です。

(Based on Hull's Solutions Manual)

In the limiting case, the LMM formula converges to the HJM dF forward rate process, but the proof is non-intuitive.

The LIBOR formula is:

dFk = FkLkSIGMA(i=m(t) to k)*1dt + Lk*Fk*dz

Here, di is the time period (t(i+1)-ti). Firstly, the point is to demonstrate that the above is equivalent to the abstracted HJM formula dF(t) = s(t)*INTEGRAL(m(t) to k)(s(tau)dtau)*dt + s(t)dz

Here, s(t) is the instantaneous absolute volatility of the forward rate, which (as L must be the percentage volatility of the forward rate) means lim(dk->0)FkLk = s(t)

Thus, the dz terms can be equated. The logic to equate the dt terms is somewhat more strained. 時間とともに動く因数のを導き出すのが簡単ではありません。The denominator within the sum of the LMM formula must be assumed to go to 1 as di goes to 0. then, the SIGMA factor becomes a summation of (di*Fi*Li) terms as di->0, which is equivalent to an integral over tau of s(tau). QED.

The next step is to determine how the above

dF(t) = s(t)*INTEGRAL(m(t) to k)(s(tau)dtau)*dt + s(t)dz

is equivalent to

dF(t) = (dv(t,T)/dT)*v(t,T)*dt + (dv(t,T)/dT)dz

Here, v is the volatility of a zero-coupon bond price.

This requires expressing the forward rate as follows.

f(t,T1,T2) = (lnP(t,T1)-lnP(t,T2))/(T2-T1)

Here, the rate is seen at time t and holds between T1 and T2. P is the price of the zero-coupon bond with maturities T1 or T2.

One can use Ito's Lemma to solve for dlnP(t,T1) and dln(t,T2), and the value for dlnf when df is known is a well-known case.

df(t,T1,T2) = ((v^2(t,T2)-v^2(t,T1)/(2(T2-T1)))dt + *2/(T2-T1))dz

Taking the limit as T2-T1 -> 0, or for a rate holding from T to T+delta, we obtain the derivatives of v^2 and v.

df(t,T) = (1/2)(dv^2(t,T)/dT)dt-(dv(t,T)/dT)dz

Simplifying dv^2 yields

df(t,T) = v(t,T)(dv(t,T)/dT)dt -(dv(t,T)/dT)dz QED

*1:di*Fi*Li)/(1+di*Fi

*2:v(t,T1)-v(t,T2

2017-03-10

ファインマン・カッツの公式

08:39

最近確率的計算法を学んでいます。一つな計算式はPDEの問いをブラウン運動に接続する。 the Feynman-Kac formula is problematic in that it seems to be stated in different forms depending on the source (in some cases u satisfies a PDE like that in Black Scholes, in others the heat equation), the notation for the conditional expectation is unclear, and the proofs are inconsistent, it seems, in their use of different Ito lemmas.

英語版のウィキベディアの解はu(x,t) = E(Q)(INTEGRAL(t,T)(exp(-INTEGRAL(t,r)(V(Xtau,tau)dtau))*f(Xr,r)dr) + exp(-INTEGRAL(t,T)(V(Xtau,tau)dtau))psi(XT)|Xt=x)

This basically indicates that the solution function u is a conditional expectation of psi's value at the terminal time T and the V and f values at times in the interim.

しかしシンガポール南洋理工大学Leon教授の説明は理解できました。

In this case, the solution to the PDE, g, was simply E(Q,x,t)(h(X(T))), or the expectation over all t and x of the value of some measurable function h at time T. 証明の由来も分かりました。 Basically, just start with a stochastic X(t) such that

(here, x = X(t))

dX(t) = b(t,x)dt + c(t,x)dW(t). Consider that g is a function of X and t, and apply Ito's lemma to find dg (drop arguments for clarity).

dg = (dg/dt + b*dg/dx + (1/2)*c^2*d^2g/dx^2)dt + c*(dg/dx)dW

However, since g is a Martingale (proven based on definition of g as conditional expectation of h), the dt term must be 0, meaning that (dg/dt + b*dg/dx + (1/2)c^2*d^2g/dx^2) = 0. In addition, substituting T for t into the g expression,

g(T,X(T)) = E(Q,t,x)(h(X(T))) = h(X(T)) = h(x).

The final two statements are the content of Feynman-Kac.

しかし利子の拡散方程式を表すハル・ワイト公式の偏微分方程式ファインマン・カッツで由来すればこの方程式の解の源を知りません。

2017-02-21

動的計画法とゲーム理論

12:35

最近コードシェッフと言うシステム開発試合に苦労しました。一つな問いはゲーム木の検索に関わる問題でした。 Using a standard memoization, I encountered no incorrect results, but the performance, even for the intermediate cases, was too slow. I could at least complete the intermediate cases using a dynamic programming approach with a "bestfrom" cache based on start index and move number, but this generated an incorrect answer in the simple case. でも僕が作った入力データは全部正しい出力になりました。やっぱりちょっと意外な動作を考えなければ行けないと解けません。The subtle point I had missed was that, while I was careful to check that the "bestFrom" array, which indicated the best sum possible starting from or after an index in a given move was not overstating the value by caching an index beyond the allowed start range, I forgot that it might underestimate the value by caching a sum from a previous visit when the right bound on the start index was much lower.

I found no general dynamic programming solution. Only a memoization solution which is too slow for the larger cases (beyond easy) and a dynamic-programming approach used only when M==2 (the medium test case constraint). Thus, the hard cases were left as timed-out.

2017-01-29

伊藤等長と二次変動

14:34

最近確率的な積分を学んでいます。I have had difficulty in deriving the expression sometimes given for the quadratic variation of the Ito integral. It seems to be based on Ito's isometry, which I have yet to see the derivation of.

一つな前提はB(t)と言うブラウン運動微分ができない関数です。無作為な値を出力するからです。

Ito's isometry expresses the expectation of the square of a stochastic integral for a function in terms of the standard integral of the square of that function.

E((INT(0,T)(x(t)dB(t)))^2) = E(INT(0,T)(x^2(t)dt))

It is unclear how such a formula is derived, but it appears to arise from the definition of covariance for stochastic functions.

Another formula, an unproven identity, relates quadratic variance of an Ito integral to the Ito integral of a function with respect to the quadratic variance of Brownian motion.

[(INT(0,T)(x(t)dB(t)))] = (INT(0,T)(x(t)d[B(t)]))

Here, [B(t)] is the quadratic variation of B.

The use of stochastic integrals seems to be to integrate stochastic differential equations, such as those used in geometric Brownian motion. Ito's lemma does not involve stochastic integrals, but the SDE's it translates between are solved via them. A more difficult concept is quadratic variation. It seems to be a value [M] such that M^2(t)-[M](t) is a Martingale. In addition, the variance of M is E([M]), which makes little sense, at first. However, if [M](0) is defined to be 0 (as it is in many places), then E(M^2(t)-[M](t)) = E(M^2(t))-[M](0) . Since the variance of M is E(M^2(t))-(E(M(t))^2), var(M) = E(M^2(t))-M^2(0), as M is a martingale. As M^2(t)-[M](t) is a Martingale by definition of [M], E(M^2(t))-E([M](t)) = E(M^2(0))-[M](0). As [M](0)=0, E(M^2(t))-E([M](t)) = E(M^2(0)). As E(M(t)) = M(0), E(M^2(t))-E(M^2(0)) = var(M) = E([M]), so the variance of the Martingale process is equal to the expectation of the quadratic variation of the process. This can be extended to demonstrate the variance of the Ito integral. var(I(t)) = E([I](t)), which is defined by another theorem.

派生証券の値を計算する事に役に立ちそう。

credit

https://almostsure.wordpress.com/2010/03/29/quadratic-variations-and-the-ito-isometry/, Wikipedia