Ryancct About Archive Categories Tags

linear programming (LP) concept review

筆者曾在學校算術課了解過Linear Programming (LP)的原理及用途。它是筆者較有興趣鑽研的其中一個數學原理。因此,想藉此機會溫故知新及將一己所學所得在這裡跟大家分享一下。

LP是一種數學方法,其主要原理是在特定的約束條件之下計算出最優化(最大彧最小)的目標函數的結果。LP曾在WWII時被應用於軍事開支預算以減低軍用成本及增加敵軍的損失。起初,LP的原理是美軍的軍事機密,坊間對其認知有限。不過,自從George B. Dantzig在1947年公開了LP的計算方法。之後,LP的表述便解決了許多營運上的實際問題如網路流或多商品流等等。另外,因為很多商業機構都希望解決收入極大化或成本極小化等的問題,LP亦因而經常在這些情況下大派用場。另外,LP亦有其他主要用途,當中最常接觸的便是有效的資源調配。其數式的表達如下:

resourcesallocation

以下是筆者一個簡單的例子以說明LP formulation的細節:

E.g.: 假設現在有一間專門生產書包的公司,其製作原料分別是皮質或布質兩種選擇。書包可以以皮質或布質製成。另外,放置原料的倉庫可以容納75公斤的原料。該公司只可以使用有限數量的員工工時(4000小時)及加工物料(15000公斤),而每一個皮質或布質製成的書包都需要不同數量的工時及加工物料才能製成。每一個皮製書包需要110工作小時和120公斤物料,而每一個布質製成的書包則需要30工作小時和210公斤物料。設每銷售一個皮製書包和布製書包的公司利潤為143及60港元,則該公司的營利問題可以表示為以下的LP formulation:

Max P = 143X + 60Y, where Max P is the maximized profit, X is 皮製書包的數目 and Y is 布製書包的數目

Subject to.:

X + Y =< 75 (倉庫容量限制),

110X + 30X =< 4000 (工時限制),

120X + 210Y =< 15000 (加工物料限制),

X, Y => 0 (不能生產負數的書包數量),

lpgraph

經LP計算並將結果以圖像顯示, 我們可以知道 X = 21.875, Y = 53.125 的話,該公司便能取得maximized profit。不過,因為書包的數量必需為整數,所以該公司maximized profit應該等於:

Max P = 143(21) + 60(53) = 6183 港元

上述所舉的例子只是一個較簡單的例子方便大家明白LP的威力。其實,LP的應用是可以非常廣泛,而當中所設約束條件當然可以更多,算式亦可以更複雜。讀書時期,筆者曾見識了Markowitz的the theory of portfolio choice. 當中efficient frontier (EF)更是LP應用當中的其中一個最佳例子。它利用了LP的原理找出不同Asset Class所產生的最佳投資組合。這個theory更令Markowitz在1990年獲取了Nobel Prize的。筆者曾在讀書時期嘗試利用excel的solver進行LP formulation,試圖運用EF的Portfolio Optimization原理從三個不同資產類別之間計算各自所需的Weighting,籍此找出最佳的投資組合。筆者顯醜將當年所製的excel檔案在此附上(click here),以供參詳。他日將另再撰文詳述相關的原理及具體計算細則。

註:筆者最近在附件上加了EF的計算方法及圖片以供參考,不過並不是每一個投資組合都可以PLOT出EF的。請留意所採用的PORTFOLIO是否EFFICIENT,若不是的話,便有需要進行調整了。

Reference:

Linear programming. (2012). In Wikipedia, The Free Encyclopedia. Retrieved from http://en.wikipedia.org/w/index.php?title=Linear_programming&oldid=512581944

Vanderbei. R. J. (2007). Linear Programming: Chapter 1 Introduction. Princeton University. Retrieved from http://www.princeton.edu/~rvdb/542/lectures/lec1.pdf

Verschelde. J. (2011). Linear Programming in MATLAB. Introduction to Symbolic Computation. Chicago, IL: UIC MSCS department. Retrieved from http://homepages.math.uic.edu/~jan/mcs320s03/matlec9.pdf

Posted on 18 July 2012.

Greater China's Investment Opportunities and Risks (Chinese Version)

