Tuesday, April 4, 2017

The Secret Garden





THE SECRET GARDEN
Away from prying eyes
The secret garden thrives
A shrine to beauty in Nature raw
Feeling blessed I stare in awe
Of God's love it reminds
Of Nature and the tie that binds.
~~~ntk

# I stumbled upon this secret garden in Changi Village, a nook carved out of the secondary vegetation. At least 30 varieties of plants growing in wild abundance. Hibiscus, Camelias, Bougainvillea, Bamboo, Ferns, Palm, Torch Ginger, Blue Pea, Morning Glory, Geraniums, wild Orchid, wild Yam and Tapioca and much more. May God bless the secret gardener.

Thursday, February 9, 2017

Tech Trends I would like to monitor in the next 5 years


TECH TRENDS I WOULD LIKE TO MONITOR IN THE NEXT 5 YEARS
* * All are in various stages of commercial application, but definitely advancing very rapidly in development.
1. Drones- By now everybody knows what drones are.
2. Internet of Things: Machines, appliances, 'talking' (sending data)to each other, and the data can be harvested for use to provide information for increased efficiency. Think your fridge telling your smart phone you are running out of butter for baking
3. Robotics: Robots everywhere from the factory floor to the home, in the air and under the sea. Remote vehicles mining for minerals under the sea-bed. Pilotless fighter aircraft.
4. Financial markets: Algorithmic trading, pattern recognition and high speed trading (think 1000 trades per second) enhanced by Artificial Intelligence
5. Smart wearables- smart watches, smart clothes, maybe smart shoes monitoring your health, sleep, mental state etc
6. Materials science: self-assembling (think Transformers), self-healing (think cars, bridges, buildings which repair themselves) things.
7. Swarm Intelligence: Self-organised superorganism made up of many individuals each of whose local behaviour translates to execution of a global task. Failure of one part does not cause breakdown of entire system. (Think insect swarms, fish schools and bird flocks moving as one superorganism though each member does not know the global task but only follow simple local rules). How about the Army having a Swarm bomb disposal squad.
8. Nano-robots injected into your blood stream for in-body, timed drug delivery.
9. Big data analytics: Sensors everywhere generate mounds of data. Pattern recognition with Artificial Intelligence (Classification, Optimisation, Prediction) to assist in decision-making.
10. Driverless vehicles- Not only cars but can possibly be convoys of mining trucks or a sea-going vessel
11. Electric vehicles- Already well on the way with expected future improvements in travel range and battery life
12. Augmented Reality: Any sort of computer-based system that overlays data on top of your current view of the world, while continuing to let you see the world around you. (think Pokemon)
13. Artificial Intelligence: Deep-learning neural networks: Machine vision, speech-to-text, text-to-speech, translation:For the first time, AI that learns by itself without us teaching them.
14. Renewable Energy: Solar, Wind, Hydropower- self-explanatory
15. Large scale Energy storage: Lithium-Ion battery networks that are capable of storing gigawatts of electricity (think Tesla's Gigafactory in the Nevada desert)
16. Blockchain for financial transactions: Helping to make multi-party financial transactions transparent and fraud-proof by having a central ledger that cannot be altered without the knowledge of all parties. e.g. Letters of Credit for international trade.
17. Biomimicry: Borrowing ideas from Nature's superior designs. Examples: Kingfisher's beak for Shinkansen Bullet Train, A building's ventilation copying how Termite mounds are ventilated, Velcro from seeds with burrs that attach to passing animals etc
18. 3D Printing: Printing out furniture, artificial limbs, toys or even a car?
19. Nanotechnology: Manipulation of Matter at the atomic and molecular level to create or alter materials
20. Quantum computing- When information can be both 1 and 0 at the same time and computing speed goes up by millions of times.

Monday, December 12, 2016

A Comparison of Living Costs In Several Cities



FOR THOSE DREAMING OF SPENDING THEIR RETIREMENT IN A CHEAPER COUNTRY THAN SINGAPORE: A comparison of living costs in selected cities.
The website https://www.numbeo.com/cost-of-living/ has a fairly comprehensive and reasonably accurate database on monthly living expenses in cities around the world. And a fairly accurate Cost of Living Estimator where you fill in your personal details and they come up with a monthly estimate of your monthly expenses.
I obtained the results below after filling in my estimated requirements in many items from groceries to Internet bills, to gym membership, eating out and public transport cost. For a household of two. This estimate excludes domestic help, and health insurance. *You can judge for yourself, the degree of accuracy of sample items for Singapore in the second and third images below.
My estimated cost of living is S$1,367.00 monthly. ***Please note that I am not typical: I don't have an interest in clothes, electronic gadgets, household furniture, entertainment, travel. I don't own a car or pay rent.
In Numbeo, I could automatically transfer my details to another city and see the equivalent costs in the local currency. From this, I converted back to SGD using XE.com currency converter's rate as at today.
So, there you are, a Table of Monthly Cost of Living in several cities in the world expressed in Singapore Dollar, and sorted by lowest to highest.
No surprises here except: Is Johor Bahru really that cheap? Also note the significant difference in costs between Manila, Makati and Davao in the Philippines. Although there is less difference between Indonesian major cities Jakarta, Surabaya and Bandung.

Wednesday, November 16, 2016

A Big Picture Explanation of What Affects the Direction of a Country's Stock Market

A BIG PICTURE EXPLANATION OF WHAT AFFECTS THE DIRECTION OF A COUNTRY'S STOCK MARKET.
Investors can choose to earn returns through yields (interest payment) from bonds or dividends from stocks. Bonds (which are like loans) pay out a coupon (interest) on their principle. Stocks (not all) pay out dividends. But dividend payouts are not a certainty, and depends on the company's performance. The bond yield of a country is usually measured by the yield on its 10-tear bond. The dividend yield of a country is the dividend yield of its dominant stock market Index e.g. the SP500 or Singapore's STI.
One measure of whether a country's stock market is still attractive is the difference (spread) between the dividend yield of its stock market and the yield on its 10 year bonds. Sovereign bonds are risk-free investments (theoretically) and so a choice between bonds and stocks is a choice between no risk and some risk but potentially higher gain. The bigger (on the positive side) the spread between the two asset classes, the more attractive the stock market is. If bond yields go up, investors would prefer to put their money in bonds instead of the stock market.
The yield on US 10-year Treasuries used to hover around 1.75 % for weeks just before the Presidential elections. In May, it has hit a low of 1.32 %. When Trump won the election it shot up, and is now 2.23 %. So is the US stock market still attractive? If you look at the chart, it is barely so, since the spread between the average US dividend yield and the 10 year Treasuries yield is only 0.013%.
The greatest spread of 3.041 between stocks and bonds is in the UK. On the other hand, you can see that the negative spreads are all in currently countries which have economic or political or currency problems (e.g. Russia, Brazil, Turkey, Argentina). If you look at Japan, the reason why its stock market is still reasonably attractive is because: although the dividend yield is only 2.09, the 10 year bond yield is negative (-0.01) and therefore the spread is still quite significant. The dividend yield on Russian stocks is very high viz. 4.96. But the bond yield is also very high viz 8,78. And therefore the spread is negative.
Of course dividend yields and bond yields change every day, since they are a function of stock prices and bond prices. But if you had a time series (chart) of the spread which shows how it is changing each day, it would be very useful. [This can be done if you have a Bloomberg terminal].
With the change in the US Presidency, the markets have already priced in rising interest rates and inflation as they think that Trump will attempt to fix the economy by incurring higher national debt. So you can see that US 10 year bond yields are rising, the rest of the world will (and must) follow, and all things being equal stock markets in general are in for a rough time. [US$ is rising because higher US interest rates make the Dollar more attractive.]
* Stock and Bonds data from TradingEconomics.com and Investing.com as at 16 Nov 2016.



Wednesday, September 28, 2016

The Humanization of Robots and Artificial Intelligence







THE HUMANIZATION OF ROBOTS AND ARTIFICIAL INTELLIGENCE
As robots and artificial intelligence (AI) become increasingly prevalent in human society, there is a trend to make them look , talk, think and behave more like us i.e. make them unto our image.  AI software already show some  human traits. Here are a few examples:

ROBOTS DO DREAM
One of the latest techniques in AI called Deep Learning Neural Networks [DLNN] (commonly used in machine vision, speech recognition and search) is actually capable of dreaming. While other AI has to be fed data for input, DLNN is also capable of generating some of its own input data and has its own ideas of what an object should look like. This it does by entering into a dream-like state. You can view some artistic/hallucinatory/horror/Salvador Dali-like dreams of DPNN contributed by Google’s AI Group at http://thenewstack.io/deep-learning-neural-networks-google-deep-dream/ 

ROBOTS LEARN LIKE YOUNG CHILDREN
As a one-year old child grows its brain sees and automatically classifies objects according to their likenesses viz number of features and their degree of similarity. For example cars, trucks, cranes, fire engines etc may be classified as vehicles by his brain maybe because they all have wheels, move on roads and people sit in them.. Later on an adult will teach him that this is a truck, this is a fire engine and so on. This is exactly how a DPNN learns. The unsupervised first stage groups objects into clusters based on degree of similarity and the second supervised stage builds upon this foundation to refine and differentiate objects in each cluster.

ALGORITHMS DON’T COMMIT INCEST
In Nature, only members of the same species will be capable of reproduction, not to mention breeding with members of the same family is taboo. This is called Speciation. One form of AI called Genetic Algorithms (GA)  ‘breeds’ solutions to problems by having a gene pool and evolving through generations till the best (fittest) solution is output has Speciation rules in its algorithms. Problems are encoded as strings of chromosomes and breeding is by cross-over and mutation of these strings. Simulating evolution of hundreds or thousands of generations, the GA evolves to produce better and better solutions. Some uses of GA are  optimising transportation schedules, work and school time-tables, portfolio creation in financial markets etc

ALGORITHMS FIGHT FOR THE RIGHT TO REPRODUCE
As in humans, the evolutionary process ‘chooses’ the fittest parents to allow them to produce children who will in general be fitter than their parents. GA also fight for the right to reproduce. This they do by fighting in tournaments where the fitness function is defined. And winners will be allowed to reproduce the next generation. Unlike humans however, the defeated will be culled. They can also practice Elitism if this is decided by their programmers. Only a select group with desired characteristics will be classified as elites and allowed to breed. Degree of social mobility can be adjusted from time to time.

WHY YOUR RICE COOKER IS SMARTER THAN YOU
Fuzzy Logic is another form of AI which basically tries to make machines  look at the world in a more human way. The human brain can look at a problem or an object in a holistic way that machines can’t. One of the reasons for this is that humans think and see things not as digitally binary or black and white but degrees of truth. Thus a man may be described as somewhat tall or the temperature may be described as cooling-and we will understand it. Fuzzy Logic enables rules to be encoded in degrees of truth by having fuzzy membership functions (see image) where characteristics can overlap. The Japanese use a lot of Fuzzy Logic in their consumer appliances from rice cookers to air conditioners, refrigerators and washing machines. And the reason why your fuzzy logic rice cooker can consistently cook a perfect pot of rice. It can measure the realtime relationship between temperature, moisture, texture, type of rice etc and make its own judgement calls as to when and how much to reduce or increase the cooking time. 








Monday, September 26, 2016

A Common Sense Valuation Comparison of Global Equity Markets

A Common Sense Valuation Comparison of Global Equity Markets
* and the relevance for quantitative (algorithmic) Mean Reversion startegies

# click on image to see bigger Table


Table 1: Worksheet


Table 2: Earnings-based



Table 3: Dividends-based
  • ·         Each country’s financial markets have their own characteristics and peculiarities so comparing them with a global average of Price/Earnings, Price/Book etc  is meaningful.
  • ·         Because of the loose money policy (Quantitative Easing) by the major economies (Eurozone, USA, Japan, even China in some ways) in the recent years, leading to low interest rates, there is a tendency for financial asset bubbles to arise, caused by excess funds chasing yields.
  • ·         The interplay between the Bond market and Equity market is an often underrated  factor in determining the direction of the equity index.
  • ·         Different kinds of analysis are more relevant depending on the current mode and mood of the market viz recessionary vs inflationary times, low growth vs high growth, risk-on vs risk-off mode.
  • ·         In the current low-growth environment, the Dividend factor is more important than the Earnings factor.
  • ·         Instead of Price/Earnings I have used Robert Schiller’s (the man who ‘predicted’ the 2008 US sub-prime mortgage crisis) CAPE (Cyclical Adjusted Price Earnings) which uses moving averages of 10-year earnings adjusted for inflation
  • ·         Unlike Momentum strategies, Mean Reversion strategies MUST be underpinned by Fundamentals. This is especially so in Index Futures which are based on expectations not historical.
  • ·         For Index Futures traders using a Mean Reversion strategy, Dividend Yield/10year-Bond Yield Spread is a better indicator of mid-term reversion to the Mean than the CAPE-10 year Bond Yield Spread.
  • ·         Going by Dividend factor as in Table 3 France, UK and Australia are top three undervalued, instead of China, Singapore and India if we go  by Price/Earnings factor as in Table 2.
  • ·         However, this analysis is just one variable in a quantitative model of global equities and output like direction will depend on degree of cointegration among the various markets


Wednesday, August 10, 2016

Machine Learning: The Master Algorithm


ON MACHINE LEARNING

Most of the knowledge in the world in the future is going to be extracted by machines and will reside in machines.
– Yann Le Cun, Director of AI Research, Facebook

MACHINE LEARNING is the automated discovery of Knowledge. With the Internet and sensors everywhere flooding the world with data, the ground for machine learning is extremely fertile. Machine Learning is done by learning algorithms.

Pedro Domingos’ book is a discourse on the quest for the Master Algorithm which is able to learn anything and everything anytime.

However, the quest for a Master Algorithm is by default a quest to know the nature of the learning process, and there are five schools of thought here on just what happens when we are learning so that machines can emulate them. (Dominos call’s them the five tribes of machine learning). 

Each of the tribes have their strong and valid points and any master algorithm would have to take a bit from each tribe.  them. Below, the five tribes of machine learning, and what they do:

1.    Symbolists fill in gaps in existing knowledge and use deduction to synthesize new knowledge. Example tools: Algebra, Set Theory, Boolean Logic.

2.    Connectionists strive to emulate the brain. Example tools: Back propagation artificial neural networks, Deep-Learning neural networks.

3.    Evolutionaries simulate evolution and natural selection to search the data space and evolve generations of virtual chromosomes of knowledge using a fitness function as a selection criterion. Example tools: Genetic Algorithm, Particle Swarm and Ant Colony Optimization.

4.    Bayesians systematically reduce uncertainty through changes in the probability of constantly updated data. Example tools: Markov Chain Monte Carlo simulation, Kalman Filter.

5.    Analogizers strive to find patterns and similarities in data to classify them and reduce noise. Example tools: Support Vector Machine, Nearest Neighbour algorithm and Radial Basis functions.

Each of the above is suitable for certain applications in widely different fields and certainly, it would be a challenge to find a Master Algorithm.