2016年12月27日 星期二

CFA Level 2 2017 Official All Study Sessions and Learning Outcome Statements LOS

CFA Level 2 2017 Official All Study Sessions and Learning Outcome Statements LOS

Ethical and Professional Standards
Exam Weight: 10-15%
Quantitative Methods
Exam Weight: 5-10%
Economics
Exam Weight: 5-10%
Financial Reporting and Analysis
Exam Weight: 15-20%
Corporate Finance
Exam Weight: 5-15%
Equity Valuation
Exam Weight: 15-25%
Fixed Income
Exam Weight: 10-20%
Derivative Investment
Exam Weight: 5-15%
Alternative Investments
Exam Weight: 5-10%
Portfolio Management
Exam Weight: 5-10%



https://www.cfainstitute.org/programs/cfaprogram/courseofstudy/Pages/study_sessions.aspx
https://www.cfainstitute.org/CFA%20Program%20Study%20Session/2017_L2_StudySessions_combined.pdf

Total 52 Readings. Average 7 learning outcome statements per reading. There are total 48 pages just for the list of learning outcomes.

Here I make combine all learning outcome statements from all 4 readings in the quantitative methods part.




Hypothesis Test - Null and Alternative Hypothesis, Significance Level and Confidence Interval, P Value

Here is how I remember things

ANA
SCS
P  

When P < S, outside C,  we accept A. (i.e. reject N)
When P > S, inside C, we accept N. (i.e. fail to reject N)

Here is the full picture

Alternative     Null    Alternative
Significance Confidence Significance
P Value

What is null hypothesis?
Null hypothesis is used to denote things that are default, original, native, nothing, innocent, natural, naught. (naught means mathematical zero). It is the native, natural and default state of the object when nothing is happening. It is the main body.

What is alternative hypothesis?
Alternative hypothesis is the opposite of null hypothesis which is used to denote things that are special, changed, modified, added, affected, guilty. It is sometimes called research hypothesis. It is the state when somethings happens, making things changes. It is the tail of the body.


Note: Null hypothesis and alternative hypotheses are mathematically opposite and they all together forms all possibilities. So, ANA is all.

What is Confidence Interval?
The 99%, 95%, 99.9% are the confidence intervals. It means central, confident, normal, default, common, natural, usual, frequent, prevailing, trivial, typical, probable. The high confidence interval is the large probability of default null hypothesis.

Whats is Significance Level?
The 1%, 5%, 0.1% are the significance levels. It means tail, significant, alternative, extraordinary, extreme, exceptional, remarkable, singular, outstanding. It is the Z value at the tails. It is sometimes called alpha, level of significance. The low significance level is the low probability for changed alternative hypothesis.

Note: Confidence interval and significance level adds up to 1, always. So, SCS = 1.

What is critical values?
Critical values is the boundary, cut-off between the confidence interval and significance level on the x-axis of the distribution.

What is p value?
P value is the probability of the sample test statistics which is calculated form the samples drawn from the population. It is compared to the significance level. When p value less than significance level (i.e. outside the tail), it means we reject the null hypothesis (i.e. the body) and accept the alternative hypothesis (i.e. the tail).

Again:

ANA
SCS
P  

When PS, outside C,  we accept A. (i.e. reject N)
When P > S, inside C, we accept N. (i.e. fail to reject N)

What is Type 1 Error?
When Null is true but rejected to believe Alternative, Type 1.
以利用驗孕棒驗孕為例,此時未懷孕為虛無假設。若用驗孕棒為一位未懷孕的女士驗孕,結果是已懷孕,這是第一型錯誤。若用驗孕棒為一位孕婦驗孕,結果是未懷孕,這是第二型錯誤。

2016年10月18日 星期二

Java Networking and Java NIO Tutorial and Notes

Java Networking
http://tutorials.jenkov.com/java-networking/index.html

Java standard IO works with byte streams and character streams, blocking.

How to create a TCP socket to connect to a server?
Use Socket, getOutputStream, write, flush then close.
Use Socket, getInputStream, read, in.close, socket.close.

How to create a server that listens to incoming TCP connections?
Use ServerSocket, accept, socket.close, serverSocket.close.

How to send data using UDP socket?
Prepare new byte[65508], InetAddress.getByName and DatagramPacket
Use DatagramSocket().send(DatagramPacket)

How to receive data using UDP socket?
Use DatagramSocket to specify the UDP port, byte[], DatagramPacket.receive which is a blocking method.

How to read the HTTP web content?
Use URL and URLConnection.getInputStream

How to create an IP address?
Use InetAddress.getByName("google.com"), getByName("1.2.3.4") or getLocalHost()

Java NIO
http://tutorials.jenkov.com/java-nio/index.html

Java NIO works with channels and buffers, non-blocking, selectors.
A single thread uses a single selector that monitors multiple channels for events like connection opened or data arrived.

Java NIO core classes: Channel, Buffer, Selector