近日,多項重要經濟指標均顯示中國經濟增長開始放緩。 國際貨幣基金組織更指出中央政府推行的各項「維穩」政策將令中國經濟出現「軟著陸」。不過,在這股陰霾的投資氣氛所籠罩下,桌上電腦巨擘戴爾創辦人米高戴爾對中國的前景仍然保持樂觀。他認為中國經濟增長雖已出現放緩,但仍比其他國家有更大的發展空間。正是戴爾和其他持相同想法的人的堅持,令環球投資資金於過去十年間不斷湧入中國這個新興市場。究竟在現時中國的宏觀經濟不穩定的影響下,中國能否繼續成為投資者資金投放的熱門選擇呢?我們將會就此在中國的投資環境的機會與風險方面作出論述。

中產堀起

學者王海倫指出中國的中產階級數目將會增長至七至八億,約佔五至六成的全中國人口,是極具潛力的消費群。這一群正在增長的中產不斷努力工作,目的便是在生活上追求改善,提高個人品味。這種提升生活質素的渴求令中國的消費需求大大增加,使服飾、飲食市場日趨壯大,為投資者提供了無限商機。這類中產階級擁有不容小覷的消費力,各個企業有望在中國市場分一杯羹。這一種龐大的消費力在北京的時裝名店是可以輕易感受到的。北京市朝陽區新光天地的香奈兒店,一個上萬元的皮包總能在不用推銷,沒有折扣的情況下大賣。而且新光天地一年的營業額更可以高達四十六億人民幣。事實上,中國人在歐洲買奢侈品的狂熱亦已成為世界焦點。雖然此情況可能只代表了一小撮中國的暴發戶,但筆者認為此情況亦反映了國民對奢侈品的熱衷。這亦是中產消費群展現的其中一種模式。

beijingstreet

對質優必需品的追求

這種對物質生活的渴求並不只限於奢侈品,還包括了在衣食住行方面的需要。不幸地,中國生產受污染食物或不合規格產品的新聞屢見不鮮,一些本土大企業亦時常捲入醜聞,市場缺乏信譽優良的品牌,使消費者飽受困擾,擔心日常用品及食品的安全。以上種種因素令整個七億人口的消費市場對質優必需品更加趨之若鶩。可是,此類產品在中國卻好像長期都非常缺乏。從內地人來港購買日常用品的情況可見,香港奶粉、藥品及家電用品在鄰近邊境的地區均被大量搶購,水貨行業更因此應運而生,縱使近日受到警方掃蕩,水貨行業亦發展蓬勃。種種跡象均顯示了中國人對質優必需品有所追求。因此,對於有實力建立品牌信心的企業來說,投資中國絕對是一個千載難逢的發展機會。

國家政策朝令夕改

不過,這個機會不是全無風險的。儘管中國經濟增長快速,它始終是一個發展中的國家,在法規制度方面的發展仍尚未成熟。一直以來,中國的法規不斷進行改革,致使變營造了一個不穩定的營商環境。這情況除了令監管機構執法困難之外,更令投資者及企業無所適從。若然沒有專家或顧問協助,投資者及企業稍一不慎便會誤墮法網,惹上官非。這不但令投資者及企業蒙承金錢上的損失,更可能會令聲譽受損,影響其國際形象。力拓集團竊取國家機密案和谷歌搜尋器被審查事件便是好例子。投資者及企業為了符合法規的要求,都必須花上更多資源和時間,緊貼最新情況,才能成功在中國的市場投資及發展。

不論投資者及企業對中國前景的看法如何,這個龐大、複雜且多變的消費市場已經吸引了全球的目光。現時,沒有一條金科玉律能保證投資在中國是必然會成功的。我認為上述就中國投資環境作出分析的兩項論述,只是指出了部份較影響中國投資者的外在因素,一些內在因素如企業規模或經營模式都是相當重要。總括而言,投資者及企業必須採取更全面的方式去篩選每一個投資項目,細心考慮和分析每一個外在及內在因素對項目的影響。這樣便可增加投資成功的機會及減少不必要的風險,那麼在中國投資也可以更運籌帷幄,提高企業在全球的競爭力和影響力。

參考資料:

Barboza. D. (2007). China reveals deep consumer product quality problems. Retrieved from http://www.nytimes.com/2007/07/04/business/worldbusiness/04iht-food.5.6497264.html

Gupta. P. (2012). INTERVIEW-UPDATE 2-Dell CEO upbeat on China despite slowdown. Retrieved from http://www.reuters.com/article/2012/07/18/dell-china-idUSL2E8IH9BI20120718

Kurtenbach. E. (2012), IMF says China's economy reached 'soft landing'. Retrieved from http://finance.yahoo.com/news/imf-says-chinas-economy-reached-031831675.html

