Future teller Pt2

Pic Ref:
http://blog.northstarmanifesto.com/2009/01/the-emerging-future/
- 接續 Future teller Pt1
http://funningboy.blogspot.com/2010/03/futuer-teller.html
- 所以我們會得到sample的解
Day D(1) D(2) D(3) D(4) D(5) D(6) D(7)
Dif 3% -> -1% -> 0% -> 1% -> 0% -> %3 -> 1%
PS: 注意,此解必須符合我們的Constrain.
- 帶入機率函數求解
前提: 不考慮每日的機率變動率.
每日的機率值是固定的, P(1%) = Constant Value,
不是 P1(1%) for Day(1)
p2(1%) for Day(2)...
- Static Part
StP = P(3%)*P(-1%)*P(0%)*P(1%)*P(0%)*P(3%)*P(1%)
- Dynamic Part
DmP = P(3% -> -1%)*P(-1% -> 0%)*P( 0% -> 1%)*P( 1% -> 0%)
*P( 0% -> 3%)*P( 3% -> 1%)
- Dynamic + Static
SDP = P(3%)*P(3% -> -1%)*P(-1%)*P(-1% -> 0%).....
- Flow Chart 找出所有的解空間, 在對每個解空間做排列的動作,之後在帶入Probability.
PS: 可以而外增加Constrain 變數. 如
7% -> -7%, 我想如果這種機率應該是很難發生吧.
Or 加入連續下跌的Constrain
-3% -> -3% Drop
- 結果
T :: 1
==Total Prob(Dym + St==)0.001
T :: 2
==Total Prob(Dym + St==)0.00212
T :: 3
==Total Prob(Dym + St==)0.00331718
T :: 4
==Total Prob(Dym + St==)0.00602681
T :: 5
==Total Prob(Dym + St==)0.00723811
T :: 6
==Total Prob(Dym + St==)0.00994943
T :: 7
==Total Prob(Dym + St==)0.0111607
T :: 8
==Total Prob(Dym + St==)0.0138721
code / Rst download
http://sites.google.com/site/funningboy/perl_code/expect.rar?attredirects=0&d=1
沒有留言:
張貼留言