For Channel, the implementations are FileChannel, DatagramChannel, SocketChannel, ServerSocketChannel

For Buffer, the implementations are ByteBuffer, CharBuffer, DoubleBuffer, FloatBuffer, IntBuffer, LongBuffer, ShortBuffer. They are essentially the 8 Java primitives except Boolean.


2016年10月13日 星期四

CPU Marks Windows Experience Index and Sis

Intel i3 2100 3.1Ghz 2 core 4 thread using, with graphic
8GB but 32 bit 2.88GB usable
Intel Graphics Family

X200 P8600 2.4Ghz 4GB

MBP 2010
Macbook pro 13 2010 Mid 2.4Ghz P8600 4GB DDR3 1066Mhz 320M 256MB
Intel HD Graphics 3000

Win 7 i3 2100 MBA2011 x200 A8-5500 G620
CPU 7.1 6.8 6 7.2 6.4
RAM 5.5 5.9 5.9 5.9 5.5
Aero 4.6 5.6 4.1 6.7 4.3
Graphics 5.6 6.2 3.4 6.7 5.7
Disk 7.1 7.2 5.9 5.9 5.9






Sis i3 MBA2011
Media MPixel/s 72 60
AES GB/s 0.24 1.483
finance kOPT/s 6.21 4.09
Science GFLOPS 6.32 4.59
.NET GOPS 7.82 7.19
Memory GB/s 17.9 12.2
Memory late ns 25.5 31.2
Disk MB/s 173 219
Disk IOPS 4786 1431
i3 i5 2557m P8600
GeekBench 3 4786 4023 2303
Dual-Core A4-6300 2258 2088 1388
AMD A4-6300 Dual x4 860K A10-7850K A8 7650K A8 6600k
Price $266 $526 $789 $674
GeekBench 3 2972 7520 7022 6071
GeekBench 3 Single Core 1913 2478 2328 2132

2016年8月30日 星期二

小米路由器MINI速度測試 Xiao Mi Router Mini Speed Test 及 小米路由器變身Web Server


我正在使用小米路由器MINI(R1CM),ROM: MiWiFi 穩定版 2.8.14,Model: R1C, Input 12V/1A,使用港版三腳火牛,有USB2.0,內建的硬體規格為採用MTK的MT7620A 580MHz處理器+128MB DDR2記憶體,ac雙頻2X2天線。LAN的規格為10M/100M,支援無線 802.11ac協定以及5GHz頻段無線速度、雙頻併發速率最高達1167Mbps。

參考測速
最近看了這文章,中華電信 100M/40M所測得:
2.4GHz 46Mbps 38Mbps
  5Ghz 90Mbps 40Mbps
下一層樓,WiFi收訊都只剩2格
  5Ghz  3Mbps  4Mbps

我的外網
我的小米路由器外網頻寬狀態
86Mbps 52Mbps






iPhone6s測速
我自己在家中用iphone6s測試50cm距離。我使用Wi-Fi雙頻合一,所以只有1個SSID名稱。用iphone無線連線,幾乎就有外網百分之百的速度。
  5Ghz 84Mbps 41Mbps



















iPhone6s下載影片
用iphone6s便用video lte從youtube下載370MB電影,每秒10MB/s,100%乎合測速。








已連接的裝置清單:
裝置名稱 IP位址 MAC位址
X200-4G 192.168.31.101 00:21:6A:9C:15:CA
Ricky iphone 192.168.31.223 BC:4C:C4:DF:58:CB
Ricky-HP 192.168.31.104 A0:B3:CC:E4:FA:9D
Ricky-PC 192.168.31.102 6C:19:8F:B5:43:63

DDNS
no-ip.com

名稱 協議 外部端口 內部IP位址 內部連接埠
8089 TCP 8089 192.168.31.101 8089
7752 TCP 7752 192.168.31.101 7752
8889 TCP 8889 192.168.31.101 8889
600 TCP 600 192.168.31.101 600
3456 TCP 3456 192.168.31.101 3456
4022 TCP 4022 192.168.31.101 4022
3389 TCP 3389 192.168.31.101 3389
21 TCP和UDP 21 192.168.31.101 21
22 TCP和UDP 22 192.168.31.101 22
20 TCP和UDP 20 192.168.31.101 20

iphone6s本地FTP下載檔案測試
我使用一台IBM X200作為IIS FTP Server,用無線連到Intel WiFi Link 5300 AGN,距離2米,速度不穩,在135Mbps、162Mbps、216 Mbps跳動。在iphone6s使用OPlayer透過ftp連線下載1GB檔案,由於每秒更新一次已下載大小,我使用capture screen方法測速,如下圖速度為271.9-260.7=11.2MB/s


FTP下載測試結果

