『最佳拍檔』智能決策系統

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 5548|回复: 11

如何比較兩隻/多隻股票的 升/跌 表現, 誰較優勝 ?

[复制链接]
发表于 2006-3-19 16:53:59 | 显示全部楼层 |阅读模式

Originally posted by heman at 2006-3-18 01:08 AM:
不過先支持。
請問 Metastock 可否比較兩隻不同的股票的升跌幅。
例如:將 Nov.1, 2005 為零點,直至今天匯豐升了多少 %,而長實又升了多少 %,比較兩者的強弱,而能夠 show 個圖出來呢?


heman 的問題於這裡解答:

其實與使用 Rate of Change 一段日子百分比變化作比較差不多。

其實你如果只係想比較兩隻股票表現, 誰比較優勝,
可以利用 Relative Performance indicator (MetaStock 已經有這指標):

使用方法與一般技術指標差不多,拖放出來,再跟畫面指示選取要對比的股票,
設定好日期,便完成 !!

指標的睇法是:

Relative Performance indicator 用於比對圖中股票的價格與其它股票的表現。

當指標向上, 代表圖中股票表現比較好。

當指標橫向, 代表兩股票表現相同(即, 上升或下降的百分比相同) 。

當指標向下, 代表圖中股票表現較要對比的那隻股票差。

[ Last edited by MatthewAY on 2006-3-19 at 06:08 PM ]

Relative_Performance.gif
Relative_Performance_02.gif
 楼主| 发表于 2006-3-19 17:09:38 | 显示全部楼层

另一個方法, 即 heman 想要的方法

就是要自定函式,內容如下:

{Matthew - Performance from Zero}
nY:=Input("Year:",1,3000,2005);
nM:=Input("Month:",1,12,11);
nD:=Input("Date:",1,31,1);
nStart:=BarsSince(Year()=nY AND Month()=nM AND DayOfMonth() = nD);
nVAl:=LastValue(Ref(C,-LastValue(nStart)));
If(nStart <= 0, 0,(C-nVAl)/nVal*100 )

這個就是可以於圖上指定開始日期的指標, 由開始日到最後的價格增長百分比。

只要將其它圖的 Performance 線, 拖放到同一個圖內你便可比較到誰優誰劣。

Performance.gif
 楼主| 发表于 2006-3-19 17:49:08 | 显示全部楼层

再進階一點的方法 !

可以獨立建製每隻股票自己的 Performance 指標,這樣你便不須開啟該圖,
亦可直接提取它的表現指標, 與其它股票作對比。


{Matthew - 0005 Performance }
nY:=Input("Year:",1,3000,2005);
nM:=Input("Month:",1,12,11);
nD:=Input("Date:",1,31,1);
nStart:=BarsSince(Year()=nY AND Month()=nM AND DayOfMonth() = nD);
nCval:=Security("C:\MSDATA\HK0001\0005",C );
nVAl:=LastValue(Ref(nCval,-LastValue(nStart)));
If(nStart <= 0, 0,(nCval-nVAl)/nVal*100 )

自己建立其它:
{Matthew - 0001 Performance }
......
{Matthew - 0002 Performance }
......
{Matthew - 0003 Performance }
......

UPDN_proformance.gif
发表于 2006-3-19 21:07:09 | 显示全部楼层

多謝 Matthew!

不過我睇不到你 post 的圖,不知其實際如何。請問要什麼的權限才能看到呢?
請通知本人。
Thank You!!!
 楼主| 发表于 2006-3-19 23:12:08 | 显示全部楼层
发表于 2006-3-20 11:47:43 | 显示全部楼层
這個很有用,thanks.
发表于 2006-3-21 20:40:44 | 显示全部楼层

多謝 Matthew 提點!

真的是 Norton Internet Security 惹的禍!
发表于 2006-7-3 19:35:09 | 显示全部楼层


Originally posted by MatthewAY at 2006-3-19 05:09 PM:
就是要自定函式,內容如下:
{Matthew - Performance}
nY:=Input("Year:",1,3000,2005);
nM:=Input("Month:",1,12,11);
nD:=Input("Date:",1,31,1);
nStart:=BarsSince(Year ...

MatthewAY 版主,

請問ROC在Explorer運算中是否可以指定開始日期, 代替天數. 謝謝!

 楼主| 发表于 2006-7-4 17:47:39 | 显示全部楼层

Originally posted by dl_4916 at 2006-7-3 07:35 PM:


MatthewAY 版主,

請問ROC在Explorer運算中是否可以指定開始日期, 代替天數. 謝謝!


Sorry, 不可以 !  函式中的 PERIODS 一定要是常數, 不可輸入日期代替 !


Rate of Change

SYNTAX roc( DATA ARRAY, PERIODS, DIFF_METHOD )

FUNCTION Calculates the PERIODS rate-of-change of DATA ARRAY expressed as DIFF_METHOD.

Valid DIFF_METHODs are PERCENT and POINTS (these can be abbreviated as % and $).

EXAMPLE The formula "roc( CLOSE, 12, PERCENT )" returns the 12-period percent rate-of-change of the closing prices.


究竟你想點用 ? 作用為何 ?

发表于 2006-7-4 21:20:29 | 显示全部楼层


Originally posted by MatthewAY at 2006-7-4 05:47 PM:
Sorry, 不可以 !  函式中的 PERIODS 一定要是常數, 不可輸入日期代替 !
Rate of Change
SYNTAX roc( DATA ARRAY, PERIODS, DIFF_METHOD )
FUNCTION Calculates the PERIODS rate-of-change of  ...

MatthewAY 版主,

Thanks, 其實我是想用來計算在指定日期後, 一隻股票的升/跌幅, 是否有其他的方法呢.

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|『最佳拍檔』智能決策系統

GMT+8, 2024-4-29 17:52 , Processed in 0.126262 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表