Luhby. T. (2012). THE RISE OF CHINA: China's growing middle class Retrieved from http://money.cnn.com/2012/04/25/news/economy/china-middle-class/index.htm

王海倫. (2011). 中國夢:世界上最大的中產階級的崛起及其影響. 文匯出版社.

李雪莉. (2011). 暴富黃金十年:搶攻新中國6大消費族群. 天下雜誌472期.

Posted on 26 June 2012.

Greater China's Investment Opportunities and Risks

Recent key economic indicators such as GDP, PPI & CPI show signs that the Chinese economy is slowing down. IMF further confirmed that, in light of the Central Government policies that aim to sustain stable economic growth, China may be "heading for a soft landing". However, amid this growing concern, the computer giant leader Michael Dell remains upbeat of China as its decelerating economic growth still outpaces that of most countries. In fact, it is that entrepreneurial belief that kept the global investment capital flowing into China over the last decade. As this huge influx of money indicated that China is a place for foreign investment, it is interesting to understand more about its environment, especially the opportunities and risks behind it.

The rise of China's middle class

Author of The Chinese Dream, Helen Wang, claimed that Chinese middle class may grow to 700 to 800 million, which is 50% to 60% of China's entire population. This expanding group of middle class strives for a better standard of living. The desire for a better standard of living leads to greater demand for consumer products. This is good news to the retail industries such as apparel or F&B businesses. This explosive consumption power has already had influence on the international brand fashion store Chanel which opened a branch in Xintiandi, Chaoyang region of the Beijing city. In there, a large amount of luxurious hand bags priced more than a thousand US dollar each can be sold without any price discount or any help from sales assistant skills. In fact, sales in Xintiandi have already reached CNY 4.6 billion a year. On the other hand, the sight of Chinese buying luxurious products irrationally in Europe has drawn global attention. Though these kinds of extreme situation might only reflect a very small group of rich people behavior, it also sent a message that the Chinese citizens, especially those with rising income level, are looking for better lifestyle.

beijingstreet

In dire need of quality necessities products

The desire to have better lifestyle, in fact, is not only reflected in the luxurious products industry, but also in the necessities fields. Unfortunately in China, there is always news of Chinese next generation being harmed by defective, tainted or substandard products. The shortage of quality consumer goods and trusted brands is indeed serious problem in this developing country. As we can see in HK, the necessities such as milk powder, medicines are always the favorite products that the mainland tourists would buy when they visit the city. And, sales of these products are always strong in particular in the area where it is close to the border. This phenomenon not only created business opportunities for cross-border parallel traders but also supports the argument that the Chinese people are in dire need of good quality necessities. As such, to those strong companies with trusted brand name, this is a once in a life time business opportunities.

Frequent law and regulatory reforms in China

Despite the potential these opportunities present to investors and businesses these opportunities do not come without any threats. Notwithstanding its rapid economic growth, China is still a developing country in which the laws and regulations are not yet fully developed. The policy framework has implemented striking changes in the recent years. Such striking reforms in the Chinese laws and regulations created an unstable business environment for foreign investors or entrepreneurs. Without professional assistance it is easy for foreign businesses and investors to violate Chinese laws and regulations. Good examples are the Rio Tinto bribe case and the Google anti-censorship issue. This poses risk of financial loss and reputational damage to good companies, resulting in higher cost of compliance. Companies therefore need to tread carefully and make extra effort to ensure that they are compliant with Chinese law to successfully enter and thrive in the Chinese market.

Regardless of the investors' insight into China prospects, this large yet intricate, delicate and strange consumer market has already drawn global attention and no single answer without yielding to over-simplification can direct anyone to successful entry of this Chinese market. I believe that above-mentioned factors are only some that explained external investment environment in China, while internal factors such as firm strategies regarding mode of entry or firm size also play an equally important role in making investment decision in China as well. So, investors should take a holistic approach to evaluate the risk & return of any projects that target the China market.

Reference:

Barboza. D. (2007). China reveals deep consumer product quality problems. Retrieved from http://www.nytimes.com/2007/07/04/business/worldbusiness/04iht-food.5.6497264.html

Gupta. P. (2012). INTERVIEW-UPDATE 2-Dell CEO upbeat on China despite slowdown. Retrieved from http://www.reuters.com/article/2012/07/18/dell-china-idUSL2E8IH9BI20120718

