Ethical and Processional Standards (EPS)
1. Professionalism
2. Integrity of Capital Markets
3. Duties to Clients
4. Duties to Employers
5. Investment Analysis, Recommendation and Action
6. Conflict of Interest
7. Responsibilities as a CFA Institute or CFA Candidate
Quantitative Methods
Simple Linear Regression
Correlation cofficient = Covariance / (sx * sy) = Average rectangle / (sx * sy)
Multiple Regression
2017年1月3日 星期二
2017年1月2日 星期一
Correlation and Regression (editing, R2 SSE etc)
Good Explanation of Covariance Matrix (aka Variance-Covariance matrix)
https://www.itl.nist.gov/div898/handbook/pmc/section5/pmc541.htm
Variance
Average Distance
Consider 1D point. For 2 points, a distance is given by the Euclidean distance
Consider a set of 1D points, there are many distances between each point and the mean point. We add them up to get the total distance. The total distance can be divided by n to get the average. This is called the average distance.
Why prefer average squares over average distance?
Using the squares of distance is better because the sign is removed. So for each points we calculate the square of distance and sum them up. The total squares can be divided by n to get the average. This is called the average square, also know as variance.
Sample Variance (average square)
varx = Sum(xi-xm)2 / (n-1)
It is the same as the average square, except the n-1.
It measures how the data vary compared to the center of data.
Taking a one dimension object as example. Variance measures the distance between the particle to the center of mass. The larger the variance, the bigger the object. A single dot has the minimal variance of 0, meaning all particles are at the same point which is the center of mass.
Taking a three dimensional balloon as example. Variance measures the distance between the air particles to the center of balloon. The larger the variance, the bigger the balloon. A very large variance means a giant of balloon.
Sample Standard Deviation
Just take the square root of sample variance. Square root means the edge of the square, or the base of the square.
Covariance
Covariance (average rectangle)
covxy = Sum(xi-xm)(yi-ym)/(n-1)
Consider the scatter plot of x and y to form a two dimensional plane. Each data point and the mean point forms a rectangle. The area of the rectangle is given by width x height = (xi - xm) * (yi -ym). Taking the average of the sum of area of rectangles gives the average rectangular area. This is called the average rectangle, also know as covariance, and CFA material describes it as "cross product". But I think the term "rectangles" is better.
Covariance is similar to variance except the square becomes the rectangle. Covariance is more generalized than variance. It is because covariance measures how one set vary compared to another set, whereas variance measures how one set vary compared to itself. Variance can be considered as covariance of 2 sets of identical data set, i.e. xi = yi, and hence the rectangle becomes square. Consider variance is a square and covariance as rectangle, they are similar in the way that square is actually a specialized rectangle, and rectangle is a generalized form of square.
Correlation Coefficient
r = corr = cov / (sx * sy)
Regression
Linear Regression
Finding the only straight line to pass through the data points so that the distances between all points to the line are minimal.
Slope of Regression Line (cov / varx)
The straight line has general form of y = mx + c. m is the slope and c is the y intercept.
The slope of a straight line is the ratio between delta y and delta x. So m = Sum(xi-xm)(yi-ym)/Sum(xi-xm)(xi-xm), or in short Sxy/Sxx, or average rectangle / average square to gives the ratio of height to width.
Y-intercept of Regression Line
The straight line must pass through the mean of x and mean of y. The point-slope form gives they intercept with mean point = (xm, ym) and slope calculated.
Slope of Regression Line (cov, std)
It can also be calculated using the correlation coefficient and standard deviation.
Slope m = cov / varx = cov / (sx*sx) = rxy * (sy / sx)
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
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.
Ethical and Professional Standards
Exam Weight: 10-15%
Exam Weight: 10-15%
Quantitative Methods
Exam Weight: 5-10%
Exam Weight: 5-10%
Economics
Exam Weight: 5-10%
Exam Weight: 5-10%
Financial Reporting and Analysis
Exam Weight: 15-20%
Exam Weight: 15-20%
Corporate Finance
Exam Weight: 5-15%
Exam Weight: 5-15%
Equity Valuation
Exam Weight: 15-25%
Exam Weight: 15-25%
Fixed Income
Exam Weight: 10-20%
Exam Weight: 10-20%
Derivative Investment
Exam Weight: 5-15%
Exam Weight: 5-15%
Alternative Investments
Exam Weight: 5-10%
Exam Weight: 5-10%
Portfolio Management
Exam Weight: 5-10%
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 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)
What is Type 1 Error?
When Null is true but rejected to believe Alternative, Type 1.
以利用驗孕棒驗孕為例,此時未懷孕為虛無假設。若用驗孕棒為一位未懷孕的女士驗孕,結果是已懷孕,這是第一型錯誤。若用驗孕棒為一位孕婦驗孕,結果是未懷孕,這是第二型錯誤。
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 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)
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.
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下載測試結果
|
結論
要達到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速度,不錯。
小米硬碟速度
根據這個測試,小米路由的USB 2.0接口读写速度测试成绩分别为24MB/s和19MB/s,这个成绩放在高端路由中也算是不错的,只是考虑到这次测试使用的闪存盘在PC的USB 2.0接口上可以跑出接近30MB/s的读写成绩,因此小米路由实际上还不能完全发挥这个闪存盘的读写能力。
小米青春版速度
這裡說青春版也有60Mbps/68Mbps速度,不錯。
訂閱:
文章 (Atom)



