gdca 發表於 10-2-7 19:48

不知道
我沒碰過AB,我都看mt的

這是看個人決定,像是你覺得要有漲2%的訊號
就把歷史中,開一個陣列,將下一時刻會漲2%的這時刻都標1,其他標0
輸入部分就是指標的訊號出現與否了

hkcarnby 發表於 10-2-7 19:49

今日突然想起了期權定價的東西:

期權平價(put-call parity)

C(t) + PV(x) = P(t) + S(t)
    C(t) is the value of the call at time t,
    P(t) is the value of the put,
    S(t) is the value of the share,
    PV(x) is the strike price

    * the left part of the equation is called "fiduciary call"
    * the right side of the equation is called "protective put"
http://en.wikipedia.org/wiki/Put%E2%80%93call_parity

hkcarnby 發表於 10-2-7 19:52

本帖最後由 hkcarnby 於 10-2-7 07:55 PM 編輯

Black–Scholes formula

The Black Scholes formula is used for obtaining the price of European put and call options. It is obtained by solving the Black–Scholes PDE - see derivation below.

Using this formula, the value of a call option in terms of the Black–Scholes parameters is:

    C(S,t) = SN(d_1) - Ke^{-r(T - t)}N(d_2) \,

      d_1 = \frac{\ln(\frac{S}{K}) + (r + \frac{\sigma^2}{2})(T - t)}{\sigma\sqrt{T - t}}

      d_2 = d_1 - \sigma\sqrt{T - t}.

The price of a put option is:

    P(S,t) = Ke^{-r(T-t)}N(-d_2) - SN(-d_1). \

For both, as above:

    * N(•) is the cumulative distribution function of the standard normal distribution
    * T - t is the time to maturity
    * S is the spot price of the underlying asset
    * K is the strike price
    * r is the risk free rate (annual rate, expressed in terms of continuous compounding)
    * σ is the volatility in the log-returns of the underlying
http://en.wikipedia.org/wiki/Black%E2%80%93Scholes

hkcarnby 發表於 10-2-7 19:54

有沒有大大寫了這些程式?在EXCEL或AB??{:5_261:}

hkcarnby 發表於 10-2-7 19:56

不知道
我沒碰過AB,我都看mt的

這是看個人決定,像是你覺得要有漲2%的訊號
就把歷史中,開一個陣列,將下 ...
gdca 發表於 10-2-7 07:48 PM http://coco-in.net/images/common/back.gif

請問mt是?

gdca 發表於 10-2-7 19:57

本帖最後由 gdca 於 10-2-7 07:59 PM 編輯

還有一種應用法
就是將歷史時刻的某技術指標成反指標的時段標-1,成正指標則標1
用前幾個時刻的收益率當作輸入,回歸後用以判別該指標是否在某時是否適用
類似這種回歸的方法是參考多元線性回歸中的虛擬變量把非數值的屬性,設1或0如此

gdca 發表於 10-2-7 20:02

metatrader

gdca 發表於 10-2-7 20:59

本帖最後由 gdca 於 10-2-7 09:17 PM 編輯

那東西只有波動率是不確定的,其他項都是已經給出的東西
這裡有明確給出算法
http://www.twfc.com.tw/school_ImpliedVolatilitys.htm
除了需要有一個迴圈做迭代逼近隱含波動率之外
剩下的部分僅是直接帶公式,只是還滿長的
那網頁迭代公式的分母有提到就是vega值,定義是選擇權市場價格對波動率做微分,可以改用下式計算
vega=S*sqrt(T)*N'(d1)
其餘沒給的函式補全
N(x)=( 1 + erf (x/2^(1/2)) )/2
N'(x)=e^(-x^2/2) / (2*pi)^(1/2)
erf(x) 參考這 http://zh.wikipedia.org/zh-tw/误差函数
可以用求和去逼近

就可以寫出來了,我現在手上沒excel也沒AB,只能扯一扯
使用上倒沒像證明那麼困難

gdca 發表於 10-2-7 21:02

http://blog.yam.com/MOT1/article/13645864
這裡有..可惜我excel砍了,不然把他改改估出hurst指數把方程改成碎形布朗運動會更準確

TD林 發表於 10-3-15 14:37

差點忘了這篇

不知道綠茶美眉測到哪裡去了
我計算結果算是中等系統
勝率還不錯   連續趨勢盤會賺的很過癮

缺點就是長期盤整<<比如說半年
整個績效走平
很容易鬆懈下單的意志力

還沒測出改善辦法

540ul4rm6 發表於 13-1-17 22:02

路過 順道學習學習

moshn1011 發表於 13-3-22 16:38

我是超級初學者~不知道是經驗少還是怎樣~這邊文章讓我感覺好深~都沒有補話的空間{:4_205:}
頁: 1 2 3 4 [5]
查看完整版本: 機械菜菜鳥