Kurtenbach. E. (2012), IMF says China's economy reached 'soft landing'. Retrieved from http://finance.yahoo.com/news/imf-says-chinas-economy-reached-031831675.html

Luhby. T. (2012). THE RISE OF CHINA: China's growing middle class Retrieved from http://money.cnn.com/2012/04/25/news/economy/china-middle-class/index.htm

王海倫. (2011). 中國夢:世界上最大的中產階級的崛起及其影響. 文匯出版社.

李雪莉. (2011). 暴富黃金十年:搶攻新中國6大消費族群. 天下雜誌472期.

Posted on 23 June 2012.

How the Brokerage Industry Will Change Over the Next Three Years

Given the ever-changing development of the securities market, predictions in connection with the outlook of the brokerage industry in the next three years will hardly be accurate. However, in response to the recent technological and economical situations, certain changes are likely to be made across all the brokerage firms in Hong Kong. I will discuss two of these changes for which their impact on the industry is recognized as direct and far-reaching.

hkexhall

Firstly, the potential for cyber criminals is increasing as businesses become more dependent on technology for more elements of their operation. On 10 April 2011, HKEx’s website for disclosing company information was crashed due to the distributed denial of service (DDoS) attack by computer hackers. Several blue-chip stocks such as HSBC and Cathay Pacific were suspended as they attempted to disclose price sensitive information. The hacking incident disrupted normal operations of trading in the market which might cause tremendous amount of money loss to the customers. It is clear that no brokerage firm can run the risk of being vulnerable to hacker attacks like the one in HKEx and they will all be taking measures to ensure they are effectively protected. Staff in brokerage firm should be mindful that information risk is increasing and learn the best practices for prevention of any cyber crimes in the financial market and keep abreast of developments in this field.

rmb

Second, more RMB securities products will be launched to follow the trend in RMB internationalization. The RMB deposits in Hong Kong have increased dramatically over the past few years. This is not only a driving engine to accelerate the RMB internationalization process, but also a strong signal that other RMB investment products with higher growth rate can attract investors to diversify their portfolio rather than putting all their money in RMB deposit. As we witnessed, the first IPO Hui Xian REIT (87001) went public in April last year and the Heng Seng RMB Gold ETF (83168) got listed in SEHK at the start of this year. I am confident that more RMB securities products will be appearing. However, these business opportunities do not come without risk. RMB is not the local currency in HK and the exchange rate between RMB and HKD is not linked. On the other hand, the costly infrastuctures for trading these products are still very new to the market. Given the risks and costs involved in trading these products for the customers, HK brokerage firms should take caution when preparing for trading and clearing of RMB securities products to ensure that these risks and costs are short-term, bearable and controllable in this long-term process.

New challenges and opportunities keep appearing as the financial markets are evolving. From technological advancement to RMB internationalization process, there is no clear target or direction in which the brokerage industry is heading. To stay competitive in this market, brokerage firms should keep their mind open while at the same time be skeptical to any challenges and opportunities that might be introduced when moving beyond their existing operations.

Posted on 24 May 2012.

High frequency trading. Is it good or bad for us?

Trading thousands of different securities at smoking fast speed is no longer fanciful now. High Frequency Trading (HFT) takes place in various stock exchanges, both the official and unofficial one. Some said HFT will make the stock market more volatile as there is a lack of transparency in the the way computers trade, while some argue that HFT is not responsible for market volatility. No matter which direction HFT development is heading to, its implication on retail investors is undoubtedly far reaching but many investors have only little knowledge about HFT.

Although high frequency and algorithmic trading now accounts for over 70% of all equity trades placed on US exchanges and in excess of 77% in the UK , HFT as a matter of fact is still not very developed in the HK stock market in part due to high transaction cost compared with that in the Euro or US stock market. As scholars stated, the cost of high HKEX levy and HK stamp duty fee drive small and medium sized HFT traders away. As a result this lowers down the trading volume in the market and limits the size of dark pool expansion in Hong Kong. Traders usually choose not to perform HFT under the present conditions as its potential benefit is not significant.

HFT has added value to the stock market in terms of tripling volume, reducing stock spreads and transaction costs, and providing high liquidity. Unlike the US stock market in which HFT development is likely saturated, it is obvious that HFT will continue to play a great role in the Hong Kong stock market development. To let HFT bloom in a way that will not hurt investor confidence and will not distract company capital raising process is crucial. For the above reasons financial regulators should make every effort to ensure that HFT activities in Hong Kong are closely monitored.

hft

Posted on 29 April 2012.