測試 路由器與X200距離 路由與iPhone6s距離 LAN WiFi Curr Next Speed
1 router 0m to X200 iphone 1m to router 100Mbps 260.7 271.9 11.2
2 router 0m to X200 iphone 1m to router 300Mbps 299.6 311.4 11.8
3 router 2m to X200 iphone 1m to router 100Mbps 209.3 220.5 11.2
4 router 2m to X200 iphone 1m to router 243Mbps 100.3 102.9 2.6
5 router 0m to X200 iphone 7m to router 100Mbps 100.2 107.3 7.1
6 router 0m to X200 iphone 7m to router 216Mbps 12.3 12.9 0.6








結論
要達到11MB/s,可以使用100MbpsLAN線連接,或者把小米放在ftp server傍並使用802.11n 300Mbps連線。如果必須使用無線連接,若果小米放遠到2米至7米距離的話,便會急降至不堪使用的2.6MB/s及0.6MB/s

小米硬碟速度
根據這個測試,小米路由的USB 2.0接口读写速度测试成绩分别为24MB/s和19MB/s,这个成绩放在高端路由中也算是不错的,只是考虑到这次测试使用的闪存盘在PC的USB 2.0接口上可以跑出接近30MB/s的读写成绩,因此小米路由实际上还不能完全发挥这个闪存盘的读写能力。

小米青春版速度
這裡說青春版也有60Mbps/68Mbps速度,不錯。

2016年8月11日 星期四

日元 HKD to JPY 匯率 Exchange Rate 台幣 TWD to HKD

2017-4-22
恆生銀行 Union TWD to HKD
ATM CUP (22APR17) TWD 6,000.00(HKD20FEE) 1,559.99,$1537 by exchangerates.org.uk
ATM CUP (24APR17) TWD 1,000.00(HKD20FEE) 276.66,$257 by exchangerates.org.uk


2016-10-03
HKBEA Master 月結單,可見東亞率=Master x 1.95%
9-14
0.077874 JPY2418 HKD188.3
0.077902 JPY672 HKD52.35
9-18
0.077878 JPY7516 HKD 585.33
9-20
7.907031 USD650 HKD5139.57
2016-09-14 Master Card
JPYJapanese yen13.186629
JPY當日MASTER卡率係1/13.186629=0.075834,加上1.95%後便是0.077313
USD當日MASTER卡率係1/0.128936=7.755785,加上1.95%後便是7.907023

CCB VISA 月結單
去VISA網頁,輸入1.95%
The rate shown is effective for transactions submitted to Visa on September 17, 2016, with a bank foreign transaction fee of1.95%1 Japanese Yen = 0.077740 Hong Kong Dollar
9-17 0.0779 (incl fees) JPY3907 HKD304.28
明明JPY3907x0.077740=HKD303.73,不知如何計出來的

BCOMM UNION 月結單
去UNIONPAY網頁1 JPY =  0.0765 HKD
9-17 0.0764 JPY4838 HKD369.92
JPY4838x0.0764 =HKD369.62,相当接近

百年找換有限公司
9-17 WE SELL 賣出參考價 0.07620


2016-08-12

未計手續費, usually VISA 1.95%

使用HKD$760時, 差別為百年HKD$2, 銀聯HKD$4, Master/Visa $8+$15(1.95%)=$23

每百銀行賣出  每HKD$760
俾多
每HKD$7600
手續費
每HKD$7600
俾多
Google 7.60 0 0 0
百年 7.62 2 0 16
上海商業 7.64 4 0 36
銀聯 7.64 4 0 38
創興 7.65 4 0 44
大眾 7.65 4 0 44
華僑永亨 7.65 5 0 48
東亞 7.66 5 0 53
中銀 7.66 5 0 54
永隆 7.66 6 0 58
恒生 7.68 8 0 82
匯豐 7.71 10 0 105
萬事達卡 7.67 7 148 214
Visa 7.68 8 148 224





Reference:

日圓兌港元 (JPY vs HKD)
1/x

差價
100日圓兌港元
銀行電匯
銀行買入
電匯
銀行賣出
現鈔
銀行買入
現鈔
銀行賣出 ▲
至高--7.640007.61000
永恆--7.560007.61000
發達鳥--7.573007.61500
百年-7.613007.573007.61800
堅成--7.570007.62000
宇宙行--7.560007.63000
上海商業7.572007.621507.556007.63800
銀聯---7.64000
創興7.587007.616007.586007.64600
大眾7.589207.613207.576207.64620
華僑永亨7.590007.615007.580007.65000
牛記--7.555007.65500
東亞7.589007.615007.570007.65500
中銀7.586007.624007.556007.65600
永隆7.590007.612007.570007.66000
萬事達卡---7.66828
Visa---7.67760
恒生7.563007.645007.546007.68400
啟能--7.595007.68500
福安--7.650007.70000
生生--7.650007.70000
匯豐7.525007.665007.483007.70700
通濟隆(預訂)---7.93000
中信7.575007.62300--
富邦7.580307.61530--
星展7.560007.64200--
交通7.589427.61745--
建設7.583007.61900--
大新7.586507.62050--
集友7.586007.62400--
工商7.585697.62169--
南洋7.586007.62400--